Sandeep Khandelwal's Blog

SharePoint, ASP.net & other related stuffs

Interview questions WSS 3.0 - SharePoint Part 2

clock January 15, 2009 04:30 by author Sandeep Khandelwal

This post is in continuation of my earlier post which listed few other interview related questions. In order to read Part 1 of my post, please click here (Link to Part 1).

Que 6: How would you define configurable properties in a webpart?
Ans 6: Here is a simple example of creating a property that can be configured by the users. Notice how each attribute is separated by commas (,).

[code:c#] 
  [Browsable(false),Category("Miscellaneous"),
  DefaultValue(defaultText),
  WebPartStorage(Storage.Personal),
  FriendlyName("Text"),Description("Text Property")]
  public string Text
  {
   get
   {
    return text;
   }

   set
   {
    text = value;
   }
  }
[/code]

Que 7: What is a feature scope and where is it defined?
Ans 7: A feature scope restricts the use of feature to different heiarchy available in SharePoint object model. The scope is defined in the feature.xml file. Here are the different levels of scope available.

a) Web: This restrict the use of feature to the scope of a site e.g HR site feature cannot be used in Accounting Site.
b) Site: This restricts the use of feature to a specific Site Collection.
c) WebApplication: This restrict the use of feature to the scope of web application.
d) Farm: This is the highest level available. A feature defined with the scope of Farm is available to all the web application, site collections and websites defined in the Farm.

Que 8: What is a Site Definition? How can you create a new Site Definition?
Ans 8: A site definition is a collection of files that defines the structure & layout of site templates. Confused? Well, don't be. A site definition comprised of a webtemp.xml file which  in turn defined the order of various site templates available in that site definition. Site definition file also include a separate directory structure that includes all the other core files required. The webtemp.xml file is stored in %COMMONPROGRAMFILES%\Microsoft Shared\web server extensions\12\TEMPLATE\1033\XML location and directory that contains all the core files is %COMMONPROGRAMFILES%\Microsoft Shared\web server extensions \12\TEMPLATE\SiteTemplates.

Steps for creating a custom Site Definition.

Step 1.Create a copy of existing site Definition structure by navigating to %COMMONPROGRAMFILES%\\Microsoft Shared\web server extensions\12\TEMPLATE\SiteTemplates. Rename the file as NewLOB (short form for New line of business).

Step 2. Navigate to %COMMONPROGRAMFILES%\\Microsoft Shared\web server extensions\12\TEMPLATE\1033 and copy the STS directory and paste it in the same strucutre and rename it as NewLOB.

Step 3. Create webTemp.xml file to register the site definition created in step 1&2.

Step 4. Reset IIS.

Thats it. Now, new site definition is available for use for the new line of business group.

Que 9: Explain the concept of feature Stapling?
Ans 9: In order to follow the best practices set forth by Microsoft, we should not modify the  out-of-box site definiton file. So how would you achieve the customized needs of the business without having to create a brand new Site Definition files and structure? The answer is Feature Stapling. Feature stapling is a feature developed to staple (or read attach) another feature to one or more out-of-box site definition (technically speaking, it can include your custom site definition also). Here is an example of feature stapling that staples feature to different STS's.

[code:xml]
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
   <FeatureSiteTemplateAssociation Id="00BFE171-1B17-4F72-28CB-1171C0140130" TemplateName="STS#0" />
   <FeatureSiteTemplateAssociation Id="00BFE171-1B17-4F72-28CB-1171C0140130" TemplateName="STS#1" />
   <FeatureSiteTemplateAssociation Id="00BFE171-1B17-4F72-28CB-1171C0140130" TemplateName="STS#2" />
</Elements>
[/code]

Que 10: What is the role of IFilter in SharePoint?
Ans 10: IFilter is a component installed on the server (Indexing and WFEs) to index documents that with file format associated with IFilter. Out-of-box WSS supports IFilter for Word, Excel, Text, HTML, PPT, OneNote & xps. If a company stores a lot of pdf documents, the a custom IFilter install is required to enable indexing and search to support pdf formats. PDF's IFilter is freely available and can be downloaded from Adobe's website. However for tiff files, there are no free IFilter available (atleast not to my knowledge).

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Interview questions WSS 3.0 - SharePoint Part 1

