Export (0) Print
Expand All

SharePoint Developer Building Blocks: Technologies for Creating SharePoint Applications (Part 2 of 2)

SharePoint 2010

Summary:  Read a high-level overview of SharePoint development and learn about the SharePoint developer building blocks in this two-part series.

In the previous article in this series, SharePoint Developer Building Blocks: Technologies for Creating SharePoint Applications (Part 1 of 2), I defined SharePoint applications. I identified several SharePoint capabilities that people find so valuable. I discussed developer scenarios, and provided examples of kinds of scenarios. In this article, I discuss SharePoint developer building blocks. What do you, as a developer, actually develop when you build applications for Microsoft SharePoint products and technologies?

Although the following table is presented in alphabetical order, not all building blocks have the same importance to you. This section lists several of the building blocks that should be called out separately because of their importance.

  • First, you have to learn about the server object model. You use this programming interface when you build Web Parts, workflows that incorporate custom actions, and event receivers. The managed client object model is based on the server object model. Much of what you learn about the server object model applies to the client-side object model.

  • Web Parts are the most common way to extend SharePoint. Learning to build Web Parts is a great way to start SharePoint development.

  • Workflows enable you to codify and standardize business processes, and are one of the essential tools for implementing certain scenarios. If you extend workflows using code, you use theserver object model .

  • Microsoft Business Connectivity Services (BCS) make data from outside the SharePoint deployment available to the SharePoint application.

  • Understanding Collaborative Application Markup Language (Collaborative Application Markup Language (CAML)) and LINQ to SharePoint are keys to building good SharePoint applications.

  • In addition to being end-user features of Microsoft SharePoint Foundation 2010, document libraries and list are programming resources for you as a developer. Often, when you design a software system, you must store configuration information that drives behavior of the application. You can store such information in hidden lists, and restrict access to users as necessary. This is most appropriate when you must enable non-developers to maintain the application configuration. Another approach is to store configuration XML files in a hidden, access restricted document library.

The following table lists the SharePoint developer building blocks that you can use to build a SharePoint application.

SharePoint 2010 Developer Building Blocks

Building Block

Description

SharePoint Foundation 2010

SharePoint Server 2010

SharePoint Enterprise 2010

Access Services

Publish Microsoft Access databases to SharePoint sites

X

Administration

Programmatically administer SharePoint Foundation 2010 and Microsoft SharePoint Server 2010

X

X

X

Alerts

Send email messages or SMS messages

X

X

X

ASP.NET Application Pages

Build web pages by using the Microsoft ASP.NET code-behind model

X

X

X

Business Connectivity Services

Bring external data into SharePoint deployments

X

X

X

Business Connectivity Services Client-Side API

Access Business Connectivity Services data from client computers

X

X

X

Collaborative Application Markup Language (CAML)

Declarative query language expressed as XML

X

X

X

Column Types and Field Types

Create domain definitions for data in lists and libraries

X

X

X

Content Types

Define prototypes for list items

X

X

X

Custom Actions

Create links, toolbar buttons, and menu items

X

X

X

Custom Views

Define view for lists and document libraries

X

X

X

Dashboards and KPIs

Web Part for reports, charts, and KPIs

X

Document Libraries

Storage for documents or files of any type

X

X

X

Document Metadata

Sophisticated document categorization

X

X

ECMAScript Client Object Model

Access SharePoint data from ECMAScript (JavaScript, JScript)

X

X

X

Event Receivers

Provide behavior when lists or libraries are updated

X

X

X

Excel Services

Load, calculate, and display Microsoft Excel workbooks

X

Excel Services ECMAScript Interface

Access the Excel Web Access Web Part control from JavaScript

X

Excel Services REST API

Access Excel workbook document parts or elements directly through a URL

X

Excel Services User Defined Functions

Write high-performance functions for use in server-side spreadsheets

X

Excel Web Services

Access Excel services programmatically by using Web services

X

Features

Unit of deployment

X

X

X

Health Rules

Codify how you monitor health in a large installation

X

X

X

InfoPath Forms Services

Enable Microsoft InfoPath 2010 forms to be completed in a browser

X

LINQ to SharePoint

Use LINQ to query SharePoint lists and document libraries

X

X

X

Lists

User editable storage of data

X

X

X

Managed Client Object Model

Access SharePoint data from client computers

X

X

X

Mobile Pages, Controls, and Adaptors

Brings SharePoint data to mobile phones

X

X

OData REST APIs

Provides REST access to SharePoint data by using the OData proposed standard

X

X

X

Office Client Managed Add-Ins

Enhance Office clients to use SharePoint data and documents

X

X

X

Open XML SDK

Use Open XML for document generation and transformation

X

X

X

PerformancePoint Services

Build dashboards, scorecards, reports, and key performance indicators

X

PowerPivot

Create business intelligence solutions

X

Sandboxed Solutions

The sandbox infrastructure isolates and shuts down bad code, preventing it from taking down the server farm

X

X

X

Search Customization

Enable search through varied content, including external content types.

X

X

Secure Store Service

Securely access legacy systems

X

X

Security

Ensure that sensitive information is available only to authorized users

X

X

X

Server Object Model

Server-side .NET Framework–based API for accessing data and content

X

X

X

Server Ribbon

Customize the ribbon in SharePoint

X

X

X

Service Application Architecture

Create shared services that can be consumed by multiple SharePoint applications

X

X

X

SharePoint Dialog Framework

JavaScript programming interface for creating dialog boxes and other client-side user interface elements

X

X

X

SharePoint Themes

Apply custom branding to a site or site collection

X

X

X

SharePoint Web Services

Access SharePoint data through Web services

X

X

X

Silverlight Web Parts

Create user interfaces that are better looking and easier to use

X

