Saturday, May 30, 2015

SharePoint 2013 REST Services Architecture

Developers can interact remotely with SharePoint 2013 by way of REST services introduced in SharePoint 2013. SharePoint data and objects can be accessed using any technology that supports REST web requests like the ones shown in the picture below. This ability of SharePoint 2013 opens the boundaries of integration and collaboration with other REST based platforms and devices. 

REST service architecture

As the REST service architecture in the preceding figure shows, a HTTP request using the OData protocol is sent to SharePoint and your application will receive the response in JSON or ATOM format that your client application needs to parse and utilize. The HTTP request is handled by the "client.svc" web service in SharePoint 2013. The "client.svc" web service internally calls the server object model that retrieves data from the SharePoint content database as shown below. SharePoint Apps are built using these architectural concepts.

server object model call

For example: If you want to retrieve a SharePoint List by its Title then you can create a request as follows:
http://server/site/_api/lists/getbytitle('ListName')

A concrete example:
http://win-4f44sec6iug:34480/sites/ts/_api/lists/getbytitle('ProductList')

In my case the response I receive is as follows:

display feed in IE

Oops!! So IE cannot display the feed;  but I have received the feed from SharePoint. So I right-click and do a view source. I see the entire XML is being sent by SharePoint. To see the XML in IE 10 you need to use the following procedure:
  • "Tools" > "Internet Options"
  • Select the "Content" Tab
  • Under Feeds and Web Slices, select "Settings"

    Feeds and Web Slices
  • Under Advanced section untick "Turn on Feed reading view". Refresh the request; you will see the details in XML format, something as in the following:

    XML format
