.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Interview Question >> SharePoint >> Post New Question Subscribe to Interview Questions

What are the best practices for SharePoint development.

Posted By :Gowthammanju     Posted Date :October 31, 2011    Points :40   Category :SharePoint 
Ans. Some of the best practices are:

1. You should always dispose SPsite and SPWeb objects, once you refer them in your code. Using the "Using" clause is recommended.

2. Use RunwithelevatePrivilages to avoid errors for end users.

3. Try writing your errors to SharePoint error logs (ULS Logs). Since it's a bad idea to fill-up event log for your production environment.

4. Use SPQuery instead of foreach loop while retrieving Items from the list.

5. Deploy additional files used in your webpart to 12 hive. Use your solution package to drop the files in 12 hive. Also, make sure that all the references (for e.g. Css or .js files) get removed when the solution is retracted.

You can also find related Interview Question to What are the best practices for SharePoint development.  below: 



Q. What are the best practices for SharePoint development.

  
Ans. Some of the best practices are:

1. You should always dispose SPsite and SPWeb objects, once you refer them in your code. Using the "Using" clause is recommended.

2. Use RunwithelevatePrivilages to avoid errors for end users.

3. Try writing your errors to SharePoint error logs (ULS Logs). Since it's a bad idea to fill-up event log for your production environment.

4. Use SPQuery instead of foreach loop while retrieving Items from the list.

5. Deploy additional files used in your webpart to 12 hive. Use your solution package to drop the files in 12 hive. Also, make sure that all the references (for e.g. Css or .js files) get removed when the solution is retracted.
(More...)

Can you explain what are the best practices for SharePoint development.

  
Below are the some of the best practices :
1. You should always dispose SPsite and SPWeb objects, once you refer them in your code. Using the "Using" clause is recommended.
2. Use RunwithelevatePrivilages to avoid errors for end users.
3. Try writing your errors to SharePoint error logs (ULS Logs). Since it's a bad idea to fill-up event log for your production environment.
4. Use SPQuery instead of foreach loop while retrieving Items from the list.
5. Deploy additional files used in your webpart to 14 hive. Use your solution package to drop the files in 14 hive. Also, make sure that all the references (for e.g. Css or .js files) get removed when the solution is retracted. (More...)

What is a SharePoint Solution File? How does it differ from WebPart .cab files in legacy development? What does it contain?

  
A SharePoint solution file is essentially a .cabinet file with all a developers ustom componets suffixed with a .wsp extension that aids in deployment. The big difference with SharePoint solution files is is that a solution:
allows deployment to all WFE's in a farm
is highly manageable from the interface allowing deployment, retraction, and versioning
Can package all types of assets like site definitions, feature definitions (and associated components), Webparts, etc.
Can provide Code Access Security provisioning to avoid GAC deployments
And much more..
(More...)

What is a SharePoint Solution File? How does it differ from WebPart .cab files in legacy development? What does it contain?

  
A SharePoint solution file is essentially a .cabinet file with all a developers ustom componets suffixed with a .wsp extension that aids in deployment. The big difference with SharePoint solution files is is that a solution: allows deployment to all WFE's in a farm is highly manageable from the interface allowing deployment, retraction, and versioning Can package all types of assets like site definitions, feature definitions (and associated components), Webparts, etc. Can provide Code Access Security provisioning to avoid GAC deployments Just to name a few things. (More...)

What is a SharePoint Solution File? How does it differ from WebPart .cab files in legacy development? What does it contain?

  

A SharePoint solution file is essentially a .cabinet file with all a developers ustom componets suffixed with a .wsp extension that aids in deployment. The big difference with SharePoint solution files is that a solution:
allows deployment to all WFE's in a farm
is highly manageable from the interface allowing deployment, retraction, and versioning
Can package all types of assets like site definitions, feature definitions (and associated components), Webparts, etc.
Can provide Code Access Security provisioning to avoid GAC deployments
And much more..

(More...)

What is Sharepoint?

  
Sharepoint is a Portal Collaboration Software provided by Microsoft , That can be configured to run Intranet, Extranet and Internet sites (More...)

What is the difference between SharePoint Portal Server and Windows SharePoint Services?

  
SharePoint Portal Server is the global portal offering features like global navigation and searching.Windows SharePoint Services is more content management based with document libraries and lists. You apply information to certain areas within your portal from windows share point Services or directly to portal areas. (More...)

What is a document library in SharePoint?

  
A document library in SharePoint is where you upload your main or core documents. Document Library is consist of a row and column view with links to the documents, When the document is updated and so is the link is created on your site. You can also track metadata of your documents. Meta data in SharePoint is consisting of document properties. (More...)

What is a meeting workspace in SharePoint?

  
A meeting workspace in SharePoint is a place to store information, attendees, and tasks related to a specific meeting. (More...)

What is a document workspace in SharePoint?

  
Document workspaces in SharePoint consist of information surrounding a single or multiple documents. (More...)

What is the difference between a document library and a form library in SharePoint?

  
Document libraries in SharePoint consist of your main/core documents. For example a word document, excel, PowerPoint, Visio, pdf, csv, notepad etc. Form libraries consist of XML forms. (More...)

What is a web part zone in SharePoint?

  
Web part zones in SharePont are what your web parts reside in and help categorize your web parts when designing a page. (More...)

How is security managed in SharePoint?

  
Security can in SharePoint be handled at the machine, domain, or SharePoint level. (More...)

How are web parts developed in SharePoint?

  
Web parts are developed in Visual Studio .Net. VS.Net offers many web part for SharePoint and page templates and can also be downloaded from the Microsoft Site and the link is.

http://technet.microsoft.com/en-us/windowsserver/sharepoint/bb407286.aspx (More...)

Quick Links For Interview Questions Categories:
ASP.Net Windows Application   .NET Framework   C#   VB.Net   ADO.Net  
Sql Server   SharePoint   Silverlight   OOPs   JQuery   JavaScript/VBScript
Biztalk Patten/Practices .IIS WCF WPF WWF
Networking Aptitude Others   All      

Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.

 
Now you can find lots of .NET, C#, Vb.Net, SQL Server,Windows, ASP.Net related Questions and their Answers here at www.dotnetspark.com. Our aim is to help you pass your certification Exams (MCP, MCSD, MCAD etc.,) with flying scores and get good name in your company.

So, Start looking our Interview Question section daily and improve your .NET Skills. You can also help others by posting Interview Questions and their Answers in this section.


Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend