Quick Enquiry

Please type below

captcha

c
20 Apr 2016

SharePoint Implementation Best Practices

SharePoint Best Practices for Developing Web Parts. 

Start with a well named VS.NET library, e.g. companyProject.content.purpose (content = e.g. webpart, workflow), should be unique on the internet. Start with a class library. Use common webpart suffixes e.g. FooPart.cs. .NET webpart vs. SharePoint webpart – .NET webpart can work in all environments not only in SharePoint. Never use Render, Rendercontrol, rarely use RenderContent. Sign or strong name the assembly. GAC = full trust (bad practice and needs IISRESET). BIN = wss_minimal trust and no recycle of the application pools. Get public key options (slides).

  • Signing Best Practice: AllowPartiallyTrustedCallers() in assembly.cs.
  • Use the 12 hive structure in your project to organize your project.
  • Use MakeCab.exe, command line tool to generate CAB/WSP.
  • Post build vs. Target, use Target.
  • Use XCopy commands to install (slides).
  • isCallBackEventHandler(), like AJAX.
  • Move the UI to a User control – Page.LoadControl.
  • User control Server Control, use User Control.
  • Code Access Security (CAS).
  • EnsureChildControls().

Building high performance solutions for Publishing Sites.

  • Group anonymous and secured resources for more effective caching.
  • Minimize number of secured items.
  • Keep files uncustomized, custom pages are subject to the safe mode parser.
  • Minimize page payload:
  • CSS based design (no more tables).
  • ISS HTTP Compression (watch out for increase in server load).
  • Lazy load core.js (read MSKB #933823).
  • Clustering of images, clipping the images (http://www.getrpo.com/).
  • IIS 7 > IIS6
  • SharePoint caching per site (output cache).
  • Object cache.
  • Disk based cache. High performance programming

All list data is stored in a single table for each content database. Looping operations in the Object Model are resource intensive. Use CAML queries for targeted item selection. Maintain SQL indexes for optimal query execution. Manipulate item data using in memory objects. NO 2000 item limit, only for displaying. Beware of caching in ViewState, use PageCache. Use SPListItemCollection instead of iterating. Use CAML when there are more selection criteria. Use Search API to query data.

High performance programming

All list data is stored in a single table for each content database. Looping operations in the Object Model are resource intensive. Use CAML queries for targeted item selection. Maintain SQL indexes for optimal query execution. Manipulate item data using in memory objects. NO 2000 item limit, only for displaying. Beware of caching in ViewState, use PageCache. Use SPListItemCollection instead of iterating. Use CAML when there are more selection criteria. Use Search API to query data.

Comments

Write a Comment

No comment posted.