SharePoint maintains a high-level architecture that is made up of a number of components (see Figure 1).
You first install the core software on Windows so you can create
SharePoint farms. A SharePoint farm is, in essence, one or more servers
that make up your SharePoint instance. As a developer you should
understand the three-tiered structure and roles of the SharePoint farm
architecture, which includes a Web server role (a fast, load-balanced,
lightweight server that responds to user requests and loads Web pages),
Application server role (which provides the service features for
SharePoint such as Excel Services), and Database server role (which
stores content and service data). Your apps may interact with any one or
all of these server roles.
You can have a standalone server acting as the entire farm (for example, all the components listed in Figure 1
installed or working on one machine). For testing and light workloads,
this configuration might be adequate, depending on the hardware
specifications. For larger organizational deployments, inclusive of
failover and redundancy, a one-server farm is not adequate. However, the
Windows operating system is your underlying install base —
specifically, Windows Server 2008, 2008 R2, and Windows Server 2012.
SharePoint heavily leverages SQL Server as its underlying content
database and ASP.NET/IIS as the application service server. You can then
install either SharePoint Foundation (the free version) or SharePoint
Server (which is loaded with enterprise-grade features), on top of which
you would build and install your customizations. Or, as an alternative
to installing SharePoint Foundation or SharePoint Server, you can sign
up for Office 365, which provisions and manages the underlying
infrastructure for you but still gives you the power of programmability.
SharePoint Installation Types
When you install SharePoint, you can
choose different types of deployments and installation types. There are
three main ways to install and use SharePoint.
SharePoint Foundation
SharePoint Foundation ships as a free,
downloadable install and represents the foundational parts of
SharePoint. It includes a number of features such as security and
administration, user and Team site collaboration, and a number of apps
(such as document libraries and lists). In essence, it provides a
baseline set of features that enable you to get started with both using
and developing for SharePoint.
Although the functionality that ships in
SharePoint Foundation is less broad than that which ships in SharePoint
Server, downloading and installing SharePoint Foundation costs you
nothing. You can get up and running very quickly with this version and
begin your development work using it. In SharePoint 2013, though, you
also have the ability to create SharePoint Online sites very quickly —
and have a rich development model there as well.
SharePoint Server
SharePoint Server offers a wealth of
features that extend upon those offered in SharePoint Foundation. These
features include additional app types, Office server-side services such
as Word and Excel Services, enhanced search versions, enhanced BI, and
much more.
The following list provides a sampling of some of the services available in SharePoint Server:
- Access Services: Allows creation of
new Access service applications using the Access 2013 Preview client.
View, edit, and interact with Access Services databases in a browser.
- Access Services 2010: Allows
continued maintenance of SharePoint 2010 Access service applications by
using Access 2010 clients and Access 2013 Preview clients. Does not
allow users to create new applications.
- App Management Service: Allows you to install apps from the internal app catalog or the public SharePoint store.
- Business Data Connectivity: Access line-of-business data systems.
- Excel Services: View and interact with Excel files in a browser.
- Machine Translation Service: Performs automated machine translation.
- Managed Metadata Service: Access
managed taxonomy hierarchies, keywords, and social tagging
infrastructure as well as content type publishing across site
collections.
- PerformancePoint: Provides the capabilities of PerformancePoint Services.
- PowerPoint Conversion: Converts PowerPoint presentations to various formats.
- Search: Crawls and indexes content and serves search queries.
- Secure Store Service: Provides single sign-on authentication to access multiple applications or services.
- State Service: Provides temporary storage of user session data for SharePoint Server components.
- Usage and Health Data Collection: Collects farm-wide usage and health data and provides the ability to view various usage and health reports.
- User Profile: Adds support for My Sites, profile pages, social tagging, and other social computing features.
- Visio Graphics Service: Views and refreshes published Microsoft Visio diagrams in a Web browser.
- Word Automation Services: Performs automated bulk document conversions.
- Work Management: Provides task
aggregation across work management systems, including Microsoft
SharePoint Products, Microsoft Exchange Server, and Microsoft Project
Server.
- Microsoft SharePoint Foundation Subscription Settings Service: Tracks subscription IDs and settings for services that are deployed in partitioned mode. Windows PowerShell only.
You can also choose to purchase the
Internet-specific edition, SharePoint for Internet Sites, which provides
rich publishing templates and workflow that you can use to create and
deploy SharePoint sites to the wider Web (for example, building a
scalable SharePoint site for public, anonymous access).
Office 365
Office 365 has emerged as a third, fully
cloud-hosted model for SharePoint — as opposed to hosting your own farm
in your own on-premises Data Center. It has also become a great place
where you can develop rich applications (both as SharePoint-hosted and
cloud-hosted apps) and scale without the cost of managing the
on-premises infrastructure. It doesn’t have all the same services and
features as SharePoint Server, but does carry with it some great
development capabilities.
As a developer, you have the capability to
customize any of the SharePoint editions, whether it’s SharePoint
Foundation, Server, or Office 365. For example, beyond thematic or
branding customizations, you can also develop and deploy custom
solutions to each of these SharePoint versions. There are .NET
applications that you build using C# or Visual Basic and then deploy
into SharePoint as .WSPs or .APPs, or there are lighter-weight apps such
as HTML5 and JavaScript apps that you can also deploy.
SharePoint 2013 Capabilities
A default set of capabilities (or
features) is built into SharePoint that enables you to take advantage of
the platform without doing any development. You can also use or extend
these core capabilities when building your apps. Microsoft has
historically referred to these capabilities as workloads.
These workloads provide a way to talk about the different capabilities
of SharePoint coming together, and you should see these workloads as not
only representing a core set of related applications but also as
opportunities for your application development.
For those who are experienced SharePoint
developers, you’ll remember that Microsoft described the core
capabilities for the SharePoint through workloads (seen in many
100-level presentations on SharePoint). In SharePoint 2010, these
workloads were:
- Sites: Representing the different types of sites available for use and the features within these sites
- Communities: Representing the community and social features such as blogs and wikis
- Content: Representing core enterprise content management features
- Search: Representing the search-driven features
- Insights: Representing business intelligence features such as KPIs
- Composites: Representing the ability to integrate external applications by using, for example, Business Connectivity Services
These previous workloads have not gone away in
SharePoint 2013; moreover, Microsoft has extended them to add more
features and provide tighter integration.
Table 1
lists a sampling of the core capabilities for SharePoint 2013. Those of
you who are experienced developers will see a lot of familiar areas
because a lot of what you had in SharePoint 2010 is still available in
SharePoint 2013, with a number of added areas. For example, note from
the services listed previously in the “SharePoint Installation Types”
section that Machine Translation Service, Access Services, App
Management Service, and Work Management Service are new to SharePoint
2013. Furthermore, rather than Office Web Apps being a service, it is
now a separate server product — which for IT pros will impact the design
of your SharePoint farm topology. Also, what was FAST search in 2010 as
a separate server product has been subsumed within SharePoint 2013 —
which is fantastic because it improves the search experience immensely
in this release. The whole movement to the cloud in general is a major
shift in the way of thinking about SharePoint development; it is
simultaneously exciting and challenging as developers need to think
about app design and deployment in different ways than before.
TABLE 1: Sample SharePoint Capabilities
CAPABILITY |
NATIVE FEATURES |
EXAMPLE EXTENSIBILITY |
Sites |
Sites is where you’ll predominantly find
the collaborative aspects of SharePoint. Sites contain an abundance of
features, including the capability to create, store, and retrieve data,
and manage, tag, and search for content, documents, and information. You
also have connectivity into the Microsoft Office 2013 client
applications through the list and document library. |
Sites, site templates, Apps for SharePoint, workflow, master pages, site pages |
Social |
Provides social and social networking
capabilities, newsfeeds, and profile searching and tagging, along with
the capability to search, locate, and interact with people through their
skills, organizational location, relationships, and rating of content. |
Search customization, rating and tagging capabilities, blogs, wikis, metadata tags |
Content |
Contains the capability to explore, search, and manage content using Web pages, apps, workflow, or content types. |
Apps for SharePoint, workflows, Word or Excel Services |
Search |
The ability to search content inside and
outside of SharePoint in a rich and dynamic way with real-time document
views through Office Web Apps. Also, the integration of information in
structured database systems and on-premises or cloud-based LOB systems
such as SAP, Siebel, and Microsoft Dynamics. |
SharePoint Search, Search customization, Business Data Connectivity (BDC) |
Insights |
Predominantly about BI and support, for
example, the capability to integrate Microsoft Access into SharePoint;
leverage Excel and SQL Server to access and display data on a Web page;
enable the use of dashboards and key performance indicators (KPIs) to
transform raw data into actionable information. |
Excel Services, Access Services, dashboards, BDC, PerformancePoint Services |
Interoperability |
Ranges from LOB integration to Office
integration through the new Apps for Office application model (think
HTML and JavaScript-fueled custom task panes that link to cloud services
instead of VSTO managed code add-ins) to custom solution development. |
BDC, Apps for Office, custom development |
Branding |
Changing the look and feel of your site through built-in template changes or more detailed and organizationally driven branding. |
Out-of-the-box configuration (for look and feel), master pages and customized Apps for SharePoint |
Each of the example capabilities in Table 1 offers many different development opportunities.
You will discover many more ways to develop for
SharePoint as your journey deepens and you become more familiar with all
the different facets of the SharePoint capabilities.
Site Collections and Sites
The site is the core artifact to
SharePoint and represents the starting point for developers; that is,
you can’t start developing until you have created a site collection. A
variety of site templates are available for you to use. Figure 2
shows a selection of default templates from which you can choose when
creating a new site collection. This example includes some of the
choices available for creating a new site collection within an Office
365 instance, but a similar set of templates are available within
SharePoint Foundation and Server. The ones in Figure 2
are only a subset of those available. To view the other ones, when
creating a new site collection in the new site collection dialog click
the Meetings, Enterprise, Publishing, or Custom tabs to see more. Each
of these tabs contains specific templates that you can use for those
purposes — for example, managing meetings, blogs, short-term document
workspaces, longer-term projects, and, of course, building custom
templates.
Because you need a SharePoint site as a starting
point, let’s first go ahead and create a SharePoint site. This exercise
assumes you have an Office 365 tenancy up and running. At the time of
writing, you could go to: http://www.microsoft.com/office/preview/en
and click the Try button, and then under the Enterprise category click
Try. You’ll then be guided through a short wizard to provision an Office
365 instance.
TRY IT OUT: Creating Your First SharePoint Site
To create a simple Team site within your Office 365 instance:
2. Click the Admin drop-down list and select SharePoint, which opens the SharePoint Administrator Center, (see Figure 3).
3. In the SharePoint Administration Center, click Site Collections — located on the left side of the screen.
4. Under the Site Collections tab, select New and then click Private Site Collection as shown in Figure 4.
5. In the new site collection dialog (shown in Figure 5),
provide a Title and a Public Website Address, select a Template (for
this example choose the Developer Site under the Collaboration tab),
leave the Time Zone to the default setting, add yourself as the
Administrator, and provide a Storage Quota and Server Resource Quota.
6. Click OK.
7. Wait a
couple of minutes while Office 365 provisions the new site using the
Developer Site template. When it’s done, click the link to your new
site, shown in Figure 6: https://mydomain.sharepoint.com/sites/dev.
The new site should look similar to Figure 6.
Go ahead and explore the site. You can click the live tiles at the top
of the site, click the links on the left-hand side of the site, add
subsites to this site collection, and so on.
How It Works
The baseline artifact that you created
here was a site collection. The site collection in this case was a
developer-specific site and represents the uppermost root site that
you’ll work from within SharePoint. You can now add default apps (such
as lists or document libraries), create and deploy Apps for SharePoint,
configure the look and feel of the site, and so on.
The site collection is a site that you can
customize and interact with. You grow your SharePoint site collection by
adding additional Websites to it. Any site you create underneath the
site collection is called a subsite. This might seem confusing, but just think of the site collection being the parent and the sites within that collection being the children. This is important because by default children sites inherit the parent site’s properties (such as permissions).
Creating the site collection is the most
fundamental development task within SharePoint; once you’ve completed
this, you’re ready to begin building apps. To do so, it helps to
understand the types of APIs that are available to you.
SharePoint 2013 APIs
After you create a new site collection,
you now have the fundamental parent object in place to begin coding
against. As a developer, you’ll want to understand what you can do with
this site now that it’s created. This requires a baseline understanding
of the available APIs and services. You’ll want to be most familiar with
two sets of object model levels: the server object model and the
client-side object model.
Server Object Model
The server object model is reserved for
full-instance SharePoint Foundation or SharePoint Server installations.
You essentially have carte blanche
access to the server when you install and host it yourself. It is also
the broadest of the available APIs within the managed SharePoint
classes. You can build many different types of applications using the
server object model for tasks such as document library or list creation
or manipulation, retrieving user information, site administration,
backup, taxonomy and metadata management, and so on. The bulk of the
server object model classes are available in the Microsoft.SharePoint namespace.
The server object model is available through a set
of assemblies that are deployed to the global assembly cache (GAC), so
you must deploy apps on the server for them to use these classes and
libraries. However, you can do quite a lot with them. For example, the
following code snippet sets the title and description for a list called
Tasks and then calls the Update method to update the changes:
SPList myTaskList = mySPTaskSite.Lists["Tasks"];
myTaskList.Title="Sales Task List";
myTaskList.Description="A list of sales tasks.";
myTaskList.Update();
Client-side Object Model
The client-side object model is also
available for your use in remote or client-side applications. These
applications could be .NET, Silverlight, or one of the new additions to
SharePoint 2013, the mobile API. This is significant because it provides
you with the ability to create and deploy apps that are not necessarily
dependent on server-side resources. For example, the following code
snippet shows a sampling of SharePoint client-side code. You can see
right away that the client-side object model looks somewhat different;
in this snippet, you’re setting the context for your SharePoint site,
loading it, and then calling the ExecuteQuery()
method — which executes everything that has been set before that line
of code (think of a more optimized, batch processing approach). The
final line of code sets the Text property of the lblSPLabel object (a label) to be the title of the SharePoint site.
ClientContext context = new ClientContext("http://MySharePointSite");
Web web = context.Web;
context.Load(web);
context.ExecuteQuery();
lblSPLabel.Text = web.Title;
JavaScript Object Model
SharePoint 2013 also has a JavaScript
object model. This is an extension to what is available in the
client-side object model and provides an opportunity for you to build a
broad variety of SharePoint-hosted apps that can further integrate with
HTML5, JQuery, and other Web technologies.
Moving Beyond the Models
Beyond the server object model and
client-side object model, many other ways exist that you can build
applications and solutions for SharePoint. For example, you can use a
rich set of OData and REST (Representational State Transfer) services to
interact with SharePoint data. Note also that the client-side object
model has many REST counterparts to ensure you have multiple ways to
build your Web apps. The REST services within SharePoint support both
Atom and JSON formats.
Within each SharePoint site that you create,
you’re going to find many different opportunities to create and program
against data. In the world of SharePoint, data can mean many different things, such as:
- Integrating with Access Services
- Interacting with SQL Server data
- Interacting with service endpoints through BDC to integrate with LOB and non-Microsoft systems
- Leveraging SQL Server Reporting Services or PerformancePoint Server to bring enhanced BI into your solutions
- Coding against data that might come from a SharePoint list where
users manually enter the list data, and you programmatically code
against it
To help with data programmability, you can use
both the server- and client-side object models, but WCF Data Services
are also supported within SharePoint. This enables you to interact with
data through a LINQ provider and use LINQ syntax in .NET or Silverlight
applications. For example, you can target both listdata.svc for list data or client.svc for accessing SharePoint entities beyond list data.
The preceding APIs represent a core set of ways in
which you can program against SharePoint — from the fully self-hosted
server instance to the cloud-hosted Office 365. Beyond these core APIs
and services, you’ll find you can programmatically interact with many of
the services that ship with SharePoint Foundation or Server. You’ll
also find that you can build and deploy cloud-hosted apps (whether to
Windows Azure or to other domains or Web technologies).
Many of you who will develop for SharePoint may
also administer certain aspects of your SharePoint site. This might mean
that you have to install and configure SharePoint, understand how to
upgrade some of your solutions from SharePoint 2010 to 2013, or even
create new Web applications or sites using the Central Administration
site functions. Because cases may occur where you want to leverage the
capabilities built into SharePoint Central Administration, the following
section provides an overview of interacting with SharePoint 2013 in
this manner.