clock January 14, 2009 04:33 by author Sandeep Khandelwal
Here is the part 1 of my list of questions that I typically use to screen candidates for their SharePoint skills/knowledge. I have also included answers to the best of my knowledge. In my future posts, I will continue to expand on the current list of question for WSS and include questions specific to MOSS.

Que:1 Explain the concept of ghosting/unghosting?
Ans:1 First of all, with the release of WSS 3.0, Microsoft has renamed the concept of ghosting/unghosting as uncustomized/customized pages, but since it kind a makes look interviewer cool asking scary question, lot of people still use old term i.e. ghosting/unghosting. Anyway, In order to answer this question, we should dive into inner workings of SharePoint and how it renders site pages. For e.g. there is only 1 default.aspx page that is on the file server. But if you browse through SharePoint designer you would see multiple instances of the same file (each residing in the root of every site). Thats actually an illusion :-). If default.master is left uncustomized, then there is only 1 copy of that file which is served to all the sites in a site collection. If we chose to customize the default.master page to the needs of a particular department (eg. HR needs to have a different Navigation menu with different layout), the file is now stored in content database and served straight with the parser. This file now is only specific to the HR department sites. Now the real question is why is customizing site pages bad? Well, you can imagine if a file is ghosted (uncustomized), then the same file gets rendered to meet the needs of several hundreds of sites. But if you cutomize it and if all the deparment start to customize their site pages, then you ar e bound to have performance issues because now instead of leveraging caching etc now each request goes to the database and pages are served using the database content which adds another layer and in-turn some latency.
Here is an image on how a page looks like in SharePoint designer if it is customized. Notice, that now the tooltip also says that "Page is customized" instead of Unghosted (or whatever).


Que:2 Explain the heirarchy of SharePoint Object Model?
Ans:2 A farm is the highest entity in SharePoint object model which typically consists of a database server, an Application server (if running MOSS), and atleast 2 web front end servers. A web application is the highest level in SharePoint which is nothing but a web site in IIS 6.0. A web application can have multiple site collection and each site collection can have 1 to n web sites. Here is a picture that sums up the hiearchy of SharePoint object model.


Que:3 What are different ways in which a SharePoint workflows can be kicked off (out of box)?
Ans:3 A SharePoint workflow can be started a) manually b) automatically when a new item is inserted c) automatically when an existing item is changed.


Que:4 What are Site Pages? And how are they different from application pages?
Ans:4 Yet another commonly misunderstood phenomenon. Sites Pages are typically the pages that supports user customization. For e.g default.aspx is a site page which a developer can modify using SharePoint designer. What this also means is that now the page is customized state which will force the application to grab the file from content db and this will negatively impact performance if not administered correctly. On the other hand, an application page actually serves several website. Even-though there is just one version of the file in the physical file location, through creative use of URL re-writing (a product of .net 2.0 framework), the url appends _layout folder to each site, making it seem like copies of the same file. You can also have custom application pages and store them on physicaly drive but I will caution you to read the best practices before you venture into this.

Que:5 What are site columns? How are they beneficial?
Ans:5 Site columns allows you to create a lookup columns in one location and share the column with any custom lists that would need it. A good example where you would like to create a site column is company locations. Now every list that you create under a site collection, it will have access to this site column, which will allow to re-use the same colum site wide. In future, if your company opens new offices, then you only need to add the new location in the site column which will automatically update the all the list using that site column.

Que:6 Describe the process of adding custom web-part available to SharePoint?
Ans:6 This question is important to understand the developer's grasp on the steps required to make this happen because it really is not as easy as copying .dwp file to the file server and you are done. Nonetheless, here are the steps to make your webpart avaiable to SharePoint. a) Strongly name the assembly and sign it with snk file. Create a key/pair file using sn.exe utility. b) In the assemblyInfo.cs file add the line [assembly: AssemblyKeyFile("..\\..\\.snk")]. c) If you want the webpart to be available to all the web applcation on a server, then you will have to put the .dll file into GAC. If the need is just to enable for a certain website, then you can only copy the .dll file into the bin directly of that particular site. d) Copy the .dwp file into the wpcatalog folder and update the SafeControls section of the web.config file to include the new webpart location. Alternatively, you can also install webpart by creating a webpart package and manifest.xml & MakeCab utility. Once the cab file is created, simply run the following line.
stsadm.exe –o addwppack –filename –globalinstall -force