The following figure (from the MSDN documentation) shows the general syntax structure of SharePoint REST URIs. (Please refer to http://msdn.microsoft.com/en-US/library/office/dn292556.aspx for more details.) The following is the SharePoint REST URI syntax structure.

REST URI syntax structure

The following are some special cases that deviate from this syntax structure:
  • Methods that require complex types as parameters.
  • If the corresponding client object model method requires that complex types be passed as parameters.
  • Static methods and properties.
REFERENCE  : http://www.c-sharpcorner.com/UploadFile/d2ee01/sharepoint-2013-rest-services-architecture/

Get to know the SharePoint 2013 REST service

SharePoint REST service architecture-2013

SharePoint 2013 introduces a Representational State Transfer (REST) service that is comparable to the existing SharePoint client object models. Now, developers can interact remotely with SharePoint data by using any technology that supports REST web requests. This means that developers can perform CreateRead,Update, and Delete (CRUD) operations from their apps for SharePoint, solutions, and client applications, using REST web technologies and standard Open Data Protocol (OData) syntax.
How the SharePoint 2013 REST service works

SharePoint 2013 adds the ability for you to remotely interact with SharePoint sites by using REST. Now, you can interact directly with SharePoint objects by using any technology that supports standard REST capabilities.
To access SharePoint resources using REST, construct a RESTful HTTP request, using the Open Data Protocol (OData) standard, which corresponds to the desired client object model API. For example:
Client object model method:
List.GetByTitle(listname)
REST endpoint:
http://server/site/_api/lists/getbytitle('listname')
The client.svc web service in SharePoint handles the HTTP request, and serves the appropriate response in either Atom or JSON (JavaScript Object Notation) format. Your client application must then parse that response. The figure below shows a high-level view of the SharePoint REST architecture.
SharePoint REST service architecture

SharePoint REST service architecture
Because of the functionality and ease of use that client object models provide, they remain the primary development option for communicating with SharePoint sites by using .NET Framework managed code, Silverlight, or JavaScript.

Use HTTP commands with the SharePoint 2013 REST service

To use the REST capabilities that are built into SharePoint 2013, you construct a RESTful HTTP request, using the OData standard, which corresponds to the client object model API you want to use. The client.svc web service handles the HTTP request and serves the appropriate response in either Atom or JavaScript Object Notation (JSON) format. The client application must then parse that response.
The endpoints in the SharePoint 2013 REST service correspond to the types and members in the SharePoint client object models. By using HTTP requests, you can use these REST endpoints to perform typical CRUD operations against SharePoint entities, such as lists and sites.
In general:
If you want to do this to an endpoint
Use this HTTP request
Keep in mind
Read a resource
GET
Create or update a resource
POST
Use POST to create entities such as lists and sites. The SharePoint 2013 REST service supports sending POST commands that include object definitions to endpoints that represent collections.
For POST operations, any properties that are not required are set to their default values. If you attempt to set a read-only property as part of a POST operation, the service returns an exception.
Update or insert a resource
PUT
Use PUT and MERGE operations to update existing SharePoint objects.
Any service endpoint that represents an object property set operation supports both PUT requests and MERGErequests.
  • For MERGE requests, setting properties is optional; any properties that you do not explicitly set retain their current property.
  • For PUT requests, if you do not specify all required properties in object updates, the REST service returns an exception. In addition, any optional properties you do not explicitly set are set to their default properties.
Delete a resource
DELETE
Use the HTTP DELETE command against the specific endpoint URL to delete the SharePoint object represented by that endpoint.
In the case of recyclable objects, such as lists, files, and list items, this results in a Recycle operation.

Construct REST URLs to access SharePoint resources

Whenever possible, the URI for these REST endpoints closely mimics the API signature of the resource in the SharePoint client object model. The main entry points for the REST service represent the site collection and site of the specified context.
To access a specific site collection, use the following construction:
http://server/site/_api/site
To access a specific site, use the following construction:
http://server/site/_api/web
In each case, server represents the name of the server, and site represents the name of, or path to, the specific site.
From this starting point, you can then construct more specific REST URIs by ''walking" the object model, using the names of the APIs from the client object model separated by a forward slash (/).
This syntax doesn’t apply to the SocialFeedManager or SocialFollowingManager REST APIs. See Social feed REST API reference for SharePoint 2013 andFollowing people and content REST API reference for SharePoint 2013 for more information.
See Determine SharePoint REST service endpoint URIs for more guidelines for determining SharePoint REST endpoint URIs from the signature of the corresponding client object model APIs.

SharePoint REST endpoint examples

The following table contains typical REST endpoint URL examples to get you started working with SharePoint data. Prepend http://server/site/_api/ to the URL fragments shown in the table to construct a fully qualified REST URL. Where necessary for POST commands, the table contains sample data you must pass in the HTTP request body to create the specified SharePoint item. Items in italics represent variables that you must replace with your values.
Description
URL endpoint
HTTP method
Body content
Retrieves the title of a list
web/title
GET
Not applicable
Retrieves all lists on a site
lists
GET
Not applicable
Retrieves a single 'list's metadata
lists/getbytitle('listname')
GET
Not applicable
Retrieves items within a list
lists/getbytitle('listname')/items
GET
Not applicable
Retrieves a specific property of a document. (In this case, the document title.)
lists/getbytitle('listname')?select=Title
GET
Not applicable
Creates a list
lists
POST
{
  '_metadata':{'type':SP.List},
  'AllowContentTypes': true,
  'BaseTemplate': 104,
  'ContentTypesEnabled': true,
  'Description': 'My list description',
  'Title': 'RestTest'
}
Adds an item to a list
lists/getbytitle('listname')/items
POST
{
  '_metadata':{'type':SP. listnameListItem},
  'Title': 'MyItem'
}


Friday, May 29, 2015

What’s New in SharePoint 2013 for End User

What’s New in SharePoint 2013 for End User


Following are the key features of SharePoint 2013 for End Users:
  • Social Computing Features: SharePoint 2013 has introduced many good improvements with respect to Social Computing including Communities, Micro blogging, My Sites, Activity Feeds,Yammer Integration etc.
    • New Site Templates are introduced for Community sites in SharePoint 2013.
    • SharePoint 2013 has Micro blogs – It allows a user to broadcast a message publicly at a central location where other users can respond.
    • My Sites design has also been improved for better navigation.
  • Enterprise Content Management (ECM): As we already know thatSharePoint is primarily an ECM (Enterprise Content Management) System, so every versionhasimprovedit’s capabilities with respect to Content Management.SharePoint 2013 has improvement as ECM e.g. Site MailBox, Site-Level RetentionPoliciesandeDiscovery Capabilities etc.
    • It’s always been desired to Keep relevant and important emails in SharePoint. Now, it’s easy to keep emails and documents with SharePoint Site Mailbox.
    • Moving documents from one location to another in SharePoint by defining a Policy which is basically a set of rules.
    • eDiscovery capabilities is a key feature for End Users;  i’ts a better and improved way to protect Business.
  • Mobile
    • HTML 5 support in SharePoint 2013 extends it’s usage for Mobile devices.
    • Office Mobile Web Apps for Word, Excel and PowerPoint.
    • Push Notifications
    • New Geo location Field Type to store map coordinates.
  • Search: Search has always been a very important feature for End-User in an Enterprise Content Management (ECM) System,soSharePoint improved a lot in version 2013 as:
    • More powerful and unified search. It gives more functionality to search with results coming much faster.
    • Relevant and personalized Search on the basis of a user’s search history.
    • Document preview on search result without opening document.
    • In order to keep the index current (maximum possible), continuous crawl feature is introduced.
    • and much more to it that requires a complete separate post.
  • Business Connectivity Services (BCS):
    • Support for OData.
    • Improvements to Online SharePoint Business Connectivity Services.
    • REST based Object Model for Web and Mobile application developers.
    • Improved support for sorting and filtering of external Lists.
    • Export external list data to an Excel workbook.
    • Improvements to Event Listeners.
  • Business Intelligence (BI): SharePoint 2013 has presented Business Intelligence tool as a way to integrate all Microsoft Office Applications as well as other Microsoft technologies.
    • Visio Services.
    • Excel Services.
    • Performance Point Services i.e. Dashboard Migration, Filter Search, Support for Analysis Services,  Support for Performance Point on iPad.
  • SharePoint 2013 Apps


A MUST HAVE SharePoint Interview Questions

What is SharePoint?

Microsoft SharePoint is an extensible platform that provides a range of products that can help organizations with solution for a variety of business needs. Primarily, SharePoint was introduced as an Enterprise Content Management System but later on Web Publishing, Collaboration, Business Process Management (BPM) and Business Intelligence (BI) features were introduced through a variety of ways.

What are the Core features of SharePoint?

With every new version, new and exciting tools were added to SharePoint platform but core of the tools that makes SharePoint an outstanding platform for Content management, Business Process Management, Collaboration and Web Publishing are:
  • SharePoint Sites facilitates to create websites.
  • SharePoint Communities plays it’s role to collaborate with other peoples.
  • Contents makes SharePoint a true CMS (Content Management System)
  • Search Engine provides smart and efficient searching of enterprise contents.
  • Insights brings information together from different data sources.
  • Composition makes SharePoint an extensible platform and extends it’s capabilities by using different tools like SharePoint Designer etc.

Can you briefly explain SharePoint Version History?

Latest version of the product is SharePoint 2013 but if we look into version History, it will be as follows:
SharePoint Version History

What’s new in SharePoint 2013?

New and exciting features are released with every version of SharePoint. SharePoint 2013 also bundled with lots of new features. Few of them are listed here:
  • Improved Performance
  • Cross-Site Publishing
  • Design Manager for Publishing Sites
  • Improved and better Search
  • Changes in SharePoint Workflow Architecture
  • Office Web Apps Server
  • Improved Social Computing Features
  • Optimized User Interface for Mobile Devices
  • Shredded BLOBs for Storage
  • New Features to BCS (Business Connectivity Services)
  • and much more…
For details on new and updated features in SharePoint 2013, please follow here.

What specific features Improve Performance in SharePoint 2013? Kindly elaborate.

SharePoint 2013 introduces following features that improves performance significantly.
  • Distributed Cache Service
  • Minimal Download Strategy and
  • Shredded Storage by introducing Shredded BLOBs.

Monday, May 25, 2015

Web Application Limits and Boundaries in SharePoint 2010

This article describes Microsoft SharePoint Server 2010 software boundaries and limits. These include the following:
Exceeding any of Supported limits may cause Performance Issue in SharePoint 2010.
  • Maximum size of Document in SharePoint 2010 is 2GB
  • Default Threshold of Document Size in SharePoint 2010 is 50MB
  • 250000 maximum recommended number of site collections per Web application is supported in SharePoint 2010
  • 300 Content Databases Per Web Application are supported
  • Maximum 5 Zones per Web Application. (Default, Intranet, Internet, Extranet, and Custom. Zones limit defined for farm is hard-coded.
  • Managed paths are cached on the Web server, and CPU resources are used to process incoming requests against the managed path list. Maximum 20 number of Managed Path per Web Application supported.
  • Maximum 300 MB Solution Cache Size per Web Application. The solution cache allows the InfoPath Forms service to hold solutions in cache in order to speed up retrieval of the solutions.

Update or edit status filed in JIRA issue

the status field is a special case and can't be updated directly, which is the second problem here. Changing a status in Jira is called ...