Code Acceptance Checklist
- Coding Naming Convention
- SharePoint Poor Performing vs Better Performing
- SharePoint
- SharePoint Security
Note: Please mark "Y" for implementing, "N" for not implementing standards and "-" for the section that is not applicable.
Coding Naming Convention
| [ ] | Define Class, Enumeration type, Enumeration values, Event, Exception class, Read-only static field, Interface, Method, Namespace and Property in Pascal case. (For example: AppDomain). |
| [ ] | Define parameter in Camel case. (For example: clientList). |
| [ ] | Use recommended capitalization conventions. |
| [ ] | Define public and protected variables in Pascal case. |
| [ ] | Define private variables in Camel case. |
| [ ] | Do not specify the type of variable to the name of variable as it will be misleading. |
SharePoint Poor Performing vs Better Performing
| # | Poor Performing Ways | Better Performing Alternatives |
| [ ] | SPList.Items.Add | SPList.AddItem |
| [ ] | SPList.Items.Count | SPList.ItemCount |
| [ ] | SPList.Items.XmlDataSchema | Create an SPQuery object to retrieve only the items you want. |
| [ ] | SPList.Items.NumberOfFields | Create an SPQuery object (specifying the ViewFields) to retrieve only the items you want. |
| [ ] | SPList.Items[System.Guid] | SPList.GetItemByUniqueId(System.Guid) |
| [ ] | SPList.Items[System.Int32] | SPList.GetItemById(System.Int32) |
| [ ] | SPList.Items.GetItemById(System.Int32) | SPList.GetItemById(System.Int32) |
| [ ] | SPList.Items.ReorderItems(System.Boolean[], System.Int32[],System.Int32) | Do a paged query using SPQuery and reorder the items within each page. |
| [ ] | SPList.Items.ListItemCollectionPosition | ContentIterator.ProcessListItems(SPList, ContentIterator.ItemProcessor, ContentIterator.ItemProcessorErrorCallout) (Microsoft SharePoint Server 2010 only) |
| [ ] | SPFolder.Files.Count | SPFolder.ItemCount. |
| [ ] | SPFolder.Files.GetEnumerator() | ContentIterator.ProcessFilesInFolder(SPFolder, System.Boolean, ContentIterator.FileProcessor, ContentIterator.FileProcessorErrorCallout) (SharePoint Server 2010 only). |
| [ ] | SPFolder.Files[System.String] | ContentIterator.GetFileInFolder(SPFolder, System.String) Alternatively, SPFolder.ParentWeb.GetFile(SPUrlUtility.CombineUrl(SPFolder.Url, System.String) (SharePoint Server 2010 only). |
| [ ] | SPFolder.Files[System.Int32] | Do not use. Switch to ContentIterator.ProcessFilesInFolder and count items during iteration. (SharePoint Server 2010 only). |
| [ ] | Response.Redirect | Microsoft.SharePoint.Utilities.SPUtility.Redirect. |

Kiran Kumar TalikotiPosted Nov 5, 2014, 5:19 AM
Thanks Sagar :)
Sandeep VemulaPosted Oct 28, 2014, 3:42 AM
good article