Share Point 2010 Development for Developers

Embed Size (px)

Text of Share Point 2010 Development for Developers

  • 8/3/2019 Share Point 2010 Development for Developers


    SharePoint 2010 Development for ASP.NET Developers


    This paper provides ASP.NET developers with helpful insight into SharePoint concepts from an ASP.NET

    developers perspective, making it easier to develop SharePoint applications. As a prerequisite, you should

    have a basic understanding of the differences between the SharePoint and ASP.NET platforms. These

    differences are explained well inSharePoint 2010: Developer Platform White Paper , and you should read

    and understand this paper before continuing.

    SharePoint is the fastest growing product in Microsofts history and its developer community is growing

    quickly. In the beginning, SharePoint was simply a collaboration platform, but it has evolved throughout

    the years to become what it is today; an integrated suite of server features including: content

    management, enterprise search, business connectivity services, and information management. With such

    powerful capabilities, the SharePoint application landscape ranges from simple web part solutions over

    business collaboration applications to sophisticated applications for integrating Line of Business (LOB)


    Although SharePoint is considered to be a development platform, it was hard for developers to quickly

    ramp up on SharePoint development because it required a deep knowledge of SharePoint architecture

    and infrastructure. Significant changes were made in SharePoint 2010 and Visual Studio 2010 to improve

    the development experience and some of the key concepts familiar to ASP.NET developers were

    introduced such as easy deployment and debugging of your SharePoint applications and designers for

    building different types of SharePoint customizations.

    SharePoint developer tooling has been greatly enhanced in Visual Studio 2010 and it includes many

    different templates for SharePoint projects and project items. Visual Studio provides developers with a

    familiar development environment and all of its benefits, such as IntelliSense and enhanced debugging. It

    makes it easier for ASP.NET developers who want to target the SharePoint platform. For more information,

    see the Glide Path for ASP.NET Developers on MSDN.

    SharePoint Overview

    There are three versions of SharePoint 2010:

    Microsoft SharePoint Foundation 2010: Microsoft SharePoint Foundation is the essential solution for

    organizations that need a secure, manageable, web-based collaboration platform. It serves as the basis for

    SharePoint server and offers out of the box elements such as blogs, wikis, team workspaces, and

    document libraries, providing users with the ideal way to share information and collaborate within acustomized website. In addition, it provides services such as Business Data Connectivity services to

    integrate external data, basic search services and workflow services.

    Microsoft SharePoint Server 2010: SharePoint Server 2010 is a superset of SharePoint Foundation 2010

    that adds enterprise content management and enterprise search capabilities as well as support for using

    InfoPath forms, Access services, social networking features, community features and Dashboards.

  • 8/3/2019 Share Point 2010 Development for Developers


    Although SharePoint Server 2010 is built largely on SharePoint Foundation 2010, its a separate product

    using it requires purchasing a license.

    SharePoint Online: A Microsoft-hosted version of SharePoint technology, this version lets both users and

    developers use SharePoints functionality without installing any on-premises SharePoint software.

    SharePoint provides great opportunities for application development at all levels of the software

    development stack. Being built upon ASP.NET and Windows Server platforms allows SharePoint to expose

    infrastructure features and inherent points of extensibility to application developers.

    SharePoint Developer Tools: SharePoint Designer and Visual

    Studio 2010

    SharePoint Designer and Visual Studio 2010 are two tools that can be used (together or separately) to

    customize or develop SharePoint solutions.

    SharePoint Designer 2010 is the tool of choice for the rapid development of SharePoint applications.

    Using SharePoint Designer, advanced users and developers alike can rapidly create SharePoint solutions in

    response to business needs. Advanced users can compose no-code solutions that encompass a variety of

    common scenarios, from collaborative sites and web publishing to Line-Of-Business data integration,

    business intelligence solutions, and human workflows, all leveraging the building blocks available in

    SharePoint in an easy to use environment. In addition, developers can use SharePoint Designer 2010 to

    get a quick start on SharePoint development projects. As SharePoint Designer works in a connected

    mode, meaning you must be connected to a SharePoint site, all SharePoint artifacts created by

    SharePoint Designer, such as SharePoint pages and content types, are stored in the content database.

    This concept might be new to ASP.NET developers and cause some confusion. To understand why

    SharePoint stores some artifacts in the database you need to understand the difference betweencustomized and uncustomized files in SharePoint.

    Uncustomized Files

    When you create a new SharePoint site in a site collection, SharePoint provisions instances of its files into

    a content database that resides on the file system. The files on the file system are called templates.Alone, they are not very useful because they are not mapped to any specific URL and therefore cannot be

    directly accessed with a browser. The instances of the files in the content database are merely added to

    the site. When ASP.NET receives a request for a file, it first locates it in the content database. The entry in

    the content database tells ASP.NET that the file is actually based on a file on the file system and, therefore,

    ASP.NET retrieves the source of the file on the file system when it constructs the page.

    This is how most files start in a SharePoint site. They are called uncustomizedfiles files that reside onthe file system and not in the content database. The only thing that resides in the content database is an

    instance of the uncustomized file that registers the file in the site.

    One thing to note is that there can be multiple instances of a file in a site collection's content database, or

    content databases, all referencing the same file. This is how the master page included with

  • 8/3/2019 Share Point 2010 Development for Developers


    SharePoint, v4.master, is implemented. Every SharePoint site starts with an uncustomized instance of the

    v4.master page. If an environment contained 100 SharePoint sites created with the Blank Site template,

    and no customizations had been made, there will be 100 uncustomized instances of the v4.master page in

    the various content databases, yet there would be only a single v4.master page on the file system.

    Customized Files

    The other type of file is a customizedfile. A customized file is one in which the source of the file livesexclusively in the site collection's content database. How can a file become customized? If you modify the

    file in any way through the SharePoint API, the source of the new page is saved in the content database.

    This includes SharePoint Designer 2010, which uses the SharePoint API via RPC and web service calls to

    change files in sites. When the file is requested, ASP.NET first finds the file in the content database. The

    entry in the database tells ASP.NET whether the file is customized or uncustomized. If it is customized, it

    contains the source of the file which is used by ASP.NET in the page contraction phase.

    A file can start as an uncustomized instance and become customized. For example, after a site has been

    created, someone can open the site in SharePoint Designer 2010 and make a few changes to the

    v4.master page. When the file is saved, it changes from uncustomized to customized. This system enables

    SharePoint to store only a single instance of a file template on the file system regardless of how many

    sites implement it, while at the same time enabling site-by-site customizations of the file.

    Andrew Connell has written a great article for Windows SharePoint Services V3 which can be found

    here: The concept of customized vs.

    uncustomized files hasnt changed in SharePoint Foundation 2010 or SharePoint Server 2010 so the

    content of that article is still valid.

    Visual Studio 2010

    Visual Studio 2010 uses a different approach than traditional SharePoint design tools. First of all, VisualStudio targets developers writing code as opposed to SharePoint Designer which targets the Power User

    or breadth developer. Secondly, Visual Studio works in a disconnected mode (Note: Visual Studio 2010

    must be installed on the same machine as SharePoint 2010) which means that the project output, such as

    dlls, files, etc., is stored on disc and packaged into a SharePoint solution package (WSP) file

    (seeDeploying Solutions to SharePoint). This enables full application lifecycle management capabilities,

    such as source control and daily builds.

    Because Visual Studio 2010 offers visual designers, packaging and deployment support, project and item

    templates, and project and tool extensibility, you might be wondering when to use which tool