Currently rated 2.8 by 4 people

  • Currently 2.75/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Skills - SharePoint Developer/Architect

clock January 12, 2009 04:09 by author Sandeep Khandelwal
I have been asked by several clients, colleagues & friends - the technical skills should they be looking for while hiring a senior level SharePoint resource (Developer/Architect). A common misnomer is to hire an asp.net developer and he/she can pick up what SharePoint. Yeah, you can go that route, but I for one am not entirely sold on the idea. I was a long time asp.net developer before I picked up SharePoint and there are some major differences that I had struggled getting over with. First of all, I would like to clarify that a good asp.net developer may or may not be a good SharePoint developer (because SharePoint is much-much more). But on the other hand, a good SharePoint developer requires the skills of a good asp.net developer - to be an expert in all the asp.net stack of technologies including Masterpages, themes, user controls, custom controls, LinQ, SilverLight, ADO.net data services etc. Here is my list of skills that a good SharePoint Developer/Architect must posses.

1) Complete and thorough understanding of .net stack of technologies. By this, I don't necessarily mean just asp.net, but the whole .net enchilada. And this trait becomes more and more important when needs are extremely advanced and custom workflows, custom fields & custom pages - 'customizing' is a buzz word around for you. With Microsoft' push to bridge the gap between traditional asp.net development and SharePoint development, having a good handle on .net stack of technologies and its capabilities will certainly help get through the programming hurdles.

2) Clear understanding of when to use features, feature stapling, Site Definition, Custom events, developing custom master pages, themes, security trimming etc. Having a clear understanding of Search relevance and other component including best bets, scopes etc is also very important. Complete understanding of the 12 hives and how physical directory structure corresponds to the virual one. Understanding of best practices and common tools available for SharePoint development is also important.

3) A good understanding of network protocols, network security and Active Directory is required. You can always leverage the skills of Network Admins, but having basic and clear understanding on the network functioning can help make right decision.

4) Same goes true with SQL Server. Since SharePoint stores all its data on a SQL Server database, having a good handle on SQL Server is really required. The candidate doesn't have to be DBA but should have clear understanding on the functioning of databases, security & how MOSS service accounts plays role in database permissions.

5) Understanding of server topology & skills to optimize the availability & security of the environments is a must. In a typical farm type setup, a candidate should have clear understanding on the ways that a MOSS farm can be scaled up or scaled out. When to draw a physical detachment of server v/s a virtual one is also important. An Index server should have a dedicated environment (a strong recommendation), but what would you do, if you are running a small farm?

6) When to customize v/s using out of box SharePoint Capability- Yah! Need to clearly know when to open SharePoint designer and start mucking with the sites pages. Remember, saving a page using SharePoint designer can put it in the customized state (unghosted state) and if the page is the home page of your Corporate Intranet, you can imagine the nightmares that it could entail. If you really have a customized needs, see if creating custom master pages using Visual Studio with features & definition a solution for you. Heather Solomon has written a great blog entry on how to accomplish this.

7) Finally, a good architect should have all the skills of a good architect in any other technology. ie. understanding of design principles, comfortable in creating UML diagrams, communicating design ideas and aligning best practices with the scope of the work. They all still holds true.

Currently rated 4.0 by 1 people

  • Currently 4/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


About the author

I work as SharePoint Consultant and Lead ECM Solution Expert for Integration Now (a pioneer in SharePoint solutions in midwest region). Besides having PMP, MCP, MCTS and other technical certifications, I am also an MBA (Finance) from UMKC. I lead & oversee SharePoint engagements in 4 states around Kansas City (MO, KS, IA, & NE).

Tag cloud

Page List

Sign in