Friday, June 6, 2014

When to use and not to use SharePoint

Introduction


SharePoint technology is adopted in many organizations and supported by IT due to it’s Out of the box features and its Integration with other systems. Although we can do everything in SharePoint because of its rich features and support, we need to analyze and take a decision whether to use SharePoint or ASP.NET (Forms or MVC).

When to use SharePoint


If the new application requires more collaboration, less database intensive operations, BI, Publishing, Content & document management and adopts most of the SharePoint OOTB features (with less custom development), then SharePoint is the best choice.

Key features of SharePoint technology


1.    Collaboration
2.    Single Sign on
3.    BI Insight
a.    Reporting Service Integration
b.    PerformancePoint
c.    Excel services ( Power view, Power pivot, Power Map)
4.    Project Server Integration
5.    Office
a.    Web based access to the office applications
b.    Drag and drop from desktop to the platform
c.    Exchange Integration
d.    Improved notification
6.    Social Networking
7.    CMS Integration
8.    Advanced Search
9.    User profiles
10.  Business Process workflows with Workflow manager
11.  Business connectivity services (BCS)
12.  Security
13.  Mobile support (contemporary HTML5 view, Device channels, Office Web Apps Ux with touch support)
14.  OOBT Site columns, Content types, Page layouts, Master pages, Themes, Web parts and Workflows etc.
15.  OOBT Site templates (example Team site, publishing site etc.)
16.  OOBT Objects such as lists and document libraries (example Task list, Issue list, contacts list, picture library etc.)
17.  Document and Records Management. (Versioning, co-authoring, Retention policy, Barcode, Label, Audit etc.)
18.  WCM
a.    Cross site publishing
b.    Video and Embedding
c.    Image Rendition
d.    Clean URLs
e.    Variations and Content translation
f.     Metadata navigation
g.    Search Engine Optimization (SEO)
19.  SharePoint Store
20.  Cross browser functionality
21.  e-Discovery feature with e- Discovery center site templates.
22.  Publishing to Multiple formats (Intranet, Extranet, Internet, Mobile, Tablet)
23.  OData
24.  And much more.

When not to use SharePoint / When to consider ASP.NET


However there are certain circumstances we may not choose SharePoint and the better alternative is ASP.NET custom application development.
1.    Complex database: If the application uses RDBMS with many tables with relations and Indexes, It is better to go with traditional ASP.Net application. Although we can achieve the same database table structure in Sharepoint List and document library using lookup columns and Taxonomy, it is flexible and easy in SQL and traditional ASP.NET applications. In addition, creating OLAP cubes using Database tables, Creating BI reports and creating Indexes to fine-tune the BI report performances are easy. In simple words, SharePoint lists and libraries are not the correct substitute for Relational database.

2.    Database vs. SharePoint list: If your business logic requires transactions, storing data in a database is preferable to using lists. Also, SharePoint lists are meant to store simple data structures. If you require a complex data model with intricate relationships, a database is more appropriate.
Benefits
Database
SharePoint list
Handles complex data relationships
Yes
No
Handles large numbers of items
Yes
No
Handles transactions
Yes
No
Is easy to use
No
Yes
Accommodates workflows
No
Yes
Includes a standard interface
No
Yes
Can easily add binary data
No
Yes

3.    Administrator / IT Configurable UI Components: SharePoint webparts such as Announcements, Weather Information, Sales dashboard web parts are reusable in multiple pages across the multiple websites and required to create new pages and include the reusable web parts by Sharepoint administrators or site collection administrators. If such requirement is not required, we need to consider choosing traditional way.

4.    Branding: Sharepoint branding Implementation is comparatively time consuming than ASP.net and the end results not great especially in admin interfaces which have ribbon and breadcrumb. Ribbon and Breadcrumb design requires some styles customization, if we are using our custom branding (custom master page)

5.    Performance: SharePoint have an extra layer which translates CAML query to T-SQL and then it executes it. The SharePoint lists and document libraries have some extra overhead in accessing Data and have items boundary and over the limit SharePoint won’t support and have performance Issues. However Database table item storage boundaries are high and optimized according to our data volume.

6.    “Untouchable” Database: Microsoft strongly recommended not to touch the SharePoint content database and its objects, as the structures of the Sharepoint tables are not like normal application table structure.

7.    Time and Dev server hardware and software requirements: Developers normally use visual studio to build & deploy many times during the day, moreover the time spent for building & deploying a SharePoint solution is normally double or triple the time for a normal ASP.NET application. This will increase much more if the Developer machines have less than the Microsoft recommended hardware such as RAM, Processor and Free hard disk space.

8.    Complex knowledge platform: It requires a very advanced understanding of the complex concepts of ASP.NET, database & windows server like Active directory, PowerShell, Memory management, caching, hardware capabilities & networking.

9.    Deployment: Complex compared to ASP.NET, which require to copy DLLs (GAC or Bin directory) and a files in to a specific folders. A few SQL commands to add Tables, add Meta data etc. In SharePoint it is complex, and we need to prepare the solution and write PowerShell commands to add, upgrade, Activate solutions. In addition we need to activate the features in Farm, Site collection, Web levels. The deployment process also includes Metadata Import scripts, some manual and automated process.

