Professional Documents
Culture Documents
SharePoint ®
eMagazine
2010 Special
January 2010
A Software
TM Development
Network
Publication
SharePoint® eMagazine
2010 Special
Contents
Ready for 2010! 3
The SharePoint 2010 Enterprise 5
Customizing the SharePoint Ribbon 14
Visual Studio extensions or a manually build solution? 20
Working With Data in SharePoint Designer 2010 26
Sandboxed Solutions in SharePoint 2010 35
New ECM features in SharePoint 2010 45
Creating new Visual Experiences with Visio Services 52
How to guides - Visio Services 55
About DIWUG 56
A SharePoint User eXperience 63
Introduction to the Business Connectivity Services 67
SharePoint 2010 Client Object Models 73
Understanding Identity in SharePoint 2010 82
Happy Together in 2010 86
About SDN 87
SharePoint 2010 Chart Web Part 89
Enrich your SharePoint 2010 portal by integrating SAP applications 96
SharePointComic 102
Colofon
DIWUG SharePoint2010 eMagazine
January 2010
Publisher:
Dutch Information Worker UserGroup
Powered by SDN
First Edition, January 2010
Editors:
Marianne van Wanrooij (lead)
marianne.vanwanrooij@sdn.nl
Mirjam van Olst
mirjam.vanolst@sdn.nl
©2010. All rights reserved. No part of this magazine may be reproduced in any
way without prior written permission of Diwug/SDN or the author. All trademarks
mentioned in this magazine are the property of their respective owners.
SharePoint® eMagazine
2010 Special
Getronics 4
WinVision 13
KbWorks 19
Bergler 34
Connected Services 44
Avanade 62
WinVision 72
Sogeti 88
Laat informatie voor je
werken
Informatie wordt steeds crucialer voor een goede bedrijfsvoering. De eisen van mede
werkers, klanten en partners veranderen voortdurend. Effectief en efficiënt (samen)
werken vraagt om bedrijfsinformatie die altijd en overal toegankelijk en uitwisselbaar is.
Getronics Consulting levert advies en technische oplossingen, van visie en strategie
vorming tot implementatie en beheer, voor het optimaliseren van uw informatievoorziening
Getronicsconsulting.com
SharePoint® eMagazine
2010 Special
In this article we will discuss the different applications and improvements, based on a random
company which we will call “The SharePoint 2010 Enterprise”. Within this company we will discuss
eight personas who use SharePoint in their daily activities. The personas range from Jack the
developer to Huge the end user. These personas will help you to distinguish the different SharePoint
functional and technical areas and can assist you in choosing which areas to explore in more depth.
At the October convention, Microsoft presented the beta releases of Office 2010 and
SharePoint 2010 (pronounced SharePoint twenty ten). IT professionals and customers
alike described the 2010 release as “super awesome”. They commented: “Microsoft
really listened to us”. Microsoft not only increased the breadth of SharePoint, they
added many configuration possibilities and improved it’s customizability. This poses a
practical dilemma. There are so many things SharePoint has improved on: which areas
are relevant for you and where to start your discovery of SharePoint 2010?
Ribbon UI
SharePoint Workspace
SharePoint Mobile
Office Client and Office Web App Integration
Standards Support
Social Relevance
Phonetic Search
Navigation
Fast Integration
Enhanced Pipeline
To give you a good idea of all those improvements, we will discuss SharePoint 2010
applications within a fictive company, “The SharePoint 2010 Enterprise”. Within our
company we distinguish eight personas who we can all relate to. You can use these
personas to guide you through relevant improvements and functionality.
SharePoint® eMagazine
2010 Special
SharePoint® eMagazine
2010 Special
attended last month’s Gartner conference, which proved to him that SharePoint 2010
was becoming a dominant Microsoft web platform. He listened and agreed that social
media and search will become very important for future enterprise. He will coach Jack
and Remco to do some research on both topics.
Tags: Visual Studio 2010, Visual Studio SharePoint templates, Visual Studio
2010 Tools for SharePoint Development, developer dashboard, logging,
SharePoint solutions, sand box solutions, LINQ
Jack, the consultant.
Jack is advising management in implementing a document management solution. All
that valuable non-structured information is just stored on file servers, local hard drives
and personal e-mail boxes. Finding, retrieving and re-using information is severely
limited by the current situation. Jack tried to implement a document management
solution last year, but a study made clear that the company was not ready and
the available functionality was falling short. Routing documents to archives, meta
dating documents and defining policies was all possible, but the application felt not
yet mature. But with SharePoint 2010 it will be a whole new ball game. Advanced
document routing for supporting much more complex file plans and routing scenarios;
document sets in order to form an entity which consists of multiple documents (for
example: a loan application, which consists of a loan form, income statement and
general terms); expiration policies; centralized management of hierarchical taxnomies
and folksonomies and retrieval of records, even if the file name or file location has
been altered. By using the Business Connectivity Services, documents can be linked
to clients and backorders. This year, Jack has a good chance to make a real start with
document management. Maybe he can even use the new search, social networking
and meta dating facilities to start on a brand new knowledge management project
to organize user groups for each market the company operates in?!
Last year, IT focused on getting the back end systems’ processes right. This year, Jack
prefers to shift the focus and reap the benefits of those smooth business processes.
The company has a lot of different systems and the users spend a lot of time combining
information from those different systems. Jack wants to make a portal which will give
the users insight by presenting the business with financial information and reports. By
using composites, Jack wants to present the Sales department with a map of the sales
area where all the resellers are drawn onto this map. Each reseller could be presented
with a bar of indicators visualizing the sales volume of each reseller. By selecting the
product family filter, Sales can analyze which type of product is sold by whom. By
SharePoint® eMagazine
2010 Special
selecting an area or by drilling down, the Sales representative can analyze past and
present sales of every reseller. But wait, wouldn’t it be great to see what marketing
effort is undertaken locally? By displaying an Internet search query, looking for
planned expos and conventions in the local region, together with our financial data,
Sales can decide to step in the local marketing effort. A business connectivity service
connection to our order entry application enables us to search through the latest
orders of a specific reseller and even enter and write back new customer orders.
Tags: record center, document routing, ECM for the masses, BI for the
masses, business connectivity services, SharePoint & Fast Search, composites
& mashups, InfoPath services, managed metadata service.
Tech Eddy, the system owner
Tech Eddy is maintaining the current MOSS 2007 environments. He values the intro-
duction of separation of SharePoint development, test, acceptance and production
environments. But such a hassle to maintain all those different servers! Microsoft has
good news for Tech Eddy. They understood his problems and offer him far better
tooling and support with SharePoint 2010. From within System Center Operation
Manager (SCOM) he can monitor all these environments and analyze server health
problems. When Tech Eddy starts with SharePoint 2010, he immediately looks for the
central administration. All seems pretty familiar, but he notices the new structuring
of the services. The Shared Services Provider no longer exists. Instead, Eddy is looking
at a bunch of services with names like “Managed Metadata Service” and “User Profile
Service”. The improved service architecture of SharePoint makes SharePoint better
suited for large and secure deployments.
Tech Eddy is thinking of the accident which took place last month. The database of
his MOSS 2007 farm failed. Good backup and restore procedures ensured that he
was quickly back in business. However, he was not able to restore the latest content
because he could not reconnect to the content database with the last content
changes. At last, SharePoint 2010 will support these scenarios. He can connect any
content database without restoring it to the SharePoint environment. By connecting
to the content database he can browse it and restore single sites, lists and documents
which are stored in the content database.
At the top of the screen, the system is stating some problems. Tech Eddy is curious and
clicks on the message. He ends up in the health monitor, a proactive analyzing tool
which detects and prevents current and future problems/issues within the SharePoint
environment. The tool can make suggestions how to solve the issues and can even be
configured to solve the issues automatically. Could it have prevented a system failure
like the database problems of last month?
The content database of his current farm had become very large. It probably
contributed to the system’s failure. With those large CAD/CAM files, the database
was growing rapidly. By making using of the SQL 2008 file stream option to store
large files on disk and reference them from SQL, SharePoint 2010 should be able to
decrease the size of the content database substantially.
Tech Eddy is a heavy user of Powershell for maintaining his Windows and Exchange
servers (for example: maintaining active directory and exchange mailboxes). It would
be very convenient if he could do the same with SharePoint 2010. Curiously, he inves-
tigates and discovers that he can do all the same configurations for SharePoint 2010 in
the central admin or in administration pages of different site collections! It will take
him a couple of days, but Tech Eddy thinks that this investment is worth taking.
All these improvements are great, but how should Tech Eddy prepare to upgrade his
current MOSS environments and servers? Tech Eddy is searching TechNet and soon
discovers valuable information. A new cool feature is the ability to keep each Share-
Point Server in a farm on a different patch level. This will make maintaining, patching
and upgrading much easier to begin with. TechNet describes a couple of upgrade
paths. First he has to upgrade his current MOSS 2007 and WSS 3 environments to
SP2. The second step is running the upgrade checker and investigating the warnings
and suggestions. Tech Eddy can choose from doing an in place upgrade, database
SharePoint® eMagazine
2010 Special
attach upgrade or single click install upgrade. After the technical upgrade process,
Tech Eddy can let each user choose between the old interface and the new interface
(offering new functionality like the ribbon). Each user can choose for the improved
GUI by starting the option “visual upgrade”. Tech Eddy is convinced that SharePoint
2010 will be implemented this year and concludes that he has to write an upgrade
plan.
SharePoint® eMagazine
2010 Special
One month later, Maria is using SharePoint 2010. Why didn’t she have this tool much
earlier? The ribbon reveals all these wonderful abilities and actions. She can easily
create meeting workspaces and authorize individual users to access these workspaces
by using the ribbon. Maria sees how simple it is to add new documents to the sites.
First she had some difficulty with the approval process. But with Jack she designed
a workflow within Microsoft Visio 2010. Afterwards, Jack exported and opened this
workflow in SharePoint Designer where he configured each workflow step. One small
element could not be configured within SharePoint Designer, but Jack asked Mark to
open the workflow in VS 2010 and program a custom step within this workflow. Now
the workflow for the approval is made available in all the minute sites Maria creates.
She can use the workflow whenever she wants.
Most of the mail merge lists that Maria stored, were Excel files. Jack showed her how
easy it is to export these Excel files to SharePoint lists. Now Maria, and the rest of
the secretariat, can use those list all at the same time and they are even available on
Fridays when Maria works from home. Because of better office integration, those
SharePoint lists can easily be used for mail merge activities.
The Access application which Maria made, was upgraded to Access 2010. Maria
published the Access application to a SharePoint site and now all of the function-
ality is supplied by standard SharePoint functionality. When she deletes an attendee,
all linked information is discarded as well (cascade delete). All the forms she made
are functioning and Jack even corrected a form with SharePoint Designer after the
application had been published to SharePoint. For future congresses and workshops,
Maria can reuse the Access application by publishing the same application to new
SharePoint sites.
10
SharePoint® eMagazine
2010 Special
Huge phones the client and checks whether the order is in accordance with the wishes
of his most important customer. Talking with the client, he is reminded of last week’s
contract meeting. They agreed to adjust some of the terms regarding the contractual
guarantee period and replacement procedures. He opens the SharePoint Workspace
of this client and quickly finds the most recent contract. He alters the document and
renews the end date of the contract. Next time his computer is connected to the
Internet, the document changes are synchronized to the SharePoint customer site
and the expiration period of the contract is updated.
Huge comes home and connects his laptop to his wireless home network. The
changes he made earlier this day are synchronized to SharePoint and the ERP system.
He has made some phone calls and needs a service contract for a new customer.
He has to look for clients with existing requirements, but from past search experi-
ences he knows that this can be difficult. However, with SharePoint 2010, the out-
of-the-box search functionality will make his life much easier: full text search queries
will support wildcards, asterisks and Boolean expressions. In order to support less
query search, users can use tag clouds and drill down features (facetted search) which
are all supported out-of-the-box! But Huge notices an odd phenomenon. When he
searches the system, the documents he or his direct colleagues are working on, are
listed higher in the search ranking. Is SharePoint using information about his social
network to make a meaningful and user specific ranking of the search results? Huge
navigates to his My Site and discovers listings of documents he reacted on, documents
he created and sites he required access to. It is almost a grouping of his favorites for
the entire SharePoint environment and he did not have to do anything!
He starts working on a new sales document and decides he has to write a proposal,
but needs Maria to work with him. It is Friday and Maria is working from home. He
puts in a search query for Maria and finds her contact details. The present indicator
states that she is available and he starts an Office Communicator call (OCS) with
Maria. Huge uploads a first draft document and asks Maria to review the document.
Meanwhile, he will add a last chapter. They both open the document simultaneously
and are making alterations. SharePoint will take care of the versioning, merging and
displaying of the changes to them both in realtime! Huge is satisfied with the end
results and sends the draft document to his new client in order to discuss it by phone
tomorrow morning.
11
SharePoint® eMagazine
2010 Special
and they talked about upcoming compliancy legislation. Are contracts stored and
secured properly? Bob would like to get some monitors in place to give him more
insight regarding these questions. Arthur shows him some examples of usage and
audit reports. Bob decides to ask Arthur to include these reports in the pilots and
make a monthly report about the size of the environment, the usage and the audit
information about “disappeared” legal contracts and safeguards, preventing the
accidental change or destruction of vital information.
Tags: audit trail, usage reports, TCO, case studies, SharePoint licenses, legal
hold, records.
Arthur, the IT Architect
Anxiously, Arthur heard of all the marvels of SharePoint 2010. He supports the choice
for the Microsoft platform and SharePoint, but he has some questions based on his
elaborate experience. He knows that customizing standard software can be quite
difficult. A portal should be flexible and expandable though. Support of software
development and deployment strategy are key. Better support to roll out customiza-
tions through a development, test, acceptance and production environment is just as
important as the development tools themselves. Arthur is aware that Bob wants to
focus on the core business. Heavy investments in IT dedicated systems are possible,
but are there possibilities to outsource parts? Arthur discussed the need with Bob to
make a start with customer portals. Last year’s pilot proved that the authentication
and security requirements in these scenarios can become complex. Will SharePoint
2010 and Office 2010 provide better support for these scenarios?
Eddy explains to Arthur how the new SharePoint service applications can be used to
tighten security and to size SharePoint with greater ease and how it will support far
more complex and larger deployments. Arthur likes the concept of sharing services
among farms. Could the sharing of services, combined with for example claims based
authentication, be used for cloud computing scenarios? Arthur decides he wants to
take a firm interest in this subject!
Arthur makes a listing of all the different development tooling for SharePoint:
n Visio for developing graphics and visual designing workflows schemes.
n Excel for creating web based Excel sheets/graphs and interactive calculations
where end users can enter parameters (for example a maximum loan calculator).
n Access for creating database like applications for SharePoint (including macros,
dashboards, user role specific entry screens and cascade/delete linkages
between lists).
n SharePoint Designer for creating and customizing sites and lists, branding,
configuring workflows, creating Business Connectivity Services connections,
CAML queries and XSLT editing, site definitions (!) and even WSP’s.
n Visual Studio for creating custom web parts and other artifacts, Solutions,
features and custom workflow (activities).
Arthur thinks that Visio, Excel and Access can be used by power users. SharePoint
Designer can be used by consultants, interaction designers and developers and Visual
Studio can be used by developers.
12
SharePoint® eMagazine
2010 Special
GUI/WCM functionality. Users who attended the Las Vegas conference where enthu-
siastic and concluded that SharePoint 2010 has matured and has got far too many
functionality and different application to be mastered in depth by one individual.
Probably we will see a lot of area experts who will focus on different aspects and areas
within the SharePoint technology stack. In this article we used different personas to
give a broad overview of the new functionality and changes that are made to Share-
Point 2010. You can use this information to decide which SharePoint 2010 areas you
want to explore first.
In short we can conclude that SharePoint 2010 is a formidable web platform. The IT
research industry predicts a bright future and dominant role for SharePoint 2010.
13
SharePoint® eMagazine
2010 Special
Ribbon basics
Before we start let’s look at some terminology of the Ribbon. What is the Ribbon?
The Ribbon User Interface is a task oriented Graphical User Interface. It’s the central
control center which stays on top of the page and doesn’t scroll out of the view.
You can use different kind of controls in the Ribbon. These controls are the same as you
can use for the client Ribbon. Like the Button, CheckBox, ComboBox, DropDownList,
Label or TextBox. These are the well known basic Web Controls which won’t be
discussed here.
Other Controls you can use are:
n FlyoutAnchor; is a button with a down arrow which opens another menu or
collection of buttons when you click on it
n GalleryButton; is just like a regular button only it is designed to host an image
of any size (this one is not used in a out-of-the-box installation of SharePoint.
n Spinner; A control used to insert a value by typing or using the arrow keys to
cycle through the values.
n SplitButton; is used as both a button and a menu (e.g. the workflow button)
n ToggleButton; A button used to toggle between an on and off state.
The only client Ribbon control that is not out of the box for the SharePoint Ribbon
is the in-Ribbon Gallery Contol. But you can create/fake this control by using a drop
down grid or with buttons. Maybe in the next release it will make the feature list.
The Ribbon is fully extensible. You can add, modify or remove controls from the
Ribbon. Even the out of the box buttons can be removed. (If you like you can even
remove the complete Ribbon.) If you have created Custom Actions in WSS 3.0, after
an update they will automatically appear on the “Custom Commands” tab of the
Ribbon.
The Out of the Box (OOB) Ribbon is heavily cached and the controls added through
non-filtered the CustomActions are cached with the OOB controls. Non Filtered
Custom Actions are always on the Ribbon and need to be registered.
14
SharePoint® eMagazine
2010 Special
Controls added through filtered CustomActions are not cached. Filtered Custom-
Actions are controls that are pointed to specific registrationType and has a registra-
tionId assigned (e.g. 101 for a Document Library or a content type). Especially when
you have added your own security trimming you don’t want to cache the controls.
The Ribbon UI is defined in a XML file - the CMDUI.xml and contains the OOB site
wide Ribbon implementation and can be found at the location
<SharePointRoot>\TEMPLATE\GLOBAL\XML.
The structure of the XML is shown in the listing 1.
<CommandUI>
<Ribbon ...
<Tabs ...
<Tab ...
<Groups ...
<Controls ...
<Button ...
<ContextualTabs ...
<Templates ...
<RibbonTemplates ...
<GroupTemplate ...
15
SharePoint® eMagazine
2010 Special
<Group
Id=”Ribbon.Library.Actions”
Sequence=”50”
Command=”ActionsGroup”
Title=”$Resources:core,cui _ GrpConnect;”
....
Template=”Ribbon.Templates.Flexible2”
>
Remove a control
Removing a control from the Ribbon is easy do. Just add the CommandUIdefinition to
the location. Because the Control is not defined nothing will be shown in the Ribbon
for that particular Id. As an example: you want to remove the button “Connect to
Outlook” from the Library tab in the Actions group.
16
SharePoint® eMagazine
2010 Special
Replace a control
Replacing a button for another button seems simular to adding a button. If you
compare listing 1 and 5 you notice that the location of the CommandUIDefinition is
different.
Instead of adding the button to the Controls._children collection, it overwrites the
“Connect to Outlook” button. (Note: Make sure the button is there! In the previous
example the button is hidden. You may need to deactivate the RemoveRibbonButton
feature first.)
You can use the SharePoint JavaScript API to add functionality. For example show an
AJAX dialog box. In the example below we use the ScriptLink as a the Location to
enable or disable the button depending on if there is a list item selected.
17
SharePoint® eMagazine
2010 Special
.....
<CommandUIHandlers>
<CommandUIHandler Command=” NewRibbonButtonCommand”
CommandAction=”javascript:alert(‘Helloworld!’);
EnabledScript=”javascript:enableButton();” />
</CommandUIHandlers>
</CommandUIExtension>
</CustomAction>
<CustomAction
Id=” Ribbon.Library.Actions.MyButton.CheckEnable”
Location=”ScriptLink”
ScriptBlock=”function enableButton()
{
var IsEnabled = false;
var context = SP.ClientContext.get _ current();
var items = SP.ListOperation.Selection.getSelectedItems(context);
if (items.length > 0)
{
IsEnabled = true;
}
return IsEnabled;
}”/>
...
Deployment
You can deploy the customization, together with feature xml, using Windows Power-
Shell using the following commands (listing 3). Where the parameter ‘FeatureId’ is
the FeatureId in the Feature xml. You can scope the customizations to a site or to a
particular web by using the Scope attribute in the feature.xml file.
Install-SPFeature FeatureId
Enable-SPFeature FeatureId -Url http://hostheader/sitename
First it will look for the CommandUIHandlers in the CustomAction. If it’s not there
it will look in the page for the right Script. You can add this script adding a Page
Component (PC) with the JavaScript or JScript that handles the control.
This principle is shown in figure 2.
18
SharePoint® eMagazine
2010 Special
Conclusion
It’s very easy to add functionality to the Ribbon. Using the Ribbon for the user inter-
action on your Custom Lists or Web Parts the GUI will stay the same for the end user.
Your customizations will be better integrated and this helps the user adopting your
functionality.
Customization of the Ribbon is difficult. The Style sheet is not pretty and it is difficult
to add your own styling.
Security should be considered as well by developing custom buttons. When you are
a visitor you can see all of the controls. If you do not have rights to functionality the
controls are grayed out. You have to add this for custom buttons as well.
Sources
MSDN - Customizing the Ribbon (http://msdn.microsoft.com/en-us/library/
ee539395(office.14).aspx)
SPC09 - Developing with the new UI features in SP2010 - Elisabeth Olson
19
SharePoint® eMagazine
2010 Special
Two examples.
A client requests a SharePoint environment with a number of webparts that can read
data from various SharePoint lists. One approach might be to produce these lists in
the development or test environment by using the browser.
Example 1: How do you then transfer the work that you have done in the development
or test environment easily to the user acceptance and ultimately to the production
environment?
Basically, SharePoint is very scalable. For instance, if you need to improve performance
in an existing environment, you can easily add a web-front-end server without needing
to (re-)do difficult configurations. Suppose the developer of the client’s request in the
previous example, if you have made a webpart that reads certain application settings
from the web.config. Each web.config in each web-front-end server will now have to
include this setting.
Example 2: How can you make sure that the web.config is automatically adjusted to
the application settings required for your webpart when a new web-front-end server
is added to the farm?
The correct answer to both questions is: by setting up a project structure in Visual
Studio for your SharePoint solution. The SharePoint solution can then be deployed
simply across the SharePoint DTAP environment by using packages.
20
SharePoint® eMagazine
2010 Special
The Visual Studio extensions for WSS 3.0 (VSeWSS version 1.3) can be downloaded
using the url below:
http://www.microsoft.com/downloads/details.aspx?familyid=FB9D4B85-DA2A-432E-
91FB-D505199C49F6&displaylang=en
When installing VSeWSS you must be aware that a web service will be installed which
is used by Visual Studio to communicate with SharePoint. This communication is
restricted to local connections. Therefore you must add the application pool account
(where the web service is hosted) to the group administrators IIS_IUSRS, Users, WSS_
ADMIN_WPG, WSS_RESTRICTED_WPG, WSS_WPG and SQLServer2005MSSQLUser$.
During installation an installation wizard screen will remind you of it (see fig. 1).
Fig. 1: Wizard to add the appPool account to the group ‘local administrators’.
Once this is done, you must allow the user to access to the IIS metabase and other
directories used by ASP.NET. You do this by opening an administrator prompt and
entering the command:
Fig. 2: After installing the VSe a new website is created to host the web service. This
manages the communication between Visual Studio and SharePoint.
At the end you need to perform an iisreset and you will be ready to continue.
21
SharePoint® eMagazine
2010 Special
22
SharePoint® eMagazine
2010 Special
In the next step we will see the folder Site Definition. It contains two files Default.
aspx and onet.xml. Default.aspx is the standard aspx page that is loaded when a
visitor visits the site after it has been created. Onet.xml is the blueprint for the site
definition. Among others in this file tells the navigation bars to be displayed, the lists
and the aspx files to be created and the features to be activated on the site after it
has been created.
23
SharePoint® eMagazine
2010 Special
After the package has been deployed, you can simply create a new site in SharePoint
based on the TeamSiteDefinition1 template.
Step 3: Open the SharePoint site in a browser. Then click on Site actions -> Create
Site. Figure 6 shows the screen that will be opened. Give your your new site a name
and choose the template TeamSiteDefinition1 from the field template selection with
the tab Development. Now, when you click on “create”, your new site will be created
with all the functionality as defined in the Visual Studio project.
24
SharePoint® eMagazine
2010 Special
The big advantage of VSeWSS is that you can start building the solution you envision
quickly. You do not need a lot of knowledge of all the options of the SharePoint
solutions and how you can set them up manually. The disadvantage of the extensions
is that you are bound by the structure that is generated for you when you create a
new project or item that is based on one of the SharePoint Visual Studio templates.
The main advantage of setting up your SharePoint solution manually is that it offers
you maximum freedom on the solution structure. Often you will use a standard
approach, but you can easily add changes for a specific client or project. The disad-
vantage of manually managing your SharePoint solution is that it requires you to
have in-depth knowledge of the WSS solution framework.
Visual Studio 2010 will come with a broad set of project and items templates.
You’ll be able to use these to quickly create or update SharePoint elements such
as list definitions, list instances, site definitions, workflows, event receivers,
Business Data Catalog models, and content types.
Right now the Beta 2 version of Visual Studio 2010 has already been released. The
Beta 2 does not include the above mentioned SharePoint templates. Writing this, we
unfortunately do not have a preview available for you.
1
Code Access Security (CAS) is part of the .NET framework. CAS prevents code from executing un-authorized opera-
tions and allows administrators to configure policies. When the CLR loads an assembly it will be interrogated to
identify the code group which the assembly belongs to. A code group has a permission set (one or more authoriza-
tions). When an assembly executes a certain action, it will also execute a code-access-demand which will cause the
CLR to traverse through the call stack and check which permissions have been granted to the assembly. Code groups
are collections of permissions sets and are set/managed by the administrator.
TIP 2: In SharePoint 2010 profile pictures will no longer be stored in the user’s My Site. They will
now be stored in a central library on the My Site Host site collection (http://<mysitehost>/
UserPhotos/).
25
SharePoint® eMagazine
2010 Special
History
The data view web part has been around since SharePoint Portal Server 2003 and WSS
2.0. Back in 2003, Microsoft Office FrontPage was used to create data view web parts.
With Microsoft Office SharePoint Server 2007 and WSS 3.0, FrontPage has evolved
into SharePoint Designer. In regards to SharePoint 2010, which is currently in its Beta
release, SharePoint Designer 2010 will be used for the creation of data view web
parts. SharePoint Designer 2010 is not compatible with older versions of SharePoint.
Figure 1 displays the new user interface.
Step-By-Step
Data view web parts can easily be created by non-developers, and the three steps are:
select a data source, pick the fields to display, and then customize the way the data
is viewed. These steps will be covered below and the new SharePoint Designer 2010
capabilities will be highlighted.
26
SharePoint® eMagazine
2010 Special
Security Note: At the web application and site collection levels, there are
SharePoint Designer Settings, in which to lock down the use of this software.
Administrators have the option to disable the use of SharePoint Designer, or
just certain aspects of it such as customizing master pages.
First, a data source is selected. The Data Source Library is the main interface for
accessing and managing data sources within SharePoint sites. By default, all of the
lists and libraries on the current site are listed as data sources. Once the SharePoint site
has been opened in SharePoint Designer 2010, follow these steps to add additional
data sources:
Click Data Sources in the left pane. This screen will display the Data Sources tab in the
ribbon at the top of the screen, shown in Figure 2.
On this screen, new data sources can be added, using the buttons in the ribbon. New
data source types include Linked Data Sources, Database Connections, SOAP Service
Connections, REST Service Connections, and XML File Connections. Note that a Linked
Data Source is unique in that it merges or joins two or more data sources to create a
new one.
Once the target data source exists in the list of the site’s data sources, the data view
web part can be inserted on a page. Open an .ASPX web part page in SharePoint
Designer, and put the cursor in the desired web part zone. In this example, the web
part page is called “ExampleDVWP.aspx”. The Policies document library will be used,
which contains all of the corporate policies. Click the Insert tab on the ribbon, and
click Data View to choose a data source. See Figure 3.
Best Practice: Create a blank web part page on which to develop the data
view web part. When complete, save the web part (see Figure 9), which
can then be inserted in any location in the site collection. Using this practice
helps avoid having a work in progress on production pages.
27
SharePoint® eMagazine
2010 Special
The Ribbon
The new ribbon interface is everywhere in Microsoft products now, and SharePoint
Designer 2010 is no exception. “Ribbon” is the terminology that describes the panel
at the top of the screen, which contains a set of contextual toolbars.
28
SharePoint® eMagazine
2010 Special
Filtering
Narrow down the list of items returned, by specifying a subset of data.
Sorting
Determine the order in which the data is to be displayed
Grouping
Set groupings on data, according to data in one or more fields. These groupings
can be collapsed or expanded.
Paging
Set the number of list items to be returned per page of data.
Parameters
Specify parameters coming from different sources such as cookies, form values
and query string variables.
Formula Insert a formula into the data view web part, such the calculation of
the sum of the data in two fields.
Web Part Connections
Connect web parts to each other to pass filter data or parameters.
Add/Remove Columns
Add or remove data fields to the view.
Conditional Formatting
When a selection has been made in the data view web part, the conditional
formatting drop-down box will display options as to which content needs to be
formatted. Once the content is chosen such as row, column, or selection, then the
user is prompted to create the condition (rule). Conditional formatting is not a
new feature, but the new interface makes this feature more readily accessible.
Inline Editing
When the Inline Editing toggle button is pressed, a new (seemingly empty)
column will appear as the leftmost column in the data view web part. It won’t
be apparent within this design view, but when the page is saved and previewed,
the inline editing button will be displayed. When this new button is clicked, the
fields in the row become editable directly in the list view. Note that the inline
editing capability is also available when creating regular list views in SharePoint
2010, and is not limited to the data view web part.
Show List Item Menu
In the browser view of a document library, the list item menu associated with
each record has typically been available on the Title field of each SharePoint list.
In SharePoint Designer 2010, we now have the ability to choose the field(s) on
which to display this menu. The options for this configuration are shown in
Figure 5.
29
SharePoint® eMagazine
2010 Special
data. Refresh Interval allows automatic data refresh at the interval you specify,
as shown in Figure 6.
Folder Scope
If there are folders in the data source, choose whether to display them, or
display all list items without consideration for the folder structure.
Show/Hide
The ability to choose whether sample data is displayed is useful when working
with a list that has no data displayed. The totals row check box will insert a row
at the top of the data table, displaying a field that totals each column.
View Style
Choose the visual style of the data that is displayed. Examples are displayed on
each button. Note that when changing the view style, the currently displayed
list columns will be reset. It is a best practice to select a view style toward the
beginning of the data view design, so that customizations will not be lost.
Toolbar
This is a web part setting. Choose to display the full web part toolbar, a summary
toolbar, or none. An example of the summary toolbar is displayed in Figure 10.
Actions
Insert data view controls on the form, or customize the form’s XSLT code.
Preview
The preview section contains options to preview how the data will be displayed
under various circumstances, such as determining how many sample items are
displayed in the list during web part creation in SharePoint Designer. Some new
items to note are the last three in Figure 8.
30
SharePoint® eMagazine
2010 Special
31
SharePoint® eMagazine
2010 Special
Appearance
The chrome is the frame of the web part. The chrome type is an option to display
the web part title, a border around the web part, neither, or both. The chrome
state options are normal or minimized. Liken this setting to minimizing and
maximizing windows in the operating system. If a web part is set as minimized
by default, end users must click a button to maximize it in order to view the
contents.
Size
By default, a web part is automatically sized to the part of the page in which it
is added. Alternately, specific dimensions may be hard-coded.
Connections
Add new web part connections, and if web part connections already exist, click
to “Manage Connections”.
Allow
This section contains options for actions that will be available for end users to
take, when it comes to modifying the web part.
After clicking OK to save the web part to the gallery, there is yet another prompt:
Do you want this web part to always show List data from the current Web site http://
site.yourcompany.com? If you select No, the Web Part will show data from the list at
the path Policies, relative to the site in which it is used.
What does this mean? Here are the two options available when saving the web part
to the gallery:
32
SharePoint® eMagazine
2010 Special
1. Show list data from the current web site. This means that this exact list of
the same “Policy” documents will be displayed when the web part is inserted
anywhere in the site collection. In this case, there is only one “Policy” document
library, and changes will be propagated to all instances of this web part.
2. Show data at the list relative to the site in which it is used. In this situation, there
could be various departmental sites, each with their own “Policies” document
library. Inserting this “Policies” web part would apply the current web part
view to the “Policies” document library for that department.
These table options are the same familiar options that exist within other Microsoft
Office products, like Excel and Word.
Field Level
When right clicking on any field in the data view web part, there are several options.
Tasks such as creating hyperlinks can be accomplished quicker in SharePoint Designer
2010, meaning fewer clicks. As shown in Figure 13, when Format item as is selected,
and Hyperlink to, there are options to create links to the form’s New Item, Edit Form,
or Display Form pages.
33
SharePoint® eMagazine
2010 Special
Skewer Click
Use the new Skewer Click button to select an element on the page, or its parents or
children. For example, click the Skewer click button on the Home tab, and then click
on a cell in a table on the web page. This will elicit a drop-down type menu that
contains a selectable list of the elements on the page.
Conclusion
This has been a brief, high level overview of some new functionalities with regards
to creating data view web parts in SharePoint 2010, using SharePoint Designer 2010.
Several new functionalities have been highlighted, along with basic instructions to
get started with these web parts. The data view web part allows for advanced user
interfaces to back end data to be built quickly and easily, with the ability to avoid
custom programming.
When building custom solutions in SharePoint, data view web parts are very useful
when appropriate. When the limitations of a regular list view have been reached, the
data view web part is the next step. Once the limitations of a data view web part have
been reached, custom programming may be required.
217+(5,*+775$&.)2529(5<($56
6+$5(7+(32:(52)%(5*/(5,&7
%HUJOHU,&7RIIHUVFRPSOHWHGHYHORSPHQWVROXWLRQV FDQEHPRUHSURGXFWLYHWDNHDGYDQWDJHRIULFK
DQGSRVWVH[SHULHQFHG,7SURIHVVLRQDOVZLWKFOLHQWV SODWIRUPVHUYLFHVDQGJDLQDGYDQWDJHZLWKÁH[LEOH
RQDSURMHFWEDVLV$OOGRZQWRHDUWKKLJKO\VNLOOHG GHSOR\PHQWRSWLRQV
ZRUNHUVZKRDUHIRFXVHGRQWKDWVLQJOHREMHFWLYH
PDNLQJ\RXUEXVLQHVVSURFHVVHVPRUHHIIHFWLYHDQG 6KDUHWKHSRZHU0DNLQJSHRSOHPRUHSURGXFWLYH
HIÀFLHQW LVDGLUHFWUHVXOWRIHQDEOLQJWKHPWRDFFHVV
UHVRXUFHVDQGNQRZOHGJHUHJDUGOHVVRIZKHUH
'R\RXZDQWWKHIXOOYDOXHRI0LFURVRIW6KDUH3RLQW WKH\DUHDQGZKDWGHYLFHWKH\XVHWKURXJKDXVHU
6HUYLFHVIRU\RXURUJDQL]DWLRQ"/RRNLQJIRU H[SHULHQFHRSWLPL]HGIRUXVDELOLW\DQGDGRSWLRQ
6KDUH3RLQWH[SHUWVRUD6KDUHSRLQWVROXWLRQ" %HUJOHU,&7NQRZVKRZ
:HSURYLGH6KDUH3RLQWWUDLQLQJFRQVXOWLQJZHE
SDUWVDQGVROXWLRQV:LWK6KDUHSRLQWGHYHORSHUV
%(5*/(5,&7%,-67(5$+;%5('$7+(1(7+(5/$1'67,1)2#%(5*/(51/:::%(5*/(51/
34
SharePoint® eMagazine
2010 Special
What?
Sandboxed solutions (.wsp files) are packages of custom SharePoint artifacts that can
be uploaded to and deployed from a Solutions Gallery at the site collection level by
site collection administrators. The sandboxed solution is completely isolated to the
site collection it is deployed to. This also means that the functionality in the solution
can only be used within that single site collection.
Sandboxed solutions are completely isolated to the site collection they are
deployed to.
To enable completely isolating the sandboxed solution to the site collection a couple
of special measures have to be taken.
n Sandboxed solutions are deployed to the database. This means that no files
within the sandboxed solution will ever touch the file system of the server. Even
dlls, xml files and aspx pages will be deployed to the database.
n Sandboxed solutions run within a special process, the Sandbox Worker Process
(SPUCWorkerProcess.exe). The sandbox worker process makes sure the artifacts
from the solution can be used as though they were deployed to the server
itself and it will enforce the limits of a Code Access Security (CAS) policy on
the contents of the solution. The following permissions will be granted to the
solution by the CAS policy:
w SharePointPermission.ObjectModel
w SecurityPermission.Execution
w AspNetHostingPermission.Level = Minimal
n When using sandboxed solutions a farm administrator can assign “resource
points” to a site collection. The default quota is 300 points per day and points
are calculated based on 14 different metrics. These metrics were chosen because
they impact the health and stability of the server. The use of resources that have
a higher impact on the server will cost you more points. The metrics are called
ResourceMeasures and since they can’t really be normalized each of them has a
ResourcesPerPoint property.
Resource Measure Resources Per Point
AbnormalProcessTerminationCount 1 termination
CPUExecutionTime 3600 seconds
CriticalExceptionCount 10 exceptions
InvocationCount 100 invocations
PercentProcessorTime 85
ProcessCPUCycles 100000000000 cycles
ProcessHandleCount 10000 handles
ProcessIOBytes 0
ProcessThreadCount 10000
ProcessVirtualBytes 0
SharePointDatabaseQueryCount 20 queries
SharePointDatabaseQueryTime 120 seconds
UnhandledExceptionCount 50 exceptions
UnresponsiveprocessCount 2 processes
35
SharePoint® eMagazine
2010 Special
When the sandboxed solutions in a site collection use more than the assigned amount
of points in a single day the sandboxed solutions in that particular site collection
are shut down by SharePoint. This means that end users won’t be able to use the
functionality of any sandboxed solution in that specific site collection until the
resource points are reset. The quota is per day, so after 24 hours the site collection
will be unlocked and sandboxed solutions in that site collection can be used again.
One badly designed sandboxed solution will cause the other sandboxed solutions in
that same site collection to become unavailable to the end user. After 24 hours the
number of used resource points are reset, so sandboxed solutions in the site collection
will start working again, but it will be important to filter out the bad solution and
change or remove that, to prevent it from shutting down all sandboxed solutions in
the site collection again.
Because a sandboxed solution is completely isolated to its site collection only a subset
of the Microsoft.SharePoint object model can be used. Only objects that operate
within the current site collection are available to you, when you are building a
sandboxed solution. The list below is an overview of objects from the SharePoint
object model that can and can’t be used in a sandboxed solution.
n Microsoft.SharePoint Except
w SPSite constructor
w SPSecurity object
w SPWorkItem and SPWorkItemCollection objects
w SPAlertCollection.Add method
w SPAlertTemplateCollection.Add method
w SPUserSolution and SPUserSolutionCollection objects
w SPTransformUtilities
n Microsoft.SharePoint.Navigation
n Microsoft.SharePoint.Utilities Except
w SPUtility.SendEmail method
w SPUtility.GetNTFullNameandEmailFromLogin method
n Microsoft.SharePoint.Workflow
n Microsoft.SharePoint.WebPartPages Except
w SPWebPartManager object
w SPWebPartConnection object
w WebPartZone object
w WebPartPage object
w ToolPane object
w ToolPart object
Why?
As a developer you can deploy your own solution, you don’t have to wait till the
farm administrator can deploy your solution, which makes you more agile.
-
As a farm administrator you can be certain that whatever a developer creates
and deploys, it can never run under full trust and it can never bring you entire
farm down.
In SharePoint 2007 the SharePoint Solution framework was introduced. This framework
makes it possible to package and deploy solutions for SharePoint in a consistent and
managed way.
Solutions are deployed by farm and server administrators and artifacts from that
solution can be deployed to the file system of the SharePoint server and are available
within the entire farm.
36
SharePoint® eMagazine
2010 Special
These solutions, that are called Farm solutions in SharePoint 2010, often run under
full trust, because either they are deployed to the GAC, or the trustLevel of the web
application is set to Full. With sandboxed solutions the solution can be deployed by a
site collection administrator and it can never run under full trust.
This has two major advantages:
n From the developer’s perspective, you can deploy your own solution, assuming
you are a site collection administrator. You don’t have to wait till the farm
administrator takes the time to review and deploy your solution. This makes
you more agile.
n From a farm administrator’s perspective you can be certain that whatever the
developer creates and deploys, it can never run under full trust and it can never
bring your entire farm down.
An obvious disadvantage for developers is that you can’t use the full object model and
that there are certain types of solutions that can’t be built as a sandboxed solution.
The development of sandboxed solutions has been triggered by SharePoint Online,
by far the largest SharePoint implementation at the moment. SharePoint Online is
a hosted SharePoint environment that is being used by many companies, both large
and small ones. Depending on the type of service they chose, SharePoint sites for
several companies might be hosted on a single farm. This means that there are serious
consequences to deploying custom solutions to that farm. Some functionality that
can be deployed using solutions might be available to all customers on that farm and
that might not be desirable at all. Also, if a solution was developed in a poor fashion
it might bring the entire farm down, which will affect all customers on that server.
Because of this, if you are using shared hosting on SharePoint Online 2007, you are
not allowed to deploy custom solutions.
With SharePoint 2010 you can deploy your sandboxed solutions to your own site
collection, which will give you the flexibility you need and the farm administrator the
stable environment he wants.
When?
If you are developing a solution for SharePoint 2010, your first choice should
be to create a sandboxed solution.
So when would you choose to use sandboxed solutions and when would you use
could old farm solutions?
If you are developing a solution for SharePoint 2010, by default you should create a
sandboxed solution. It’s like when you are creating a new solution using Visual Studio
2010. The default choice, when selecting the type of solution, is sandboxed solution.
Some of the capabilities and elements that you can create using sandboxed
solutions are:
n List definitions
n List instances
n Onet.xml
n WebTemplate Feature (you can’t use Webtemp.xml in sandboxed solutions)
n Content Types/Fields
n Navigation
n Module/files
n Feature callouts
n Web Parts derived from System.Web.UI.WebControls.Webparts.WebPart
n Event receivers (on items, lists and webs)
n Custom Actions
n Workflows
37
SharePoint® eMagazine
2010 Special
How?
After all this talk it’s time for some action. We are going to create a site template
using an onet.xml file and a WebTemplate feature.
But before we can start the actual development we need to make sure that our
environment is ready for running sandboxed solutions.
First of all the sandboxed solution service needs to be activated. To do this you browse
to the Central Administration web site and you click “System Settings” and select
“Manage services on server”. Now find the “Microsoft SharePoint Foundation User
Code Service” and start it.
38
SharePoint® eMagazine
2010 Special
Now that we’ve set up our environment correctly we are ready to start building a
sandboxed solution.
n Fill in the URL of a SharePoint site on the machine you’re working on and leave
the trust level at “Deploy as a sandboxed solution”.
n You’ve now got an empty Visual Studio SharePoint project. This project by
default contains a Features and a Package section and a key.snk key.
39
SharePoint® eMagazine
2010 Special
n You should now be able to see your module in Visual Studio’s solution explorer.
Visual Studio also created a feature for you, that by default is called Feature1.
w Rename this feature to “SiteTemplateFeature”.
w Double-clicking on SiteTemplateFeature opens the feature designer up.
w Change the title of your feature to “Fancy Site Template Feature” and add a
description for the feature, for instance, “This is a fancy site template feature
that is deployed as a sandboxed solution and therefore only available in this
site collection.”
w Also change the scope of the feature to “Site”. If you forget to change the
scope before you deploy the feature for the first time you will have to create
a new feature, as changing the scope of an existing feature is not allowed
and won’t work.
You can see in the feature designer that Visual Studio already added the Alternate-
TeamSite module to the feature for you.
40
SharePoint® eMagazine
2010 Special
n Open the Elements.xml file from our AlternateTeamSite module. As you can
see Visual Studio helped you out here again. It added a Module element that
references the Sample.txt file that is added to a new module by default. If you
delete the sample file, or add new files they will be added to the Elements.xml
file automatically.
w We are now going to add a new WebTemplate element to the Elements file
and we will place this above the Module element.
w The “Name” needs to be the same as the name of your module, or your
deployment will fail.
w The “Title” and the “Description” are shown in the user interface when a user
wants to use your site template to create a new site, so choose something a
user will understand.
w Because we will base our site template on the default Team Site template,
we fill in a BaseTemplateID of 1 and BaseConfigurationID of 0. The BaseTem-
plateName is STS.
w If you want to you can fill in a DisplayCategory, I’ve given it the very appro-
priate name “Fancy Sites”.
n Next step is to add a new XML file to the AlternateTeamSite module. Name the
XML file “onet.xml”.
41
SharePoint® eMagazine
2010 Special
Fig. 10: Output window with output from sandboxed solution deployment.
42
SharePoint® eMagazine
2010 Special
n Next go back to site settings and select “Site Collection Features” under “Site
Collection Administration”. You can see the Active feature “Fancy Site Template
Feature” here.
Fig. 12: Overview of Site Collection Features with Fancy Site Template Feature.
n To create a new site using the template click on “Site Actions” and select “New
Site”. If you used your own display category that should be visible on the left
side and selecting it will show you the “Fancy site template” with our fancy
description on the right. Also on the right you can fill in a name and a URL to
create a new site based on this template. Click “Create” to actually create the
site.
Fig. 13: Create a new site based on the fancy site template.
Since we didn’t change anything in the onet.xml of the standard team site definition
your site should look just like a standard team site. If you succeeded in performing all
these steps you have now officially created your first sandboxed solution AND your
first WebTemplate feature.
43
SharePoint® eMagazine
2010 Special
Fig. 14: Site created using the new fancy site template.
So...
So you now know that a sandboxed solution is a SharePoint solution that operates
within the boundaries of a site collection. You know that sandboxed solutions were
created to make it possible to develop SharePoint solution in a more agile way,
without making compromises to the stability of your environment. You know that
you choose to use a sandboxed solution over a farm solution whenever possible and
as long as your solution is targeted at the use in a single site collection, or in very few
site collections.
The Visual Studio 2010 Tools for SharePoint 2010 have improved vastly compared to
the Visual Studio 2008 Extensions for WSS. The tools will help you to setup your
solution, to create SharePoint artifacts and to package and deploy your solution.
0 110 0 0 10 0 110 0 0 110 110 0 10 0 0 110 0 10 10 110 0 110 0 110 0 1110 110 1 0 0 0 0 110 10 0 10 110 1 0 110 10 110 110 110 0 0 110 110 10 110 111 0 0 110 11110 1110 0 0 0 0 1110 0 0 10 1110 0 10 0 1110 0 110 1110 10 0 1110 10 10 1110 110 0 1
110 0 0 0 11110 0 0 11110 10 0 110 0 0 0 10 110 0 0 10 0 110 0 0 110 110 0 10 0 0 11 0 0 10 10 110 0 110 0 110 0 1110 1110 0 0 0 110 10 0 10 110 10 10 0 110 10 110 1 10 110 0 0 110 110 10 110 1110 0 110 11110 1110 0 0 0 0 1110 0 0 10 1110 0 10 0 11
0 10 0 1110 10 10 1110 110 0 1110 111 0 11110 0 0 0 11110 0 0 11110 10 0 110 0 0 0 10 110 0 0 10 0 110 0 0 110 110 0 10 0 0 1
1 01 0 011 0 0 0 01 011 0 0 01 0 011 0 0 011 011 0 01 0 0 011 0 01 01 011 0 0 11 0 011 0 0111 0111 0 0 0 011 01 0 01 011 01 01 0 0 11 01 011 01 1 0
0111 011 0 0111 0111 01111 0 0 0 01111 0 0 01111 01 0 011 0 0 0 01 011 0 0 01 0 011 0 0 011 011 0 01 0 0 01 1 0 01 01 011 0 011 0 011 0 0111 011
0 01 0111 0 01 0 0111 0 011 0111 01 0 0111 01 0 0 011 0 0111 011 01 0 0 0 011 01 0 01 011 01 01 0 011 01 011 011 011 0 0 011 011 0
11 0111 01111 0 0 0 01111 0 0 01111 01 0 011 0 0 0 01 011 0 0 01 0 0 11 0 0 011 011 0 01 0 0 011 0 01 01 011 0 011 0 011 0 0111 011 01 0 0
11 0 01 0 0111 0 011 0111 01 0 0111 01 0 1 0111 011 0 0111 0111 01111 0 0 0 01111 0 0 01 111 01 0 011 0 0 0 01 011 0 0 01 0 011 0 0 011 011 0 0
From the first release of SharePoint, it has always been its philosophy to provide a platform for
unstructured content. A lot of organisations had (and some still have) their content stored all over
the enterprise. Documents are stored on file shares, in very inflexible folder structures. Customer
information is stored in a CRM system and employee data in a HR system and their knowledge
profiles are usually stored in their own brains. SharePoint is the platform that brings all of this
information together in one place. Content can be combined and found through simple but very
powerful search features. All of this can be accessed by just using a browser, making the content
available anytime, anywhere.
Since the launch of SharePoint in late 2000, the feature to manage all of the content
has evolved into an extremely powerful platform. SharePoint 2010 will add its bit
to those features presenting the user with a great new set of Enterprise Content
Management (ECM) functionality. Obviously, Microsoft has put a lot of effort in
making SharePoint better for large enterprises. Additionally smaller deployments of
SharePoint 2010 benefit from these new features. This article provides an overview of
some key developments for end users who will need to work on ECM with SharePoint
2010.
45
SharePoint® eMagazine
2010 Special
Managed Metadata
Metadata is “data-about-data”. It provides extra information about the content that
is stored on your SharePoint portal. Metadata can be divided into two categories
´Contextual Metadata´ and ´Descriptive Metadata´. Contextual Metadata are fields
that are automatically assigned to the content. Examples are ´Created By´ and ´Created
on´. Descriptive Metadata are fields that add additional information to the content.
A contract can have an expiry date and a policy document can have a department to
which it applies. Metadata is used to structure, identify or sort the content. In Share-
Point, you can also assign actions based on metadata such as workflows to handle
content.
In MOSS 2007 metadata was handled locally in either content types or at a list or library
level. Many organisations require the use of centrally administered and approved
metadata. Site columns can be used for this, but if metadata is needed for more than
one site column, the metadata needs to be re-entered in a new site column. One of
the most revolutionary ECM features in SharePoint 2010 is managed metadata. This
provides the site administrator with the ability to centrally define a taxonomy. This
taxonomy becomes available throughout the entire SharePoint environment. You can
create and manage the taxonomy with the ´Term store management´ tool in the site
setting of SharePoint 2010. Here you can create a central taxonomy. The terms can
be grouped in a tree-like structure. The top level contains the metadata service.
Followed by, at the first level, term groups. Below a group, a tree structure can be
created containing term sets and terms. Terms will be used to tag the content items.
This can be seen in the following figure (figure 1):
46
SharePoint® eMagazine
2010 Special
for the managed metadata turns from a taxonomy to a folksonomy. End-users are
allowed to add terms themselves, enabling a more organic growth of the taxonomy.
This is a very flexible taxonomy, and not all organisations will think their end users
will be able to use this correctly. Of course, you can use both options in the same
content type by adding two metadata columns. With some search customisations,
the centrally managed metadata field can be weighed as more important to manage
search results.
When adding a content item which requires the use of managed metadata, the user
can start typing a term in the input box. The SharePoint Fluent UI provides a type-
ahead feature which suggests certain terms.
47
SharePoint® eMagazine
2010 Special
Document management
As said before, document management has come a long way since the launch of the
first SharePoint platform. Previously, documents were stored on files servers, making
them very hard to find and hardly accessible from outside the office premises. Giving
access to some of the documents to an outsider was nearly impossible. An alternative
was implementing a Document Management System (DMS). They were (and some
still are) really good at one thing: managing the documents. But documents are just
a part of all the enterprise content and a DMS usually works pretty much on its own.
SharePoint provides a platform where you can manage your documents and bring
them in context with the rest of your content, inside or outside SharePoint. Already
MOSS 2007 was good at managing documents; SharePoint 2010 takes document
management to an entirely different level by adding numerous new features to the
platform. Now file shares will be obsolete and your Total Cost of Ownership (TCO) will
be reduced by migrating your DMS to SharePoint.
Large libraries
In SharePoint 2010, document libraries are much more scalable. They can now hold up
to as much as 10 million + items without reducing performance. As a result, both the
number of stored documents and the size of the individual documents are not bound
to restrictions. This is particularly convenient in libraries that store media items.
48
SharePoint® eMagazine
2010 Special
Content Organizer
In most of the cases, more document libraries need to be created. Retention settings
for HR documents will differ from project documents and access rights for project
documents will differ from department documents. This would mean that an author
will need to know in which library his or her work needs to be stored. This is not
always the case. Fortunately, SharePoint 2010 provides a great feature eliminating
this problem. The ‘Content Organizer’ can deliver the content to the right library. A
‘Drop Off Library’ can be created in which all users can save their documents. Rules
can be defined on this ‘Drop Off Library’ which will manage the distribution of the
documents (figure 5). For instance, when a metadata name contains the name of a
project, the document will be automatically move to the project document library.
Policy settings:
This is a statement which will be shown to the users when an item of the appli-
cable content type is being created. When a quotation is being added to the
library, the user can be pointed at the new general conditions that need to be
handed to the customer;
49
SharePoint® eMagazine
2010 Special
Retention:
When enabling retention on a content type, rules can be defined to automati-
cally deal with documents in time. For instance, one can remove all minor
versions of a document one year after it has been created. After two years, all
major versions can be deleted and finally the document itself can be deleted
or moved to another location after three years. This feature will be useful
especially with records management which will be described further on;
Auditing:
When auditing is enabled, all actions on the item will be logged. Reports on
audit trails will become available showing who viewed, edited, moved, copied,
etc. the document;
Barcodes and Labels:
These features are also available in MOSS2007 and remains unchanged in
SharePoint 2010.
Document sets
Document sets enhance the use of document libraries. For example, a company might
have a library containing all company policies. Within this library, you might want
to separate the financial reporting policies from the IT policies. Of course, you can
store documents in different folders within a document library to keep those policy
documents together. However, the problem with folders is that they are not very
flexible. If you create a new policy group, governance, it must contain documents
from both IT policies and financial reporting policies. This means moving documents
around from one folder to the next. In this case, it would have been better when
all documents were given the right metadata and with the appropriate views in the
library. However, what if you need to download an entire set of documents or what
if you need to change a retention policy on that set? The solution is ´Document Sets´.
This is actually a content type based on the folder content type. It is easy to create
a new content type called´Governance´ with policies based on a document set and
extend the content type with the right metadata. When the content type is created,
the metadata of the document set will apply on all documents in the set. The set can
then be downloaded as a ZIP file, or specific retention rules can be defined on the
particular set. It is also possible to start a workflow on an entire document set.
Validation of metadata
Validation based on a combination of metadata fields is also a new feature in Share-
Point 2010. For instance, a contract ending date can never be earlier than its starting
date. SharePoint can compare those metadata fields and reject changes when they
are made. This ensures the metadata given to an item is - valid and you can rely on
the quality of the data.
Document ID’s
Documents normally have a name when they are saved to a document library. Those
are not necessarily unique and it is hard to enforce the end user to enter a unique
50
SharePoint® eMagazine
2010 Special
name. SharePoint 2010 offers a feature to assign unique IDs to each document that is
saved to a document library. When the feature ´Document ID Service´ is enabled on a
site level, unique IDs can be created through combining metadata fields with a pre-
or postfix, e.g. an autonumber.
Connect to Office
When you are working on a project, you probably will need to work on documents
stored on the project team site on a frequent basis. Each document library offers the
ability to connect to Office. When you use this feature, the library becomes available
from the Office client applications making the library easily accessible.
Records management
When you start with document management, legal or other governance require-
ments might pop up. Tax law tells you to retain invoices for several years and there
are other requirements for documents regarding research data of a pharmaceutical
company. In those cases, you will need to implement records management. This means
that rules need to be defined that apply to certain types of documents describing
retention, user rights and audit trails.
In MOSS 2007, records management is made possible through the record center.
A document becomes a record when it is stored in a record center. In SharePoint
2010, records management features are available in every document library. This is
beneficial, because in spite of the fact that rules apply that a document may not be
edited anymore, it might still be needed in collaborative processes. You can save the
document in the document library in which it was created, or leave it in place and
still use it, despite the fact that it is a record. A record center can be created and you
are able to move records to that center at any time. Retention policies can be used
to automate that process. You can also declare items that are added to a document
library as a record either automatically or manually.
Retention rules can also go the other way. Certain laws may tell you to destroy a
prospective employee’s resumé after six months after he or she applied for a job at
your company. This is easy to define as described before. The user can set up a rule
that automatically destroys items in a resume library after six months.
51
SharePoint® eMagazine
2010 Special
Fig. 1: Sample Visio Computer Network Diagram displayed in Visio Web Accces Web
Part. Silverlight component allows you to zoom-in and focus to individual elements.
Picture would render as PNG for users without Silverlight installed.
Fig. 2: Defining custom item display with data bar, relevant to free hard disk capacity.
52
SharePoint® eMagazine
2010 Special
Benefits of Visio services do not stop at just drawing sharing. You can also integrate
each drawing with backend data sources. For each element in your drawing you
can define a backend system and retrieve relevant data from it. For example, in our
network diagram shown above we could connect to a backend database or custom
data source (e.g. SCOM 2007 monitoring database) and visualize the health of your
SharePoint farm.
Fig. 3: Visio Web Access displays custom visualization for each server based on capacity
retrieved from a custom data source.
There are number of benefits of this approach: Visio diagrams are very easy to create,
end users can easily create drawings with Visio. Integration with backend data
services is also easy to understand and one can create visually appealing Drawings
with colorful indicators without too much work. On top of everything you can easily
publish these to your colleagues or to your web site.
Backend integration supports SQL, Excel, Access, SharePoint lists, other ODBC or
OLEDB sources. You can also use existing Office connections. If your backend system
requires authentication, you can leverage built in authentication mechanisms like
Kerberos.
Once you have a data connection embedded in your Visio drawing you can configure
the drawing to refresh allowing you to have a live dashboard of e.g. traffic infor-
mation or server health monitoring.
Interaction
Visio Web Services allow you to do much more than just rendering Visio files as Silver-
light or PNG images. With Visio Web Access Web part you can easily display Visio
images on any SharePoint page and connect it to other web parts. Let’s say you have
an office floor plan created as Visio drawing. You want to publish everything on the
web, and allow users to select an office they want to rent and highlight it in the main
drawing.
You can see sample integration on a picture below. Visio Web Access is located in the
main zone, and SharePoint list in the right zone. When User selects an office on right
it is highlighted on the main web part.
Fig. 4: This figure shows two integrated web parts. In the main zone, Visio Web Access
shows a Visio diagram. Visio drawing shapes (rooms) are highlighted as user clicks on
elements on the list on the right.
These connections are easy to define. In Visio drawing you need to define a name
for each element you want to highlight, then create a list of Visio elements in Share-
Point (in my case this is a list of offices) and type drawing elements names in one of
columns of your list. Use standard Web Part Connections menu to connect the two
web parts.
On top of built-in web part connections you can also use JavaScript Mash-up APIs to
integrate with your existing solutions.
53
SharePoint® eMagazine
2010 Special
Fig. 5: This figure shows simple 2 level workflow visualization. Users can easily zoom
on more complex workflows and easily review workflow flow and history.
Visio integration with SharePoint workflows does not stop there, there is more! Now
business users can use Visio client to design workflow flowcharts of their processes
using special SharePoint Workflow Visio stencil. This stencil contains default SharePoint
workflows actions and allows you to easily drag and drop them on Workflow area.
54
SharePoint® eMagazine
2010 Special
Editions
Diagram designers must have Visio 2010 client to create diagrams that can be published
as web pages. You also need Enterprise CAL for SharePoint to enable Visio Services.
Conclusion
Visio Services introduces some very interesting and powerful features. It is hard to
select one feature of Visio Services as the coolest one. Visio Services empower your
end users to easily publish nice looking and power diagrams, connect them to backend
LOB systems and easily share them with other users. Business users and analysts will
enjoy the ability to design business process as Visio diagrams and publish them as
SharePoint workflows.
Fig. 8: Make sure you have enabled Enterprise features before deploying your Visio
Drawings.
By enabling enterprise features SharePoint will now render Visio Drawings in your
browser. You will also be able to use Visio Web Access Web Part. This web part is
available in the Office Clients Applications category.
Fig. 9: Visio Web Access Web Part is available in the Office Client Applications category.
55
SharePoint® eMagazine
2010 Special
About DIWUG
DIWUG is a platform for people that are interested in information worker solutions.
Several times a year, DIWUG organizes events where members can meet, share
knowledge and see interesting presentations in an informal setting.
CONTACT INFORMATION
Marianne van Wanrooij; marianne.vanwanrooij@sdn.nl
Mirjam van Olst; mirjam.vanolst@sdn.nl
http://www.diwug.nl
56
SharePoint® eMagazine
2010 Special
Fig. 11: Item context menu allows you to open file in Web Browsers or Edit in Visio.
57
SharePoint® eMagazine
2010 Special
With a data connection in place you can configure Graphic for each shape. Configu-
ration is very similar to conditional formatting options of Excel 2007. The following
figure displays a rule that changes icon in the icon set according to CPU value. Each
shape in Visio has a set of predefined data fields, but you can add your custom to
match your business need.
58
SharePoint® eMagazine
2010 Special
59
SharePoint® eMagazine
2010 Special
Fig. 18: This dialog allows you to configure mapping between Provider (your list) and
Consumer (Visio drawing).
Fig. 19: Visio 2010 introduces a new template “Microsoft SharePoint Workflow”
Activities on this template are same as activities in SharePoint Designer.
60
SharePoint® eMagazine
2010 Special
Your workflow drawing must also fulfill certain rules (e.g. all shapes must be connected
etc.). Before exporting workflow from Visio you can use Check diagram button to
verify your model is correct.
When you are designing workflows in Visio, the model is not SharePoint aware. You
can design the flow but you will still have to use SharePoint Designer 2010 to configure
lists, users etc. you want to use. Use Export button to Export the workflow model.
61
9.000
professionals work together
on innovative Microsoft projects
Join
Working for Avanade means being part of a global network of IT
professionals and working on interesting projects for large clients.
These projects are very diverse and in addition to having SharePoint at
their core, consist of many other technologies and products. Avanade
consultants specialize in the Microsoft technology platform and receive
diverse training opportunities to develop themselves further.
Fig. 1: You are not the user, neither is your boss or client.
A great way to get to know your users is making personas. User Personas help us
define who is using the site and who we want to use the site. You create a person-
ality based on ages, culture, usage patterns and communities. That helps you to do
research to help support who these users are and what they will do in the portal.
The goal is to develop a precise description of your user(s) and what he wishes to
accomplish. A good person will enable you to build a product that solves a real
problem and that people love.
Needs
Be careful to capture the end goals rather than goals that are a means to an end.
A good test to decide if you have identified an end goal is to continually ask the
question “why is this important?”. If there is an answer, you have not identified the
63
SharePoint® eMagazine
2010 Special
root goal yet. Some examples of “fake” goals are: save memory, save keystrokes,
speed up data entry, be easy to learn, use cool technology or features. They may want
to speed up data entry because they want to get out of the office on time and get
home to their family. Or they may want to use cool technology because they want to
be seen as the cool gadget guy on the cutting edge.
ShareWhat?
A website should be intuitive, easy to use and help you reach your goal quickly. If you
have to explain how to use it, your design failed. No different for SharePoint, but
SharePoint as a collaboration portal can scare people. They find it difficult, it changes
the way they do their job. The job they have been doing for fifteen years in a certain
(paper)way. And SharePoint has all these new features they aren’t familiar with.
Fig. 2: Start with a core business feature like digital mailroom or working schedules.
64
SharePoint® eMagazine
2010 Special
An effective website is providing the user the correct information and answers, has a
logic structure, doesn’t waste resources and asks less time management. A satisfied
user finds what he needs, achieves his goal, enjoys the experience, promotes your
application to his colleagues and comes back again.
Avoid solutioneering
Design by very definition, is the act of solving problems. In order for anything to
be designed well, you must first identify the problem we are trying to solve and
the goals we are trying to reach. Promote questions before answers. What is the
problem at hand and what solutions can resolve that problem? Keep asking before
giving an answer or solution. Don’t forget that the client often speaks a different
(not so technical) language. Offer a variety of solutions.
Content design
79% of users scan the page instead of reading word-for-word. On any page with text,
make sure most of your best design efforts account for making that text scanable,
clickable, readable and understandable. Stay close to the standards. Use underscore
for links, heading to highlight important sections, avoid long text blocks and long
sentences.
Less words, less web parts. On the average SharePoint team site all the lists and
libraries are cramped up on the start page “to get a good overview of the content”.
This is an overkill of information. An alternative is to put only the most important
information on the start page and provide links to the other content.
Ask yourself: How easy is it for users to accomplish their tasks on first visit? Once users
are familiar with the application, how quickly can they perform these tasks? When
users return after a period of not using the interface, how easily can they reestablish
proficiency? How many errors do users make, how severe are the errors, and how
easily can they recover?
On the average SharePoint TeamSite all the lists and libraries are cramped up
on the start page.
65
SharePoint® eMagazine
2010 Special
Accessibility
Clients keep the business goals in mind, but often put their own needs over their
users. Stay close to the web standards and look in what context the application will
be used. With the possibilities of mobile internet a new User eXperience for the web
is introduced.
Information Architecture
Information architecture is 80% of the usability. Get to know your audience. Design
an efficient navigational structure with clear navigation, in a logical structure, with
easy-to-follow site hierarchy. Most of the intranet environments have an information
architecture that follows the structure of the organization they are implemented in.
This is quite strange.
For example: When you build a website for a clothing company you don’t even think
about providing the user a navigational structure with sales department, financial
department, the warehouse, etc. A more effective and likely structure would be
women, men and children’s collection. It’s the same with a collaboration platform,
keep the process in mind. Keep focused on what the user is trying to achieve and
what for the user is the most reasonable and effective way to achieve it.
Another challenge is preventing the user getting lost in the different site collections.
For a developer it is clear what the difference is between them and how to navigate
from one site collection to another. Going to his MySite can leave the user completely
confused and lost in your application. All of a sudden the navigation has changed and
it’s hard to go back to the main site. Using different colors for different site collec-
tions and putting a “home” button on every page in every site collection can help
the user to navigate through the application and provides him the ability always to
go back to the main page.
SharePoint 2010
One of the biggest changes of SharePoint 2010 is in the User eXperience area. The
editor is improved and features the famous “ribbon” from Office 2007 and 2010.
Modifying text on a page is as easy as in Word. This includes adding and modifying
images. SharePoint automatically ensures that everything is in the right place.
The use of Silverlight in SharePoint has also been improved. There are even standard
features in SharePoint using Silverlight. Streaming video is so good, it’s almost unreal.
The video plays without additional drivers and codecs installed and runs smoothly. Even
when choosing a new starting point. Is the SharePoint User eXperience changing???
Conclusion
User eXperience is often underestimated in the implementation of an application.
That is a shame because the success of your application depends on a good user
experience. Certainly a SharePoint application. With relatively simple modifications
and getting the user involved from the beginning of the implementation process and
testing of the application, the changes on succes are a lot bigger. 2010 is a special
(SharePoint) year. The expectations are high, especially for User eXperience. I hope
that with the introduction of SP2010the love hate relationship between SharePoint
and UX can be converted into a good marriage. But even in a good marriage, there
often is tension and a (small) fight:)
66
SharePoint® eMagazine
2010 Special
67
SharePoint® eMagazine
2010 Special
Web Parts
Five BDC web parts came with MOSS 2007 that allowed your users to create dashboards
with the business data they were interested in. The data could be filtered, related
together to create associations and action’d upon by linking to actionable urls.
Search
The Business Data Catalog opened up all of your systems to being crawled and indexed
by SharePoint Search, meaning if your users searched for a Product they could get
information not just from within SharePoint being returned, but also directly from
your Product catalog database. SharePoint all of a sudden became the single place to
search all of your systems within your organization.
User Profiles
If you had a separate HR system containing information you’d like to publish to
peoples SharePoint profiles (think phone numbers, job descriptions) you could join
Active Directory properties and your HR system through the Business Data Catalog to
complete the user profiles.
So life was good – SharePoint was a place that people could now go to for collab-
oration, and also for viewing and interacting with the data from other business
systems. But you may have noticed from the five uses of the BDC that the Business
Data Catalog was a read only solution. You could get your data to display in Share-
Point quite easily, but if you wanted to write back – well things were a little trickier.
You did have some options:
InfoPath Forms
Utilize InfoPath Forms Server, build some browseable forms, and a web service layer
to write back to your system
BDC Actions
It was possible to link back to your original system user interface through URL actions
and parameter passing
68
SharePoint® eMagazine
2010 Special
Also to let SharePoint know about the system you wished to integrate with you had
to create an application definition file that contain information such as connection
settings and how to execute methods on the backend to return data. These files
could easily become thousands of lines of XML. Initially it required people to open
up Notepad and craft this XML themselves until third party vendors came along with
solutions to automatically generate them. While these tools were good, many people
expected Microsoft to offer more assistance to do this.
Write-back
The BCS is now a full write back solution. As long as you define the correct methods
within your External Content Type you can use the out of the box user interface to
write back through to your LOB system.
External Lists
An external list allows you to display data from your BCS data source in what looks to
the user as a normal SharePoint list. They can filter, view, edit and even add new list
items if the External Content Type supports it and these changes will be written back
to the backend data source. To the user they think they are working with a SharePoint
list, but they are actually talking straight to the back end system.
69
SharePoint® eMagazine
2010 Special
Developers can also access the external lists through the standard SPList object model
meaning you can now write solutions that can use both standard SharePoint lists and
external lists.
Still Around
So those are a few highlights of the new functionality available in the Business
Connectivity Services, but don’t forget we still have the Business Data column, BCS
Search and the ability to add BCS data to user profiles.
Another big announcement however is the availability of the BCS to SharePoint
Foundation.
70
SharePoint® eMagazine
2010 Special
Wider availability
As we’ve mentioned the BDC was only part of MOSS 2007 Enterprise Edition. Business
Connectivity Services is now part of SharePoint Foundation and SharePoint Server
2010! In SharePoint Foundation you get access to External Lists, Business Data Column
and the BCS API.
With SharePoint Server you get the added ability of BCS Web Parts, Search, and User
Profile assistance.
Opening up BCS to SharePoint Foundation is huge in my opinion – Microsoft has
opened up SharePoint as an integration platform for companies who are both big
and small.
Tooling available
With the Business Data Catalog you had to rely on third party tools such as BDC Meta
Man to help you integrate your backend data system with SharePoint 2007. BCS comes
with tooling support from SharePoint Designer and Visual Studio 2010 Professional.
SharePoint Designer
SharePoint Designer will allow you to connect to MS SQL Server, WCF and an already
pre-deployed Dot Net Assembly Connector. This tool is great if you want to hook
something up with the BCS quickly such as an External Content Type based directly
from a SQL Server table. SharePoint Designer allows you to get working with the BCS
very quickly and easily without having to understand too much of the BCS model
behind the scenes.
But if you want to do anything complex with your data such as connect to an ODBC
data source, or mash data together to present as a single ECT then Visual Studio 2010
is the route you will want to take.
71
SharePoint® eMagazine
2010 Special
Summary
So going back to our original statement about BCS.
Making your users and management happy – with BCS able to write back and take
data offline your users and management will be able to make much better use of
their Business Data. Your users really can stay in SharePoint and Office now to work
with data that is stored in an external system.
Give you more free time? – the tooling for BCS will make it much easier for you to
integrate and setup. This could take weeks with the Business Data Catalog, but with
the BCS it is much improved – allowing you to leave work on time and do the activities
you love!
The SharePoint team has made a big investment in Business Connectivity Services
for SharePoint 2010 after seeing great adoption of the Business Data Catalog in
SharePoint 2007. The features and functionality have been greatly improved, as has
the tooling and general availability of BCS as an integration platform with the core
technology now available in SharePoint Foundation. We are really excited about the
integration opportunities that the BCS will bring for companies and can’t wait to see
that solutions that are developed and deployed.
72
SharePoint® eMagazine
2010 Special
73
SharePoint® eMagazine
2010 Special
Lists, which is a reference to a ListCollection containing all lists in the site. Until now,
writing code using the client object model seems very similar to writing server side
code. There is however one big difference.
Until now, a connection to the SharePoint content database has not been established.
The client application did not yet interact with the SharePoint server, and therefore,
this ListCollection is still empty. The Load method takes care of loading the collection,
but it is not loaded until the ExecuteQuery method of the ClientContext is called. This
might look like a number of extra, unnecessary steps. They actually are necessary and
by design. It allows the programmer to call a number of load statements and compile
these into one batch of commands that is sent to SharePoint as one package. It is
designed this way to minimize the number of round trips from client to server. By
maintaining the Object Identity Path, the client APIs know which objects belong to
each Load statement. After the collections is loaded from SharePoint, the application
iterates through the collection and looks for the list with ‘Companies’ as title.
List companiesList = null;
using (ClientContext context = new ClientContext(“http://tstmss/teamsite”))
{
Web teamWeb = context.Web;
ListCollection lists = teamWeb.Lists;
context.Load(lists);
context.ExecuteQuery();
The next sample makes the previous sample a little more robust. Instead of checking
the title of a list, the application checks the name of the RootFolder of the list. If a user
changes the title of the list, the application will not break. In the foreach loop, the if
statement is changed. The list.Title part is replaced by list.RootFolder.Name. Running
the application, an exception of type PropertyOrFieldNotInitializedException is now
thrown. This is caused by the biggest difference between server and client object
models. In the client models, just the basic properties (like Id, Title) of all objects are
loaded. If the program needs access to other properties, these properties need to be
loaded explicitly. The server API always has all properties loaded and programmers
need not to worry about this. This is a major difference that you need to be aware of.
Loading the ListCollection is changed to the snippet shown in Code sample 2.
74
SharePoint® eMagazine
2010 Special
if (resultLists.Count() == 1)
{
companiesList = resultLists.First();
}
If the Companies list does not yet exists, the next step is to create it. If it already
exists, the program updates Title and Description. Creating a new list is done by using
a ListCreationInformation object. A lot of SharePoint objects have a specific Creation-
Information object. The pattern is equal to the previous examples. After setting up
the ClientContext, the object is created and Title and Description are set. After setting
up the list, the Update method is called. As in previous examples, this does not call
SharePoint and create the list yet. This is done when ExecuteQuery is called. Instead
of provisioning one list, the code could have provisioned a number of lists and other
objects in one batch. Code sample 4 shows how to create the list object.
75
SharePoint® eMagazine
2010 Special
Screenshot 1 shows the contents of the site after running the Windows Forms appli-
cation.
76
SharePoint® eMagazine
2010 Special
Contenttypes collection of the Web. In one query we search for the new content
type, to check if it exists, and the parent content type that is required to create the
custom content type. Again, a different approach from using the server object model.
Structure your client object model code in a way that groups the requests to the
server in batches as much as possible. This minimizes the number of round trips to the
server and makes the application more efficient.
ContentTypeCollection contentTypeCollection = teamWeb.AvailableContentTypes;
IEnumerable<ContentType> ourContactContentTypes = context.LoadQuery(
contentTypeCollection.Include(
ct => ct.FieldLinks).Where(
ct => ct.Name == “OurContact”));
IEnumerable<ContentType> contactContentTypes = context.LoadQuery(
contentTypeCollection.Include().Where(
ct => ct.Name == “Contact”));
context.Load(contentTypeCollection);
context.ExecuteQuery();
77
SharePoint® eMagazine
2010 Special
The last .NET Managed client object model sample (Code sample 8) shows how to add
an item to the new Companies list. Just as in the server object model, a CAML query
is created to check whether or not the item exists in the list.
String defaultCompany = “Adventure Works”;
78
SharePoint® eMagazine
2010 Special
_ contacts = _ contactsList.GetItems(camlQuery);
context.Load( _ contacts,
items => items.Include(
item => item.Id,
item => item[“FullName”],
item => item[“Email”],
item => item[“Picture”],
item => item[“WorkCity”],
item => item[“CellPhone”],
item => item[“ContactCompany _ x003a _ LogoUrl”],
item => item.Id,
item => item.DisplayName));
ClientRequestSucceededEventHandler success =
new ClientRequestSucceededEventHandler(SuccesHandler);
ClientRequestFailedEventHandler failure =
new ClientRequestFailedEventHandler(FailureHandler);
context.ExecuteQueryAsync(success, failure);
}
Code sample 9: Get items from a list using the Silverlight client object model.
Instead of getting the ClientContext by using the URL, we could have used Client-
Context.Current to get the current SharePoint context. Just before the query is
executed, two event handlers are created. These are passed as parameters to the
ExecuteQueryAsync method, the ExecuteQuery equivalent in the Silverlight API. If the
query is successful, the ClientRequestSucceededEventHandler is called. If the query
generates an error, the application ends up in the ClientRequestFailedEventHandler
event handler. Code sample 10 shows the succes event handler.
79
SharePoint® eMagazine
2010 Special
The Javascipt API is not just in SP.js. It is divided to a number of JS files that are available
as minified files in the <SharePoint Root>\TEMPLATE\LAYOUTS folder. This folder also
contains the debug versions of the javascript files; e.g. SP.Debug.js. The SharePoint
Foundation SDK shows all available JS files. By using the ScriptLink control, SharePoint
automatically loads all necessary javascript files. If the debug attribute of the <Compi-
lation /> element in web.config is set to true, the ScriptLink control automatically
loads the debug files. Instead of SP.js, SP.debug.js is loaded. If you enabled javascript
debugging in the browser, you can debug your ECMAScript SharePoint code in Visual
Studio easily by adding a “debugger;” statement to the code. This makes development
using this new API a lot easier. Screenshot 4 shows the debugger in action.
80
SharePoint® eMagazine
2010 Special
function getUserInfo(userID) {
var clientContext = new SP.ClientContext.get _ current();
var web = clientContext.get _ web();
var userInfoList = web.get _ siteUserInfoList();
var camlQuery = new SP.CamlQuery();
camlQuery.set _ viewXml(‘<View><RowLimit>10</RowLimit></View>’);
camlQuery.set _ viewXml(‘<View><Query><Where>’ +
‘<Eq><FieldRef Name=\’ID\’/><Value Type=\’Number\’>’ + userID +
‘</Value></Eq></Where></Query><RowLimit>1</RowLimit></View>’);
this.collListItem = userInfoList.getItems(camlQuery);
clientContext.load(collListItem);
clientContext.executeQuery(
Function.createDelegate(this, this.onQuerySucceeded),
Function.createDelegate(this, this.onQueryFailed));
}
In this method you will see the calls to properties and methods are slightly different
in the ECMAScript API. All of them are documented on MSDN (http://msdn.microsoft.
com/en-us/library/ee538253(office.14).aspx). You can also open sp.debug.js to look at
the implementation and find what properties/methods are available. The Execute-
QueryAsync method is called using two parameters, which are the event handlers to
be used when the call completes. Code sample 12 shows the function that is called if
the query was successful.
Code sample 12: Handle the query results for the selected user.
In this function, the first item from the collection is loaded. The UI is updated by
linking the content of the fields of this list item to the HTML controls in the page.
Conclusion
The three new object models are an important new feature for SharePoint devel-
opers. Building client applications is now a lot easier and intuitive because it is more
similar to the server side programming model that you already know. In this article the
three new models are introduced in a number of samples. These samples show a few
important differences between SharePoint server side and client side programming.
Look into these differences and get a feel for how they will influence the way you
structure your code. This article is meant to be a starting point for your first project
using the new Client Object models. Full source code of these samples is available on
my CodePlex site (see my biography).
81
SharePoint® eMagazine
2010 Special
SharePoint 2007 and earlier versions have some serious drawbacks when it comes to dealing
with the identity and authorization of the user. In SharePoint 2010 the security model has been
completely revamped and based on the new Windows Identity Foundation. The implications of
this change are minor at first glance, but profound if you look at the bigger picture.
CBA allows for much granular and flexible authorization, and allows multi-dimen-
sional security as opposed to one dimensional security offered by role based security.
With CBA you can easily make a security rule that checks whether a user is in a certain
department and is a manager. In role based authorization this combination would
need to be a single role, increasing the number of roles that are needed.
Claims or facts
The reason claims are called claims and not facts is because a claim may not be factually
true. This is quite common on the internet, where I can identify myself on a forum
as for instance President Obama. On the forum this may be acceptable, but when I
have to identify myself on a government site, I probably need to use something like
my social security number, which will clearly show I am not President Obama. This
is where it becomes important who is making the claim. An identity is issued by a
so called Identity Provider (IP). An application or service accepting the identity of
an (external) IP is known as a Relying Party (RP), because it relies on or trusts the IP.
The forum trusts an IP that allows users to use fake names, as the only important
thing for the forum is to distinguish between different forum users consistently. A
government site will definitely not trust the same IP. In the Netherlands for instance,
the government has an IP known as DigID, which most government sites accept as
a valid IP. CBA works with tokens, and these tokens are issued by a Security Token
Service (STS), which is part of an IP.
An RP tells which claims it needs through a policy, and an STS issues token based on
this policy when a user requests a token for the RP. This means that the STS must
have the information needed to create the needed claims, and also that the STS can
decide whether or not to accept a policy. In other words, a STS has the power to
deny a RP access to certain information about a user. On the internet this is quite
important, because this means that privacy sensitive information is only disclosed if
really necessary. In fact, a token doesn’t even have to contain the (user)name if this is
not required for the RP the user wants to access. Similarly, neither the liquor web shop
nor the forum has any reason to know my social security number, so they won’t get it.
82
SharePoint® eMagazine
2010 Special
The SharePoint 2010 web services are all implemented using WCF and integrate WIF,
but the question remains on how this works when you have a browser client accessing
a website, which is also important for SharePoint. To accommodate this, WIF provides
a “wrapper” around the WS-* interactions that enable a website to become so called
Claims Aware. In this context you may come across so called Active and Passive STSs.
An Active STS is one that works with WCF based clients and services, whereas a
Passive STS provides the wrapper functionality needed for websites. You could create
a standalone Passive STS, but it in mixed scenario’s where both websites and web
services are used, it makes sense to have an IP provide both an Active and a Passive
STS, or have the Passive STS wrap the Active STS. In any case, because SharePoint
requires browser based access, it requires a Passive STS. The interaction between the
browser, SharePoint, and an STS is depicted in Figure 1.
The interaction in figure 1 shows the browser trying to access a SharePoint website
(1). Because the user is not authenticated yet, the browser gets a redirect response
(2), redirecting to the STS. The querystring of the redirect URL contains a URL back
to the SharePoint website for later use. The user then has to authenticate against
the STS (3), which will yield the claims token (4). Finally, the browser sends the
claims token to the SharePoint website (5) to get access. In figure 1 you also see a
step 0, which is not part of the runtime interaction with the browser. It represents
the SharePoint site registering with the STS to setup the required trust relationship
between them. The STS at that point can be configured to determine which claims
are sent in a token to the SharePoint website.
83
SharePoint® eMagazine
2010 Special
programming model. That said, SharePoint 2010 actually supports to different modes:
“classic mode” for standard Windows Authentication (which is the default), and
“claims mode” supporting WIF scenario’s. Because “claims mode” is something that is
available out-of-the-box, a STS also comes with SharePoint 2010.
Figure 2 shows what IIS looks like after a default installation. Notice the SecurityTo-
kenServiceApplication under SharePoint Web Services, which shows you that Share-
Point provides an STS to work with.
Another advantage of using WIF is the fact that its standards based and actually
enables SharePoint to deal with users that are not in the (same) Windows domain as
the portal itself. One scenario where this is useful is business-to-business communica-
tions where one organization (org A) wants to grant access to its portal to users of
another organization (org B).
In SharePoint 2007 and earlier, this requires users from Org B to get an account in the
Active Directory of Org A, or in the SharePoint user store if Forms Authentication is
used. In SharePoint 2010 this is not needed, because SharePoint can be setup to trust
the STS of Org B, or the STS of Org B can be “chanied” to the STS of Org A, which is
trusted by SharePoint. Claims can then be used to grant or deny individual users. This
is much more elegant and doesn’t clutter the user store of Org A, and it also means
that when Org B disables the account of some user, that user can automatically no
longer access the SharePoint portal of Org A. In the SharePoint 2007 scenario Org B
would have to notify Org A of this event and Org A would have to disable the account
too.
84
SharePoint® eMagazine
2010 Special
Single-Sign-On
The last advantage I’d like to cover here is the fact that WIF enables Single-Sign-On
across multiple farms and services that trust the same STS. Without some serious
tweaking this is only possible in SharePoint 2007 when you use Windows Authenti-
cation. One of the implications of this is that SharePoint services no longer have to
be accessed through delegation, in the process losing the user’s true identity, but
can be accessed as the original user itself, making it much easier to ensure that the
user is authorized for whatever the user wants to do/see. To cover scenario’s where
the user’s Windows account is actually required at some point, for instance to access
a non-claims aware resource that SharePoint makes available, SharePoint uses WIF
functionality to convert a so called User Principal Name (UPN) claim into an actual
Windows account that it can use for impersonation. This functionality known as
c2WTS (Claims To Windows Token Service) is a Windows service. For security reasons it
is not running by default, and applications that want to use it need to be configured
explicitly as accepted callers, to ensure that a claim is never inadvertently converted
to a Windows account. Also, the UPN must correspond to an existing account, but in
most cases this is ensured if you’re using SharePoint within a domain.
Conclusion
There is much more to learn about Windows Identity Foundation in itself and how
it interacts with SharePoint 2010. For more information on WIF, see http://msdn.
microsoft.com/en-us/security. There is also a good session about WIF and SharePoint
2010 from PDC available at http://microsoftpdc.com/Sessions/SVC26. Be sure to check
it out, because Windows Identity Foundation is becoming a core piece of the security
infrastructure on the Microsoft platform.
n With the new claims mechanism in SharePoint 2010 it’s possible to use multiple
authentication mechanism in a single web application in a single zone.
n User profile synchronization in SharePoint 2010 enables writing data back to for instance
Active Directory out of the box.
n It’s now possible to use Visio to design your SharePoint workflows and to import these
workflows in to SharePoint Designer.
n Visual Studio 2010 can package your SharePoint solution in a .wsp file with a single button
click.
n Visual Studio 2010 supports F5 SharePoint debugging and deployment. No more “attach
to process”!
85
SharePoint® eMagazine
2010 Special
A current limitation of Microsoft Project 2007 is the lack of integration with Share-
Point. It would have been a great way to allow project resources to update their task
status directly into a SharePoint task list and have it synchronize with the Microsoft
Project file that is maintained by a project manager. The only way to achieve this
today is through Microsoft Project Server.
86
SharePoint® eMagazine
2010 Special
Fortunately, those days are long over. This need has been addressed in Microsoft
Project 2010. The ability to synchronize a Microsoft Project 2010 project plan to a
SharePoint 2010 project tasks list is available out of the box. In addition, this capability
can also be used with existing WSS 3.0 or MOSS 2007. The Microsoft Project team has
published a great blog post on how to make the synchronization work.
About SDN
The Software Development Network, is a community for IT-professionals. SDN is
divided into sections. Each section is specifically aimed at a certain group developers.
The main sections are: .NET, User eXperience, Information Worker, DotNetNuke,
Delphi, Core Systems, Database technologies and Architecture.
SDN events
Besides our annual SDN Conference, SDN organizes many other things. Regular
meetings are held four times a year in a seminar-like approach. On several occasions
we have invited foreign speakers for these meetings.
SDN Magazine
Our quarterly magazine contains high quality articles mostly written in Dutch,
however, we often publish English articles as well.
CONTACT INFORMATION
Remi Caron (president), Joop Pecht (secretary)
Phone: +31-543-518058; Email: info@sdn.nl; Web: www.sdn.nl
87
Als het een ICT-er is,
zit hij bij Sogeti.
Wat kun je? Die vraag stelt ieder bedrijf met een vacature. Wie ben je? Die vraag stelt Sogeti De projecten die je voor klanten uitvoert, variëren
meteen daarna. We vinden het belangrijk dat je bij ons past. Want een ICT-er van Sogeti is enorm. Van portal realisaties tot het neerzetten
geen gemiddelde ICT-er. Het is er een met uitgesproken eigenschappen. van een collaboration omgeving voor 140.000
gebruikers. Ander voorbeeld: momenteel werken we
Gedreven. Resultaatgericht. En niet snel tevreden. Natuurlijk: plezier hoort erbij. Maar we
aan de omvangrijkste integratie ooit van SharePoint
gaan op de eerste plaats voor de inhoud. Zo kennen klanten ons. Zo kennen we elkaar.
in Dynamics CRM.
SharePoint-specialisten over SharePoint. We streven naar innovatie en Interesse? Bel Lijnske Boogaarts of stuur haar je
doen mee met het SharePoint 2010 Evidence- cv: (088) 660 66 00 (nakiesnummer 0954), lijnske.
Stel, je hebt je gespecialiseerd in SharePoint. programma van Microsoft. boogaarts@sogeti.nl. Meer informatie vind je op
En je weet dat er met jouw kennis en ervaring werkenbijsogeti.nl.
veel meer mogelijk is. Dan ben je bij Sogeti aan Kortom, als je ergens kunt doorgroeien, dan is
het juiste adres. Van de 700 collega’s die zich het wel bij ons. We bieden je masterclasses.
bezighouden met Microsoft-infrastructuur en De keuze uit heel veel SharePoint-opleidingen.
–applicatieontwikkeling, weten er zeventig alles En daar horen uiteraard ook certificeringen bij.
SharePoint® eMagazine
2010 Special
Fig. 1: Insert Chart Web Part into your SharePoint 2010 page.
That’s it, you can enjoy your Chart Web Part immediately. It’s on your page and you
can start to use it. Only two steps are missing: to define where your chart data comes
from, and what chart type would you like to use.
89
SharePoint® eMagazine
2010 Special
SharePoint list
As the simplest and most obvious data sources, connecting to SharePoint lists is very
easy. In my very plain example list I’ve stored items of bugs: the requirement is to
store the number of bugs (critical and minor errors, change requests) for every day of
the testing period:
90
SharePoint® eMagazine
2010 Special
Excel Services
Above others, Excel Services can be the data source of the Chart Web Part. In this
case, we need to prepare our environment, but it definitely worth: in my experience,
end users like the Excel sheets, export to and manipulate data in Excel files, etc. In
this way, we can separate the data (in the Excel file) and the visualization (on your
SharePoint 2010 page).
These are the steps of defining Excel Services as the data source of Chart Web Part:
In my really simple example, I have an Excel sheet with two columns: Year and Value.
The workbook and the connection info are the followings:
91
SharePoint® eMagazine
2010 Special
Instead of using the series as in the previous example we will show the data as a
column diagram. With the Value on the vertical ax and the Year in the horizontal ax.
Figure 7 shows how to implement this.
The result is a very simple chart, based on the default chart type (in my case, column
type), similar to the other examples above:
92
SharePoint® eMagazine
2010 Special
My favorite capability of this conjunction is the “live data”: whenever the permitted
users edit the data in the Excel file (either in Excel or in their browser with Excel
Services), the chart can be refreshed immediately with the new data behind.
Business data
Finally, let’s have a look at my favorite data source that expands the whole data
visualization. In SharePoint 2010, we can connect to the Line-of Business systems
(LOB) via Business Connectivity Services (BCS) in a two-way mode. Of course, the
Chart Web Part can use the BCS data as a data source.
So now our SharePoint can be a real data visualization interface! Just imagine:
you have some data in SAP, some in your custom HR system, some in SQL or in
Oracle databases, in SharePoint lists, in Excel workbooks… and all of them can be
visualized with SharePoint 2010 Chart Web Part!
Well, in this article I can’t cover the topic of LOB systems and BCS connections, so
let me show you how to use BCS data after the connection is established to the LOB
system. As the Chart Web Part only visualize (read) data, it’s not required to build
two-way connection to the LOB system, it’s enough to read the data.
After selecting the option ‘Business Data Catalog’ as data source, the next step is
setting the required Business Data Catalog existing in your system and accessible
from the current site.
Tip: The other way to display business data in a Chart Web Part is to create an
External List based on the Business Data Definition, and connect your chart
to this External List.
93
SharePoint® eMagazine
2010 Special
Chart Type
Let’s start from a basic chart, for example our former Bugs Chart. The first thing we’d
like to change very often is the chart type. You can do it right after the configuration
of the data source by selecting ‘Customize Your Chart’ option from the Chart Web
Part’s menu. There are a lot of types you can choose:
Bar
n ���
Area
n ����
Line
n ����
Point/Bubble
n ������������
Financial
n ���������
Pie
n ���
n Radar
n Polar
n Gantt/Range Column
n Range
n Error Bar
n Box Plot
n Funnel
n Pyramid
Awesome list, right? Moreover, you can select from 2D and 3D types, and after
customizing your chart, there’s an option to save it as a Custom Chart Type.
94
SharePoint® eMagazine
2010 Special
The second Tab on this page is for the 3D settings of the chart. First of all you can check
in or out if you’d like to see your chart in 3D, and some other properties (Rotation,
Perspective, Light, Wall Thickness, etc.) if you choose yes.. It’s very useful to see the
difference between the 2D and 3D versions of the same chart immediately:
Conclusion
As you can see, the SharePoint 2010 charts can be customized in various different
ways, and because of that can be a really powerful way to visualize data for your
business. Whatever you would like to visualize, SharePoint 2010 Chart Web Part can
help you - moreover, its configuration and customization is very easy.
No development/code is necessary. The only pre-requirement: the data sources have
to be prepared for visualization, but that is a story that fits a new topic for a next
magazine!
95
SharePoint® eMagazine
2010 Special
We will give you a quick overview of a number of integration scenarios and explain
how to configure the BCS and SAP Enterprise Services to bring the case scenario
mentioned above alive.
Process Integration
Process integration occurs when a business process has been started in SharePoint and
uses SAP data or executes a SAP process before completing. Exposing SAP function-
ality to the outside world can be accomplished in a number of ways. The old-school
way is by using SAP Remote Function Calls (RFC) – or standardized Business Appli-
cation Programming Interface (BAPI) program interface. Since the SAP API is used to
extract data or execute a process this way of integration means tightly coupling. An
upgrade of SAP could break your solution.
96
SharePoint® eMagazine
2010 Special
Data Integration
Data integration is much more interesting and we see a lot of business needs for this
form of integration. Data integration is needed when not all the data needed for
decision making is complete in the ERP system but is scattered over multiple back
office systems. This is often the case in most companies. Imagine that you want to
present a picture of an employee to the SAP CATS system but these pictures are in
a separate system or file store. But also combining data and data enrichment from
excel sheets must be quick and easy. Key is that the data from the original source keep
their integrity. Determining the most robust way of data integration that respects all
the existing business rules of the used data stores is described in this article.
One way to integrate with SAP on the data level is to export SAP transactional infor-
mation into a SQL Server Analysis Services warehouse and then expose the data in
SharePoint using the KPI capabilities2. Our scenario required real-time information
however and therefore required a different solution.
97
SharePoint® eMagazine
2010 Special
the requirements. As SharePoint 2010 has an enormous library of KPI-Web Parts and
KPI lists the presentation possibilities are enormous.
98
SharePoint® eMagazine
2010 Special
99
SharePoint® eMagazine
2010 Special
Fig. 5: Configuring a Read Item operation for the SAP Enterprise Service.
100
SharePoint® eMagazine
2010 Special
We will select the WCF type and enter some parameters for the data connection like
URL for WSDL, URL for Web service endpoint and Target application ID as defined in
Secure Store Service. After that we use the created External Content Types in Share-
Point to create the External Lists. Finally we create a SharePoint Composite appli-
cation that combines data from SAP, SharePoint and Excel Services. Now we have all
the data to create whatever dashboard we want.
Conclusion
The SharePoint Business Connectivity Services is a great way of consuming data from
SAP. Unfortunately we were not able to connect the current beta (v. 14.0.4536.1000)
of SharePoint 2010 directly to the SAP Web services. We encountered two problems.
The first was that BCS requires that both the Finder and SpecificFinder3 method of an
external content type has to come from a single data source (Web service) where that
functionality could only be found in separate SAP Web services. The creation of our
SAP Composed Web service fixed that.
The second problem we encountered is when saving the external content type, due
to what we suspect is still a bug in the beta version. We ended up creating our own
WCF service that operates as a wrapper around the set of SAP Web services. In the
end you will probably always need some form of wrapper or middleware because the
SAP Web services do not conform to the requirements of BCS.
Once we had BCS configured we were able to expose SAP data in the form of external
lists and start building our SharePoint Composite Application.
Another nice feature of the BCS, which we haven’t mentioned so far is that it can be
used by an Office Client. It is a relatively small step to expose data from SAP services,
through the BCS to the Microsoft Word, Excel or Outlook client. This is a very strong
feature to offer SAP data to the standard and intuitive clients to a broader audience
without distributing the standard SAP Client.
More info
n Integration of SAP Business Server Pages (SAP BSP) in SharePoint 2007 (Microsoft)
http://bit.ly/6CZ18e
n Integrating Office SharePoint Server 2007 and SAP (Microsoft)
http://go.microsoft.com/fwlink/?LinkId=91026
n Stereotyped Operations Supported By BDC
http://msdn.microsoft.com/en-us/library/ee557363%28office.14%29.aspx
101
SharePoint® eMagazine
2010 Special
SharePointComic
by Dan Lewis
102
SharePoint® eMagazine
2010 Special
103
SharePoint® eMagazine
2010 Special
104
SharePoint® eMagazine
2010 Special
SharePoint Comic
Dan Lewis a SharePoint Consultant & Speaker. He is specialized
in Microsoft Office SharePoint Server 2007 and Windows Share-
Point Services 3.0. He’s a MCAD as well as a MCTS in the config-
uration of SharePoint. He’s a Senior SharePoint Consultant for
ettain group and active in the SharePoint community and on the
committee for the Charlotte SharePoint User Group.
website: http://www.sharepointcomic.com/default.aspx
105