Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword
Like this
20Activity
0 of .
Results for:
No results containing your search query
P. 1
Office Share Point Server-2007 Interview Questions for Developer

Office Share Point Server-2007 Interview Questions for Developer

Ratings:

4.33

(3)
|Views: 1,522 |Likes:
Published by meraTechSource
As promised, here are the Interview Questions for the SharePoint Developer. Some of the answers are long, some are really short, for the longer ones there might be too much content. The reason that there is a lot of content is because the answer can vary heavily from person to person. There is a concrete answer to all of these questions, and I have done my best to give you a general, albeit short, idea of what that is. There might be several answers, so don’t take anything that I have written here to heart, and be sure to make your own decisions.
As promised, here are the Interview Questions for the SharePoint Developer. Some of the answers are long, some are really short, for the longer ones there might be too much content. The reason that there is a lot of content is because the answer can vary heavily from person to person. There is a concrete answer to all of these questions, and I have done my best to give you a general, albeit short, idea of what that is. There might be several answers, so don’t take anything that I have written here to heart, and be sure to make your own decisions.

More info:

Published by: meraTechSource on Feb 17, 2009
Copyright:Traditional Copyright: All rights reserved

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF or read online from Scribd
See more
See less

05/10/2014

pdf

 
Article prepared by Srinath Sadda© meraTechExplorer | Resources for Technical Professionals
SharePoint Server 2007 Interview Questions forDeveloper
What are the two base classes a WebPart you are going to use within SharePoint 2007 can inherit from?
There are two base classes that a WebPart which is going to be consumed by SharePoint can inherit from, either theSharePoint WebPart Base class or the ASP.NET 2.0 WebPart base class.When inheriting from the SharePoint WebPart Base class your derived WebPart class will inherit fromMicrosoft.SharePoint.WebPartPages.WebPart. When inheriting from the ASP.NET 2.0 WebPart base class your derivedWebPart class will inherit from System.Web.UI.WebControls.WebParts.WebPart. It is considered good practice to use theASP.NET WebPart base class since the old base class is meant for backwards compatibility with previous version of SharePoint;however there are four exceptions when it is better to leverage functionality from the SharePoint WebPart base class:
 
Cross page connections
 
Connections between Web Parts that are outside of a Web Part zone
 
Client-side connections (Web Part Page Services Component)
 
Data caching infrastructure
What are the differences between the two base classes and what are the inherit benefits of using one over another?
The difference is the Microsoft.SharePoint.WebPartPages.WebPart base class is meant for backward compatibility withprevious versions of SharePoint. The benefit of using the SharePoint WebPart base class is it supported:
 
Cross page connections
 
Connections between Web Parts that are outside of a Web Part zone
 
Client-side connections (Web Part Page Services Component)
 
Data caching infrastructureASP.NET 2.0 WebParts are generally considered better to use because SharePoint is built upon the ASP.NET 2.0 webarchitecture.Inheriting from the ASP.NET 2.0 base class offers you features that inherit to ASP.NET 2.0, such as embedding resources asopposed to use ClassResources for deployment of said types.
What is the GAC?
The GAC stands for the global assembly cache. It is the machine wide code cache which will give custom binaries place into thefull trust code group for SharePoint. Certain SharePoint assets, such as Feature Receivers need full trust to run correctly, andtherefore are put into the GAC. You should always try to avoid deployment to the GAC as much as possible since it will possiblyallow development code to do more than it was intended to do.
What is strong naming (signing) a WebPart assembly files?
Signing an assembly with a strong name (a.k.a strong naming) uses a cryptographic key pair that gives a unique identity to acomponent that is being built. This identity can then be referred throughout the rest of the environment. In order to installassemblies into the GAC, they must be strongly named. After signing, the binary will have a public key token identifier whichcan be use to register the component in various other places on the server.
 