10.  Estimation: Estimation is difficult and sometimes we can get a solution from codeplex for free and sometimes we need to develop from scratch. In addition, there are multiple ways in Sharepoint to get a required solution such add a list of contacts from a csv file to SharePoint list. This task can be achieved using Server object model (c#), CSOM, PowerShell script, SharePoint UI data entry (if the contact list is small).

11.  Administration: Backup and restore of ASP.Net application is simple and the administrator needs to take the backup Database related the application only, whereas in SharePoint we need to take the snapshot of the server and All the databases related to Site, Central admin, IIS configuration, Service applications etc.

12.  Full Control: Since SharePoint is a framework we can’t change certain features and needs a few workarounds to attain the solution. In case of ASP.Net application we have a full control over all the UI, Libraries, controls which we have created and we can modify and fix issues very easily and quickly.

Advice from Jeff Teper, Corporate Vice President SharePoint


  • Use SharePoint as an out-of-box application whenever possible - We designed the new SharePoint UI to be clean, simple and fast and work great out-of-box. We encourage you not to modify it which could add complexity, performance and upgradeability and to focus your energy on working with users and groups to understand how to use SharePoint to improve productivity and collaboration and identifying and promoting best practices in your organization.

  • Be thorough in custom web design, development and testing – We know many SharePoint sites are published portals or custom web apps and are excited about the new features we designed for these scenarios. We encourage you to review the new features and guidance to reduce the amount of custom work you need to do. But even there, code is code and we encourage you to validate your design early in your development cycle and with particular focus on peak usage performance testing for how your customizations impact HTTP and SQL Server roundtrips. We have guidance and page and object caching techniques that can help here.

Reference:



Other references:



SharePoint Performance and boundaries



Thursday, June 5, 2014

Run PowerShell In Windows Task Scheduler






PowerShell Shortcuts

Key
Description
Up / Down arrow
Scan forward or backward through your command history

Tab
Access the tab expansion function

Page Up / Page Down
Access the first or last command in the command history.

Home / End
Move to the beginning or end of the line.

Esc
To clean the current line
Delete / Backspace
Press Delete to delete the character under the cursor, or press the Backspace key to delete the character to the left of the cursor
Ctrl+S
pause or resume the display of output.

Ctrl+Left arrow / Ctrl+Right arrow
move left or right one word at a time
Ctrl + End
Delete all the characters in the line after the cursor
Ctrl + C
Break out of the subprompt or terminate execution
Alt + F7
Clears the command history
Alt + Space + E
Displays an editing shortcut menu with Mark, Copy, Paste, Select All, Scroll, and Find options
|
Break a line at the pipe character
F1
Moves the cursor one character to the right on the command line. At the end of the line, inserts one character from the text of your last command
F2
Creates a new command line by copying your last command line up to the character you type.
F3
Completes the command line with the content from your last command line, starting from the current cursor position to the end of the line
F4
Deletes characters from your current command line, starting from the current cursor position up to the character you type.
F5
Scans backward through your command history
F7
Displays a pop-up window with your command history and allows you to select a command. Use the arrow keys to scroll through the list. Press Enter to select a command to run, or press the Right arrow key to place the text on the command line.
F8
Uses text you've entered to scan backward through your command history for commands that match the text you've typed so far on the command line
F9
Runs a specific numbered command from your command history.

Wednesday, June 4, 2014

SharePoint 2013, 2010, MOSS 2007 - Document Library best practices

1. Require Check Out on any document library where multiple users might make changes.
Check out is supported by, but not enforced on, document libraries unless you make it that way!


2. Add the Checked Out By column to the default view of the library.
That way users can see easily who has a document checked out. If you hover over the Checked Out icon, it tells you in a tip, but that's not exactly a "discoverable" little gem.


3. Train users how to check out, check in, and discard check out.
Be sure they understand that the changes they make can't be seen by other users until checked in. 
Do they understand the purpose of Keep document checked out after checking in? They check in the document to make their changes visible, but maintain an editorial lock to make more changes.
If there is a required column (property/attribute/metadata) that's blank, the document can't be checked in. Train users how to deal with this. 


4. Decide whether to use versioning.
If you want to restrict who can see drafts, use minor versions. Most of the time your processes will require that. If not, there's no real point in using minor versions.


5. If you're using versioning, set retention limits.
By default, SharePoint keeps all versions, and these aren't bitwise differential versions—they're the full version. With large documents, even a small but active library can eat up your database in a hurry!


6. Configure views that will help users navigate libraries effectively and find the documents they require.


7. Folder Structure – Create a hierarchical folder structure and provide appropriate permissions.


8. More secured documents – Provide document level permissions, if required


9. Create a permission level that gives someone the Override Checkout permission.

Take the burden off of yourself and your IT team to check documents in when users forget to do so before going on vacation.
Train your "check in managers" and your users so that they know what it means when a document has been checked in "on behalf" of someone else. If that someone else was using Microsoft Office 2007's 
SharePoint Drafts folder, there are likely to be changes in the local copy of the document that were not included when the document was checked in. At some point, the two versions (the server's copy and the user's local copy) will need to be reconciled.

10. Create custom view with Filters and Extra metadata


11. Create Page and Add List web part to display the List Items in custom view