X

X

Site Definitions

Create, configure, and provision SharePoint sites

X

X

X

Site Pages

User customizable pages that conserve resources

X

X

X

Timer Jobs

Execute code at specific times or intervals

X

X

X

Variations

Tailor sites for different cultures, markets, and languages

X

X

Visio Services

Share and view Microsoft Visio drawings

X

Visual Studio SharePoint Tools Extensibility

Extend Microsoft Visual Studio 2010 to enable you to create custom solutions more quickly

X

X

X

Web-Based Distributed Authoring and Versioning (WebDAV)

Upload and download files efficiently

X

X

X

Web Parts

Web Parts and Web Parts pages enable users to customize their user interface. Building Web Parts is the most common way to extend SharePoint.

X

X

X

Web Services

Key component of building scalable, distributed, and loosely coupled SharePoint applications.

X

X

X

Windows Identity Foundation

Provides claims-based identity services based on trusted providers

X

X

X

Word Automation Services

Provides services to convert documents to and from various file formats

X

X

Workflows

Automate business processes using tasks and forms

X

X

X

Access Services

You can use Access Services in SharePoint Server 2010 to edit, update, and create linked Access 2010 databases by using an Internet browser or the Access client. You can use Microsoft SQL Server Reporting Services to produce formatted reports.

Visual How-to: Creating Web Databases with Access 2010 and Access Services

Video: The Access Show: Access 2010 demo of Access Services and web databases

White paper: Improving the Reach and Manageability of Microsoft Access 2010 Database Applications with Microsoft Access Services

Portal: Access 2010 Development

SDK: Use Access Services with SQL Reporting Services: Installing SQL Server 2008 R2 Reporting Services Add-In (SharePoint Server 2010)

Administration

The classes of the Microsoft.SharePoint.Administration namespace give developers tools for programmatically deploying, migrating, maintaining, and administering their SharePoint sites and SharePoint-based solutions.

SDK: SharePoint Foundation Administration

SDK: Microsoft.SharePoint.Administration

SDK: Administrative Object Model of Microsoft SharePoint Foundation

Alerts

Alerts provide a framework for automatically sending email messages or SMS alert results to SharePoint users. You can attach alerts to lists or list items. SharePoint Foundation 2010 provides a library of alert templates for common scenarios.

SDK: Building Block: Alerts

SDK: Alerts in SharePoint Foundation

SDK: Alerts Overview

SDK: Alert Object Model

ASP.NET Application Pages