Article prepared by Srinath Sadda© meraTechExplorer | Resources for Technical Professionals
What are safe controls, and what type of information, is placed in that element in a SharePoint web.config file?
When you deploy a WebPart to SharePoint, you must first make it as a safe control to use within SharePoint in the web.configfile. Entries made in the safe controls element of SharePoint are encountered by the SharePointHandler object and will beloaded in the SharePoint environment properly, those not will not be loaded and will throw an error.In the generic safe control entry (this is general, there could be more), there is generally the Assembly name, the namespace,the public key token numeric, the typename, and the safe declaration (whether it is safe or not). There are other optionalelements.
What is the CreateChildControls() method? How can you use it to do something simple like displaying a Label control?
The CreateChildControls method in WebParts is used to notify the WebPart that there are children controls that should beoutput for rendering. Basically, it will add any child ASP.NET controls that are called instantiating each control with its relevantproperties set, wire any relevant event handlers to the control, etc. Then the add method of the control class will add thecontrol to the controls collection. In the relevant WebPart render method, the EnsureChildControls method can be called (orset to false if no child controls should be called) to ensure that the CreateChildControls method is run. When usingCreateChildControls it implies that your WebPart contains a composition of child controls.In order to create something like a label control in Create, you would create a new label control using the new keyword, setthe various properties of the control like Visible=True and ForeColor = Color.Red, and then use Controls.Add(myLabelControl)to add the control to the controls collection. Then you can declare EnsureChildControls in the Render method of the WebPart.
What does the RenderContents method do in an ASP.NET 2.0 WebPart?
The render contents method will render the WebPart content to the writer, usually an HtmlTextWriter since WebParts willoutput to an HTML stream. RenderContents is used to tell how the controls that are going to be displayed in the WebPartshould be rendered on the page.
Side Question:
I got asked what the difference between CreateChildControls and the RenderContents method. TheCreateChildControls method is used to add controls to the WebPart, and the RenderContents method is used to tellthe page framework how to render the control into HTML to display on a page.
What is the WebPartManager sealed class? What is its purpose?
 The WebPartManager sealed class is responsible for managing everything occurring on a WebPart page, such as the WebParts(controls), events, and misc. functionality that will occur in WebPartZones. For example, the WebPartManager is responsiblefor the functionality that is provided when you are working with moving a WebPart from WebPartZone to WebPartZone. It is
known as the “the central class of the Web Part Control Set.”
 
Side Question:
I got asked how many WebPartManager controls should be on a page. In order to have WebParts ona page there has to be just one WebPartManager control to manage all the WebParts on the page.
What is a SPSite and SPWeb object, and what is the difference between each of the objects?
 The SPSite object represents a collection of sites (site collection [a top level site and all its subsites]). The SPWeb objectrepresents an instance SharePoint Web, and SPWeb object contains things like the actual content. A SPSite object containsthe various subsites and the information regarding them.
How would you go about getting a reference to a site?
 
C#:
 oSPSite = new SPSite("http:/server"); oSPWeb = oSPSite.OpenWeb();
 
Article prepared by Srinath Sadda© meraTechExplorer | Resources for Technical Professionals
What does a SPWebApplication object represent?
 The SPWebApplication objects represents a SharePoint Web Application, which essentially is an IIS virtual server. Using theclass you can instigate high level operations, such as getting all the features of an entire Web Application instance, or doinghigh level creation operations like creating new Web Applications through code.
Would you use SPWebApplication to get information like the SMTP address of the SharePoint site?
 Yes, since this is a Web Application level setting. You would iterate through each SPWebApplication in the SPWebApplicationcollection, and then use the appropriate property calls (OutboundMailServiceInstance) in order to return settings regardingthe mail service such as the SMTP address.
Side Question:
I got asked if there are other ways to send emails from SharePoint. The answer is yes, there is. Youcan use the SendMail method from the SPutility class to send simple emails, however it is not as robust as using the
System.Net.Mail functionality since it doesn’t allow things like set
ting priorities on the email.
How do you connect (reference) to a SharePoint list, and how do you insert a new List Item?
 
C#:
 using(SPSite mySite = new SPSite("yourserver"))  { using(SPWeb myWeb = mySite.OpenWeb())  { SPList interviewList = myWeb.Lists["listtoinsert"]; SPListItem newItem = interviewList.Items.Add(); newItem["interview"]="interview"; newItem.Update(); } } 
How would you loop using SPList through all SharePont List items, assuming you know the name (in a string value) of thelist you want to iterate through, and already have all the site code written?
 
C#:
 SPList interviewList = myWeb.Lists["listtoiterate"]; foreach (SPListItem interviewininterviewList)  { 
 // Do Something
 } 
How do you return SharePoint List items using SharePoint web services?
 In order to retrieve list items from a SharePoint list through Web Services, you should use the lists.asmx web service byestablishing a web reference in Visual Studio. The lists.asmx exposes the GetListItems method, which will allow the return of the full content of the list in an XML node. It will take parameters like the GUID of the name of the list you are queryingagainst, the GUID of the view you are going to query, etc.
Side Question:
I got asked how I built queries with the lists.asmx web service. In order to build queries with thisservice, one of the parameters that the GetListItems method exposes is the option to build a CAML query. There areother ways to do this as well, but that was how I answered it.
When retrieving List items using SharePoint Web Services, how do you specify explicit credentials to be passed to accessthe list items?
 In order to specify explicit credentials with a Web Service, you generally instantiate the web service, and then using thecredentials properties of the Web Service object you use the System.Net.NetworkCredential class to specify the username,password, and domain that you wish to pass when making the web service call and operations.

Activity (20)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads
Jagdeep Kaur liked this
ALi liked this
mangalagiri liked this
sudhirbmali1124 liked this
Joel Gibbons liked this
Sri Bolla liked this
meraTechSource liked this
Sunil Bailwad liked this

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->