To build a custom user interface with specific application logic (written in Microsoft Visual C# or Microsoft Visual Basic by using the ASP.NET code-behind model), you can use ASP.NET application pages (also known as .aspx pages), which are a special variety of ASP.NET pages.

Your .aspx page must integrate with an ASP.NET master page. The relationship between master pages and .aspx pages enable you to provide a consistent user interface across SharePoint sites and site collections.

Because they are traditional .aspx pages that can contain code-behind and be precompiled, they offer some performance advantages over SharePoint site pages.

You cannot use application pages to host Web Part zones or Web Parts.

One characteristic of .aspx pages is that you have several options about where you put Microsoft Silverlight controls. For certain users, you can exclusively provide Silverlight interfaces to large parts of the site. However, site maintainers can use the default SharePoint user interface.

SDK: Master Pages

SDK: Sites and Pages in SharePoint Foundation

SDK: SharePoint Page Types

MSDN: Creating Application Pages for SharePoint

SDK: Building Block: Pages and User Interface

SDK: Cascading Style Sheets Class Usage in SharePoint Foundation

Business Connectivity Services

Business Connectivity Services provide infrastructure so that you can define some methods (with specific prototypes) and bring data into SharePoint so that users can view and modify that data directly from SharePoint. External tables are called external content types or entities. You can use external content types as entities (as in entity/relationship theory).

Business Connectivity Services provides three basic mechanisms that you can use to bring external data into SharePoint:

  • You can connect to SQL databases. By default, SQL Server is supported. With effort, you can connect to Oracle or other varieties of database servers.

  • You can consume web services that expose methods that follow specific patterns for the method prototypes.

  • You can write .NET managed code (C# or Visual Basic) to connect to any variety of data. There are two ways that you can extend through code:

    • You can write .NET assembly connectors to enable users to create external content types to predefined schemas. The schemas cannot change without recompiling and redeploying.

    • If you build upon an underlying system that contains its own schema mechanism and definitions, you can write a custom connector that uses the underlying schema definition and lets users create external content types for any table in the underlying schema. This is, of course, more work than writing .NET assembly connectors.

External lists and external data columns are part of built-in user interface functionality that lets you show and maintain data in external content types. You can create external lists by using the web interface, Microsoft SharePoint Designer 2010, or Visual Studio 2010.

You can expose your external content types to the search engine so that users can find data in them. By default, you display data in profile pages. You can customize the page, or customize what happens when users clicks an item in the search results. For example, you could use a non-SharePoint site to display and maintain the item.

SDK: Business Connectivity Services Overview

SDK: Microsoft Business Connectivity Services (BCS) in SharePoint 2010

SDK: Business Connectivity Services: How-tos and Walkthroughs

SDK: Differences Between Using the .NET Assembly Connector and Writing a Custom Connector

SDK: How to: Create External Lists in SharePoint

SDK How to: Create an External Content Type Based on a SQL Server Table

SDK How to: Connect to an Oracle Database Using Business Connectivity Services

SDK How to: Create a SharePoint List with External Data Columns

Visual How-to: Creating a SharePoint 2010 Web Part That Can Read and Write Data to an External Data Source

Walkthrough: Creating an External List in SharePoint by Using Business Data

Video and hands-on lab: Accessing External Data with Business Connectivity Services in SharePoint 2010

Blog: Walkthrough of creating a SharePoint 2010 external list using Visual Studio 2010

Blog: Searching External Data in SharePoint 2010 Using Business Connectivity Services

Business Connectivity Services Client-Side API

By using the Business Connectivity Services client-side API, you can create applications that have Create, Read, Update and Delete (CRUD) functionality for an external content type. When building Microsoft Office managed add-ins, a convenient way to present the user interface is by using task panes or action panes. This lets users interact with Business Connectivity Services data while they continue to work in their document or spreadsheet.

The Business Connectivity Services client-side API provides a means for client applications to access data from Business Connectivity Services. Further, you can configure Business Connectivity Services so that you can take the data offline. When the client computer comes online again, changes are synchronized through Business Connectivity Services by using conflict resolution if it is necessary. The Business Connectivity Services client-side API is most often used within Office 2010 client managed add-ins, although it can be used from any .NET Framework–based application.

You can take the data offline so that users can continue to review and modify the data in a cache. If an offline user modifies data in such a way that it conflicts with modifications made by another user, you can write code to resolve those conflicts, and present appropriate options to users.

SDK: Creating Advanced Code-Based Solutions Using Business Connectivity Services

SDK: How to: Show External Data in Word Using Content Controls

Blog: Overview of business connectivity services Advanced Code-Based Solutions

Collaborative Application Markup Language (CAML)

Collaborative Application Markup Language (CAML) is an XML based query language that lets you specify filters, sort order, and more. You can specify exactly which fields in each item that you want to retrieve. This lets you control the size of the query results.

Although there are certain circumstances where you can use LINQ to SharePoint instead of CAML for querying, CAML is still relevant inSharePoint 2010. You use CAML when querying using the managed client object model. When using the managed client object model, if you filter list items by using LINQ instead of CAML, in the underlying system, the filtering happens after all items are returned. This can result in using more CPU and memory resources on the server than necessary.

SDK: Collaborative Application Markup Language Core Schemas

SDK: Introduction to Collaborative Application Markup Language (CAML)

Column Types and Field Types

Column types and field types enable you to define rich metadata for standardized fields and columns in SharePoint lists. You can define a site column (in a site column gallery) of a specific data type that you can use throughout your site. This resembles defining domains in database schema design. It lets you ensure that columns in several lists use the same value space.

SDK: Custom Field Types

SDK: Columns

Content Types

You can define a content type that is a prototype of a list item. If you are using content types for a list, you can define that the list contain only items of one content type, or you can define that it can contain items of one of several content types.

SDK: Content Types

SDK: Introduction to Content Types

Custom Actions

Custom actions represent a link, toolbar button, menu item, or any control that you can add to toolbars or menus that appears in the user interface. You define custom actions by using custom action elements within Feature definition files. You can bind custom actions to list types, content types, file types, or programmatic identifiers (ProgID).

SDK: Custom Action

SDK: How to: Modify the User Interface Using Custom Actions

Custom Views

Defining custom views for SharePoint lists is a key tool in your toolkit. You can programmatically define custom views for specific users or scenarios so that data is presented in the most convenient form. A common use of custom views is to define the format of data for exporting to a spreadsheet for additional processing.

Note Note

A view in this context differs from a view in the context of SQL Server. In SQL Server, views are database constructs that define views into tables. In this context, views are visible tables presented in pages so that users can see a specific subset of the data in SharePoint lists.

Office Online: Create or change a view

SDK: SPViewCollection

SDK: SP.View Class

SDK: SP.ViewCollection Class

Dashboards and KPIs

A dashboard is a solution for information workers that merges personal, team, corporate, or external information, and provides single-click access to analytical and collaborative tools. It brings integrated views of company data resources to a single desktop. This provides access to key business information.

Getting Started: Introduction to the Business Intelligence Center

Office Online: Getting started with dashboards

Office Online: KPIs and Status Indicators

SDK: Development Scenarios with PerformancePoint Services

Document Libraries

SharePoint document libraries are special forms of SharePoint lists. They contain features such as the capability to keep major and minor versions of documents. They can restrict access to documents based on identity. You can define any number of columns that contain auxiliary information about each document in the library.

A very important feature of document libraries is that you can bind columnar data to metadata in the document. When you check the document out of the library, the metadata is copied to the document, where it can be maintained by the user. When the document is checked back into the document library, the updated metadata is copied back into the fields in the item in the document library.

Document libraries can contain files of any variety. Document libraries can contain nested folders. This makes a document library resemble a file system.

SDK: Building Block: Files and Documents

Document Metadata

Document metadata is custom data that SharePoint stores for each document in a document library. Your users can specify this data by using the SharePoint web user interface or using Microsoft Word. You can programmatically set this data in an event handler as users add documents to document libraries. Your users can then filter and find documents by using this data. In addition, you can access this metadata in SharePoint workflows, and alter workflow behavior based on metadata. You typically define document metadata by using content types. Workflows can interact with this data.

Document information panels are forms that are displayed within the client application. They contain fields for the document metadata. Document information panels enable users to enter important metadata about a file when they want, without having to leave the client application.

SDK: Metadata Navigation and Filtering in SharePoint Server 2010 (ECM)

SDK: Document Information Panel Overview in SharePoint Server 2010 (ECM)

ECMAScript Client Object Model

The JavaScript client object model is a variant of the managed client object model that you can use from JavaScript. You use the same methods and data types. The same programming model applies. As with the managed client object model, you control when you send network traffic to the server and from the server.

SDK: SharePoint 2010 Client Object Model

SDK: Differences Between Managed and JavaScript Object Models

Event Receivers

Event receivers enable you to write event handlers that are called when users add, delete, or modify items in SharePoint document libraries or lists, and at other times. You can deploy event handlers either as full-trust server farm solutions, or as sandboxed solutions.

Video: How Do I: Create Event Receivers for SharePoint 2010 in Visual Studio 2010

SDK: Building Block: Event Handling

SDK: Events in SharePoint Foundation 2010

SDK: Introduction to Events in SharePoint Foundation

SDK: Walkthrough: Add Feature Event Receivers

SDK: SPEventReceiverDefinition

Excel Services

Excel Services enables users to load, calculate, and display Excel workbooks on SharePoint Server 2010. There are four primary programmatic interfaces for Excel Services.

  • Excel Web Access. A viewer page and Excel Services Web Part that you can add to any Web Parts page in SharePoint Server 2010. Excel Web Access renders (in other words, creates the HTML for) live Excel workbooks on web pages and enables the user to interact with those workbooks.

  • Excel web services. Provides programmatic access.

  • JavaScript object model. Enables you to automate and customize and to drive the Excel Web Access control and help build more compelling, integrated solutions.

  • Representational State Transfer (REST) API. Enables access to workbook document parts directly through URLs.

To customize spreadsheets, you can extend Excel Calculation Services by creating Excel Services User Defined Functions.

Office Online: Excel Services

SDK: Excel Web Access

SDK: Excel Web Services

SDK: Excel Services ECMAScript (JavaScript, JScript)

SDK: Excel Services REST API

SDK: Getting Started with Excel Services

SDK: Excel Services Development Roadmap

Excel Services ECMAScript Interface

The JavaScript object model in Excel Services enables you to write code to automate, customize, and interact with Excel Web Access Web Part controls on pages. By using the JavaScript object model, you can build mashups and other integrated solutions that interact with Excel Web Access Web Part controls. It also enables you to add more capabilities to your workbooks.

SDK: Excel Services ECMAScript (JavaScript, JScript)

Excel Services REST API

The Excel Services REST API provides programmatic access to workbook document parts or elements directly through URLs.

SDK: Excel Services REST API

Excel Services User Defined Functions

Excel Services user-defined functions (UDFs) enable you to write high-performance functions in Microsoft Visual C or Microsoft Visual C++ for use in server-side spreadsheets.

SDK: Excel Services User-Defined Functions

Visual How To: Writing Asynchronous User-Defined Functions in Excel 2010

Visual How To: Creating Managed-Code UDFs for Excel Services

Excel Web Services

You can use Excel Web Services to access Excel Services programmatically.

SDK: Excel Web Services

Features

Features are units of deployment for SharePoint. Deploying Features in a large server farm ensures that the artifacts in the Features are installed on all servers. Features can contain templates, pages, list definitions, event handlers, workflows, JavaScript source files, and cascading style sheets files. Features can contain Feature receivers, which are event handlers that run when the Feature is installed, uninstalled, activated, deactivated, or upgraded.

SDK: Using Features in SharePoint Foundation

SDK: Feature Upgrade Overview

SDK: Walkthrough: Add Feature Event Receivers

Health Rules

SharePoint Health Analyzer monitors the health of a SharePoint Foundation deployment throughout server farms by applying health rules. A health rule is executable code that is deployed in a compiled assembly at the server farm level and registered with SharePoint Health Analyzer. When you register rules, timer jobs are created to run the rules. An item for the rule is added to the Health Analyzer Rule list under Review rule definitions in the Monitoring section of Central Administration.

SDK: Building Block: Health Rules

SDK: SharePoint Health Analyzer

InfoPath Forms Services

InfoPath Forms Services is a server technology that enables users to complete forms in web browsers. By managing forms in central locations, you can streamline business processes and improve relations with customers, partners, and suppliers.

Developer Center: InfoPath Developer Center

Office Online: Getting started with InfoPath 2010

TechNet: Plan InfoPath Forms Services (SharePoint Server 2010)

LINQ to SharePoint

LINQ to SharePoint is a LINQ query provider that enables you to write queries more naturally than when you are using CAML. It is most useful when you use the SharePoint Server object model.

One important characteristic of LINQ to SharePoint is that it uses an approach of generated code so that your code uses strongly-typed object models for accessing the data returned by queries.

For developers who are interested in functional programming, LINQ to SharePoint serves as a data source for doing pure functional transformations.

SDK: Managing Data with LINQ to SharePoint

Video and hands-on lab: Accessing SharePoint 2010 Data with Server-Side APIs

Blog: Query Composition using Functional Programming Techniques in C# 3.0

Lists

Custom lists in SharePoint sites provide locations to store data. By using SharePoint lists to contain data that you access programmatically is a very important building block for developers. In the section Comparing SharePoint Applications to Database Applications, I describe how you can use SharePoint lists for parts of your database.

SDK: Building Block: Lists and Document Libraries

SDK: SharePoint List Data Model

Managed Client Object Model

The managed client object model provides access to SharePoint data from external .NET Framework–based applications. This API is also known as the client-side object model (CSOM).

The managed client object model has three basic uses:

  • Managed .NET-connected applications. You can use the managed client object model from most .NET Framework–based applications. This includes rich client applications that run on user computers, or as parts of the .NET Framework–based server applications. You could write a Windows Presentation Foundation (WPF) real-estate management application that runs on client computers and pulls information from SharePoint Server by using the managed client object model. You could also improve traditional ASP.NET applications to pull data by using the client object model.

  • Silverlight Web Part. Code within Silverlight controls can use the client object model.

  • HTML Web Part. You can use JavaScript versions of the client object model. It has exactly the same semantics, except that you use JavaScript programming interfaces.

Important note Important

When you are using the managed client object model to query for items in lists, you should always form your queries using CAML, not LINQ. If you use LINQ, there is a performance consequence that is relational to the total number of items in the list. In contrast, when using the server object model, we recommend using LINQ to SharePoint instead of CAML.

A common activity for client-side code is to upload and download documents and files in SharePoint document libraries. In the managed client object model, the OpenBinaryDirect method and the SaveBinaryDirect method use Web-Based Distributed Authoring and Versioning (WebDAV) for uploading and downloading files. Without building your own custom Windows Communication Foundation (WCF), WebDAV is the most efficient way to upload and download files.

SDK: SharePoint 2010 Client Object Model

Technical article: Using the SharePoint Foundation 2010 Managed Client Object Model

Technical article: Using the SharePoint Foundation 2010 Managed Client Object Model with the Open XML SDK 2.0

Video and hands-on lab: Accessing SharePoint 2010 Data with Client-Side APIs

Mobile Pages, Controls, and Adaptors

SharePoint Foundation 2010 provides mobile pages and mobile controls that are separate from the pages and controls that you see from desktop computers and portable computers. Mobile browsers can access certain Web Parts by means of mobile Web Part adapters.

SDK: Building Block: Mobile Pages, Controls, and Adapters

OData REST APIs

SharePoint 2010 publishes data as resources that are addressable by URIs using the OData protocol. You can access and change data by using standard HTTP verbs of GET, PUT, POST, and DELETE. OData uses the entity-relationship conventions of the entity data model to expose resources as entities that are related by associations.

SDK: SharePoint Foundation REST Interface

Office Client Managed Add-Ins

Office client managed add-ins give you a way to extend Office client applications and integrate them more deeply with SharePoint Foundation and SharePoint Server. Building Office client managed add-ins is an effective way to make the features of the SharePoint application discoverable and easy to use for end users. Deep integration of SharePoint data with Microsoft Word documents or Excel spreadsheets results in applications where you have only one version of your important data, helping to prevent decisions based on stale data.

You can access SharePoint external content types through thebusiness connectivity services client-side API . You can access data and documents stored in SharePoint lists and documents by using the managed client object model.

Developer Center: Office Developer Center

Developer Center: Office Development with Visual Studio

Video: Developing with Office 2010

Open XML SDK

Most SharePoint users make extensive use of document libraries, and most documents in document libraries are stored in the Open XML file format. Prior to the advent of Open XML, it was difficult to write code that directly accessed the contents of documents, but with theOpen XML SDK you have server-hardened tools to query and transform Open XML documents. Using Open XML from SharePoint applications opens up new scenarios. You can generate many documents, and automatically convert those documents from one format to another. You can query the contents of existing documents and bring that content and data to users in new and interesting ways. For example, a product design team might use specific document templates for specifications, and each section of the specification may follow conventions that report the status of the specification. You could then write an application to process all specifications for a project, and generate reports for management that show the overall status of the specification writing process.

Combining the power of the Open XML SDK with the power of Word Services, you can implement many server-side scenarios with high performance.

Prior to the advent of Open XML, customers sometimes tried to solve server-side document processing needs using Office Automation. Automating Microsoft Office applications on servers presents a set of well-known issues. The solution is to use SharePoint 2010 and the Open XML SDK.

A common pattern for document generation in SharePoint 2010 is to generate them into a SharePoint document library. Then, if it is necessary, you can use Word Automation Services to update fields in the document, or to import altChunk content.

Developer Center: Open XML Formats Resource Center

External link: ECMA 376-2

External link: ISO/IEC 29500-2

KB article: Considerations for server-side Automation of Office

Blog: Eric White's Blog

Blog: Brian Jones’ Blog

Blog: How to Use altChunk for Document Assembly

PerformancePoint Services

PerformancePoint Services in SharePoint Server 2010 is a performance management service that you can use to monitor and analyze your business. It provides tools for building dashboards, scorecards, reports, and key performance indicators (KPIs). Integrated analytics help employees move quickly from monitoring information to analyzing it and, when it is suitable, sharing it throughout the organization.

SDK: Development Scenarios with PerformancePoint Services

PowerPivot

PowerPivot gives users the power to create compelling self-service business intelligence solutions, supports sharing and collaboration on user-generated business intelligence solutions, and enables IT organizations to increase operational efficiencies through Microsoft SQL Server 2008 R2–based management tools.

MSDN: PowerPivot Overview

External: PowerPivot.com

Sandboxed Solutions

Sandboxed solutions are one approach to solving scalability problems when SharePoint users must have specialized solutions built. If every developer knew all best practices, followed them religiously, and always wrote perfect code, this would not be a problem. However, code is not perfect, and bugs in code that runs with server farm administrator privileges can bring down the server farm. By using sandboxed solutions, an infrastructure watches code for thrown exceptions, and monitors memory and CPU use, among other things. The misbehaving code is stopped, and not the server farm.

SDK: Sandboxed Solutions in SharePoint 2010

SDK How to: Creating Sandboxed Workflow Actions

Video and hands-on lab: Sandboxed Solutions for Web Parts in SharePoint 2010

Search Customization

Secure Store Service

Secure Store Service is a claims-aware authorization service that provides storage and mapping of credentials such as account names and passwords. It enables you to securely store data that provides credentials that are required for connecting to external systems and associating those credentials with a specific identity or group of identities.

SDK: Secure Store Service

SDK: How to: Use Secure Store Service to Connect to an External System

Security

Security features of SharePoint Foundation 2010, the underlying ASP.NET and the .NET Framework, help give you protection from unauthorized changes to your data, whether deliberate or unintended, and help ensure that sensitive information is available only to those authorized to see it.

SDK: SharePoint Foundation Security

Server Object Model

The SharePoint server-side object model enables you to write programs to access SharePoint lists and document libraries, site collections, sites, and other resources. Although the object model is very large, it is not difficult.

When you are developing for SharePoint, things can become complex. You may be developing a Web Part, an event receiver, or code that runs as part of a workflow. In all these scenarios, you write code that uses the server object model. This means that your edit/compile/execute cycle is more complex. With each compilation, you may have to reinstall a SharePoint Feature, cycle Internet Information Services, or connect to another process for debugging

. Dealing with those issues while learning how the server object model works is not desirable. Instead, when I was learning the server object model, I built small console applications that used the server object model. I executed those console applications directly on the server. When writing more complex code that would eventually end up in a Web Part, I factored the code so that the code that used the server object model was isolated in one or several classes in my application. I factored code that used the Open XML SDK into its own set of classes. This gave me a quick edit/compile/execute cycle for both the Open XML code and the server object model code. Then, after all constituent parts are developed, it is easy to build and deploy a Web Part that uses the debugged code.

Code that uses the server object model can run with server farm administrator permissions or as a sandboxed solution. By using sandboxed solutions, you have access to a subset of the API that is available to code that is running with server farm administrator permissions.

You can divide the server object model into three hierarchies:

SDK: Server and Site Architecture: Object Model Overview

SDK: Essential SharePoint Programming Tasks

SDK: Using the SharePoint Foundation Server-Side Object Model

SDK: Basic Object Model Tasks in SharePoint 2010

SDK: Rich Media Programming Model in SharePoint Server 2010 (ECM)

SDK: Document Management Programming Model in SharePoint Server 2010 (ECM)

SDK: Records Management Programming Model in SharePoint Server 2010 (ECM)

SDK: Metadata and Taxonomy Programming Model in SharePoint Server 2010 (ECM)

SDK: Publishing Programming Model in SharePoint Server 2010 (ECM)

SDK: Sandboxed Solutions in SharePoint 2010

Video and hands-on lab: Accessing SharePoint 2010 Data with Server-Side APIs

Server Ribbon

Customizing the SharePoint 2010Server ribbon enables you to give an intuitive and powerful user interface to the SharePoint application. The key point behind customizing the ribbon is to make features and capabilities of your custom SharePoint application discoverable to users. Customizing the ribbon is comparable to customizing the ribbon for the Office client applications.

SDK: Building Block: Server Ribbon

SDK: Server Ribbon in SharePoint Foundation

SDK: Architecture of the Server Ribbon

SDK: Customizing the Server Ribbon

Video and hands-on lab: Creating Dialogs and Ribbon Controls for SharePoint 2010

Service Application Architecture

The service application architecture enables you to create robust and scalable shared services that can be consumed by multiple SharePoint applications.

SDK: Service Application Framework

SDK: Service Application Framework Architecture

Video: SharePoint 2010 Service Application Architecture

Video: Creating Custom Service Applications

SharePoint Dialog Framework

When building Web Parts or application pages, you may need to display a dialog box of one sort or another.

SDK: Walkthrough: Customizing the PWA Ribbon and Accessing the JS Grid

Video: SharePoint 2010 UI Features

Blog: How to Display a SharePoint Dialog from Ribbon Button and Get Selected Item Context

Video and hands-on lab: Creating Dialogs and Ribbon Controls for SharePoint 2010

SharePoint Themes

Themes, which are important when branding a SharePoint site, provide quick and easy methods to apply colors and fonts to sites in SharePoint 2010. A change in theme cause the color of most page elements, such as background images, text, and hyperlinks, to change. The fonts that are used for some page elements, such as titles, also changes.

TechNet: Themes overview (SharePoint Server 2010)

SharePoint Web Services

SharePoint has long provided a set of Web services to enable client interaction with SharePoint deployments. Some of these are designed specifically for data retrieval and other services include some data retrieval services. The APIs of these data-providing Web services are still supported for backward compatibility and interoperability with web service clients. For reasons of both performance and ease, we recommend that you use either the client object model or the OData REST APIs to query SharePoint data.

SDK: SharePoint Foundation 2010 Web Services

SDK: WebSvcLists

SDK: WebSvcWebs

SDK: WebSvcsites

SDK: WebSvcSiteData

SDK: WebSvcDspSts

Interoperability documentation: SharePoint Products and Technologies Protocols

Instead of using Web services, see the following:

SDK: SharePoint Foundation REST Interface

SDK: SharePoint 2010 Client Object Model

Technical article: Using the SharePoint Foundation 2010 Managed Client Object Model

Technical article: Using the SharePoint Foundation 2010 Managed Client Object Model with the Open XML SDK 2.0

Video and hands-on lab: Accessing SharePoint 2010 Data with Client-Side APIs

Silverlight Web Parts

Silverlight Web Parts are an important tool for building the best user interfaces. There are times when nothing but Silverlight will do.

Code sample: SharePoint Foundation 2010 Code Samples

Video and hands-on lab: Creating Silverlight User Interfaces for SharePoint 2010 Solutions

Site Definitions

A site definition is a set of files that includes a master XML configuration file that is stored on all front-end web servers. A site definition provides the basic blueprint for how sites look, what lists they include, their default navigational structures, and so on.

SDK: Site Types: WebTemplates and Site Definitions

Site Pages

Site pages provide an efficient means (for both storage and CPU time) to allow for hundreds of thousands of web pages where many are the same and some are customized. Unlike a traditional ASP.NET application, a physical .aspx page does not have to exist for every site page on the server. SharePoint treats any site page that is not customized as a virtual file, which can enable only a few files to appear in many locations. This is one of the many aspects of SharePoint that gives it scalability. Without this capability, you must have far too many compiled .aspx pages for large sites. Management of that many pages is unwieldy.

SDK: Sites and Pages in SharePoint Foundation

SDK: SharePoint Page Types

Blog: Creating a SharePoint Site Page with Code-Behind Using Visual Studio 2010

Timer Jobs

Like a cron job, a timer job is code that runs at a specific time. An application may regularly have to process data in a SharePoint list, and perhaps modify data in an external system. You can write timer jobs for this that run at 1 A.M. every day.

SDK: Timer job reference (SharePoint Server 2010)

Variations

Variations enable you to customize sites for different cultures, markets, and languages. It is a feature that facilitates serving different content to different audiences. Variations can help serve different content based on the language of the user. In addition, variations can serve different content based on end-user devices, or any arbitrary difference that you decide, such as brand or level of user expertise.

SDK: Variations and Multiple Languages Sites in SharePoint Server 2010 (ECM)

Blog: Variations in SharePoint 2010

Visio Services

Visio Services is a service application that enables users to share and view Microsoft Visio web drawings. The service also enables data-connected Visio 2010 web drawings to refresh and update from various data sources.

SDK: Visio Services overview (SharePoint Server 2010)

Visual Studio SharePoint Tools Extensibility

The SharePoint tools in Visual Studio 2010 meet the requirements of many application development scenarios. However, you might discover cases in which they do not provide functionality that you or other developers require. In these cases, you can extend the SharePoint tools to create the functionality that you need.

SDK: Visual Studio SharePoint Tools Extensibility

Video: Getting Started with SharePoint 2010 Developer Tools in Visual Studio 2010

Web-Based Distributed Authoring and Versioning (WebDAV)

A common activity for client-side code is to upload and download documents and files. You may have to retrieve documents from SharePoint document libraries to client computers, or upload documents from client computers to SharePoint document libraries. You can use WebDAV directly. But an easy way to use WebDAV is to use the managed client object model. The OpenBinaryDirect() method and the SaveBinaryDirect() method in the client object model use WebDAV for uploading and downloading files. Without building your own custom WCF service, WebDAV is the most efficient way to upload and download files. Note that WebDAV is limited to accessing files, not data.

External link: RFC 4918

Web Parts

SharePoint is based on ASP.NET. It inherits several important aspects of ASP.NET. This includes the concepts of Web Parts pages, and Web Parts. The classes that represent SharePoint Web Parts derive from the appropriate ASP.NET classes.

Building SharePoint Web Parts accounts for more SharePoint developer hours than any other category (perhaps more than the rest put together). Today, more than ever, users expect good looking, intuitive, and powerful user interfaces, and developing Web Parts is often the most effective approach.

Web Parts can communicate with other Web Parts. For example, you can link them to enable parent/child form/list user interfaces when maintaining data.

AJAX Web Parts are a special category. When your optimal user interface requires it, you can take advantage of AJAX architecture.

Silverlight Web Parts are another special category. There are times when Silverlight is most appropriate. Personally, I think that Silverlight Web Parts in SharePoint are the future.

You can build Web Parts by using the ASP.NET code-behind model, either in sandboxed or full-trust mode.

On the client side, Web Parts can communicate with the SharePoint server by using the managed client object model, OData REST APIs, or web services. WCF is an option from within Silverlight Web Parts.

While you can build custom Web Parts, SharePoint 2010 provides many default Web Parts that are useful in designing custom solutions. Some of the more common SharePoint built-in Web Parts include the following.

Common Built-in Web Parts

Web Part

Links

List View Web Part

SDK: List Views

Blog: SharePoint 2010 List View Blog Series

Office online: About the List View Web Part

Image Web Part

Office Online: Image Web Part

Site Users Web Part

Office Online: Site Users Web Part

Chart Web Parts

Office Online: Introduction to the Chart Web Part

SDK: Web Parts in SharePoint Foundation

SDK: Microsoft.SharePoint.WebPartPages

SDK: Building Block: Web Parts

SDK: ConnectWeb Parts in SharePoint 2010

SDK: JS Grid Control

SDK: How to: Create a Basic JS Grid Control

Video and hands-on lab: Getting Started Building Web Parts in SharePoint 2010

Video and hands-on lab: Building Blocks for Web Part Development in SharePoint 2010

Video and hands-on lab: Creating Silverlight User Interfaces for SharePoint 2010 Solutions

Video and hands-on lab: Sandboxed Solutions for Web Parts in SharePoint 2010

Video: Creating a SharePoint 2010 Web Part That Can Read and Write Data to an External Data Source

Video: Advanced Web Part Development in SharePoint 2010

SDK: Cascading Style Sheets Class Usage in SharePoint Foundation

Code sample: SharePoint Foundation 2010 Code Samples

Web Services

When you build large distributed applications, the best practice is to couple them loosely by using ASMX web services or WCF services. You have to apply this same technique when you build large-scale SharePoint applications.

As an example, operational research often requires deployment of a sophisticated mathematical optimizer to arrive at an optimal or near optimal solution to some problem. This should be deployed on dedicated hardware and exposed through Web services.

In some cases, you may want to build client applications that use sophisticated server-side functionality that scales to the maximum extent. You may want to reduce extraneous network traffic to an absolute minimum. In these cases, the best solution often is to host WCF services on SharePoint Server. Code in this service can use the server object model with full server farm permissions, and supply the necessary functionality for the client application. As appropriate, when you build these kinds of services, you must perform attack surface analysis and threat modeling.

Developer Center: WCF Developer Center

Blog: Getting Started Building a WCF Web Service

Windows Identity Foundation

The claims-based identity model for SharePoint Foundation 2010 and SharePoint Server 2010 is built upon Windows Identity Foundation (WIF). Features of claims-based identity include the following:

  • Authentication across users of Windows-based systems and systems that are not Windows-based.

  • Multiple authentication types.

  • Stronger real-time authentication.

  • A wider set of principal types.

  • Delegation of user identity between applications.

When you build claims-aware applications, the user presents an identity to your application as a set of claims. One claim could be the user name, another might be an email address. The idea is that an external identity system is configured to give your application all the information that it needs about the user with each request, together with cryptographic assurance that the identity data that your application receives comes from a trusted source. Under this model, single sign-on is much easier to achieve.

Developer Center: SharePoint 2010 Security Resource Center

Developer Center: Windows Identity Foundation

Blog: Consuming a Claims-Enabled WCF Web Service as a SharePoint 2010 External Content Type

Word Automation Services

There are some tasks that are difficult in the Open XML SDK, such as repagination, conversion to other document formats such as PDF, or updating of field codes or the table of contents, fields, and other dynamic content in documents. Word Automation Services is a feature of SharePoint 2010 that can help in these scenarios. It is a shared service that provides unattended, server-side conversion of documents into other formats, and other important pieces of functionality. It was designed from the outset to work on servers and can process many documents reliably and predictably.

SDK: Word Automation Services in SharePoint Server 2010

Technical article: Developing with SharePoint 2010 Word Automation Services

Workflows

SharePoint workflows enable you to codify business process. Workflow logic can be very simple or very complex. End users can use workflows to build no-code business solutions. You can improve workflows with C# code that is called at appropriate times. You can deploy workflows as full-trust server farm solutions, or as sandboxed solutions. Examples of workflow use include claims processing, content approval, or purchasing processes.

SDK: Workflows in SharePoint Foundation

SDK: Microsoft.SharePoint.Workflow

SDK: Walkthrough: Use SharePoint Full-Trust Workflow Activities with Business Connectivity Services

Video and hands-on lab: Developing Business Processes with SharePoint 2010 Workflows

Developing SharePoint applications can be a fairly complex undertaking. If pages or Web Parts do not perform well, it can be difficult to determine the cause of the delay or resource consumption. SharePoint 2010 provides a developer dashboard that you can use to view performance metrics related to the page that is loading.

You can turn on the developer dashboard by running the following Stsadm command:

stsadm -o setproperty -pn developer-dashboard -pv OnDemand

SDK: SharePoint 2010 Development for ASP.NET Developers

SDK: Using the Developer Dashboard

Microsoft adopted the Web Content Accessibility Guidelines 2.0 (WCAG 2.0) for SharePoint 2010, and set a goal for Level AA. Becoming a W3C recommendation on December 11th, 2008, WCAG 2.0 defines the expectations of and the techniques deployed in well-built, accessible Web sites.

External link: Web Content Accessibility Guidelines 2.0

Blog: Accessibility and SharePoint 2010

There are a number of tools that you use to build SharePoint 2010 applications.

SharePoint Development Tools

Tool

Description

Visual Studio 2010

Visual Studio 2010 is the primary tool for professional developers onSharePoint 2010. It contains pre-configured project types to make it as easy as possible to write code for your scenario.

SharePoint Designer 2010

SharePoint Designer 2010 enables you to create no-code SharePoint solutions that encompass common scenarios, from collaborative sites and web publishing to line-of-business data integration, business intelligence solutions, and human workflows. You can use SharePoint Designer 2010 to get started with SharePoint development projects.

Visio 2010

Visio 2010 enables you and subject-matter experts to create SharePoint workflows by using drag-and-drop operations. You can then import them into SharePoint Designer 2010 for additional editing, and then execute them in SharePoint 2010.

SDK: SharePoint Foundation Development Tools

MSDN: SharePoint Development in Visual Studio

MSDN Magazine: Visual Studio 2010 Tools for SharePoint Development

Video: Getting Started with SharePoint 2010 Developer Tools in Visual Studio 2010

Download: Microsoft SharePoint Designer 2010 (32 bit)

Blog: SharePoint Workflow Authoring in Visio Premium 2010

Blog: Visual Studio SharePoint Development Blog

There are several ways to set up SharePoint 2010 development environments.

  • My favorite approach is to use Windows Server 2008 R2, and set up my development computer by using Hyper-V. Immediately after I install everything, I take a snapshot. This lets me to revert to this clean state if it is necessary, although in my experience, it rarely is. For the best experience, place the virtual hard disk drive on a different drive than where the host operating system resides.

  • You can install on a computer that is running Windows Server 2008 (or Windows Server 2008 R2) that is running directly on the server, not in a Hyper-V virtual machine. This can be an effective approach, although it loses the ability to revert to a snapshot.

  • You can install on a computer that is running Windows 7 64-bit or Windows Vista 64-bit. Some developers work for companies where they are prevented by policy from running server operating systems. Therefore, this can be a good solution. In addition, if I were starting a long development project that will take several months to complete, I would install SharePoint 2010 on my laptop so that I could develop at opportune times, and keep the ease of use of an end-user operating system.

SDK: Setting Up the Development Environment for SharePoint 2010 on Windows Vista, Windows 7, and Windows Server 2008.

Blog post: SharePoint development environments

Application Life Cycle Management (ALM) is the coordination of all aspects of software engineering—including the formulation and communication of business and technical requirements, code design and architecture, project tracking, change management, coding, testing, debugging, and release management—by using tools that support and track collaboration among and within work teams.

Resource Center: Application Lifecycle Management Resource Center

Video and hands-on lab: Development Life Cycle for SharePoint 2010

Video: Improving Software Development across the Lifecycle with Visual Studio 2010

With SharePoint Foundation 2010 and SharePoint Server 2010, SharePoint has evolved into a comprehensive development platform. Although many SharePoint applications are simple, SharePoint applications can very complex by using many building blocks, all working together. Careful design of your application is necessary to ensure that your application is robust and can scale up and scale out, and that the user interface of your application meets the needs of users.

Show:
© 2014 Microsoft