image

CONTENTS

INTRODUCTION

CHAPTER 1: INTRODUCTION TO SHAREPOINT 2010

What’s New in the SharePoint Platform and Tools

Language Integrated Query (LINQ)

List Enhancements

Business Connectivity Services

Silverlight Integration

Client-Side OM

Web 2.0 Protocols and New Standards

Sandbox Solutions and Resource Governors

SharePoint Designer

Visio and Access Services

InfoPath (Forms, List Forms, Mobile Forms)

Visual Studio

Web Solution Packages

Developer Dashboard

What’s New in Collaboration/Social Computing

Enhanced Blogs and Wikis

Social Tagging and Ratings

Activity Feeds

Social Bookmarking

Organization Browser

Outlook Social Newsfeeds and Expertise

Microblogging and Mobile Client

Social Search

What’s New in Search

New Core Search Query Capabilities

Enhanced Core Search Results

Enhanced People Search: Phonetics

Enhanced People Search: Address Book Style Lookups

Enhanced People Search Results

New Search Connector Framework

FAST Integration

What’s New in ECM

What’s New in ECM: Document Management

What’s New in ECM: Records Management

What’s New in ECM: Web Content Management

What’s New in ECM: Digital Asset Management

What’s New in ECM: Workflow

What’s New in Forms

What’s New in Groove (SharePoint Workspace)

Summary

CHAPTER 2: DEVELOPER TOOLS FOR SHAREPOINT 2010

OOB Developer Experience

SharePoint Designer

New User Interface

Top Ten New Features in SPD

Visual Studio 2010

Importing WSPs

SharePoint Server Explorer

Solution Explorer Integration

Feature Designer

Package Designer and Packaging Explorer

Project Type Templates

Mapping Folders

Setting Up Your Development Environment

System Requirements

Troubleshooting with Debugging, and Testing

F5 Debugging

Debugging Using the Dev Dashboard

Debugging Using SharePoint Logs

Debugging Silverlight Code

Unit, Capacity, and Load Testing

Other Useful Tools for Debugging and Testing

Deploying and Maintaining Your Code

Customizing Deployment in VS

ALM with VS 2010 and SharePoint

Moving from Test to Production

Upgrading Code from 2007

Summary

CHAPTER 3: IT PRO ENHANCEMENTS FOR THE DEVELOPER

Performance Improvements

List Throttling

External List Throttling

HTTP Request Throttling

Remote Blob Storage

Streaming Media and Bit Rate Throttling

High Availability Improvements

Database Mirroring and Clustering

Read-Only Databases

Security Improvements

Claims-Based Authentication

Code Access Security

Sandbox Solutions

Cross-Site Scripting

Management Improvements

Health Monitoring and Reports

Service Applications

PowerShell Support

Summary

CHAPTER 4: SHAREPOINT PLATFORM

Platform Overview

New User Interface

General Platform Improvements

Master Pages and _Layouts

The Ribbon

Status Bar and Notification Area

Working with Dialogs

Theming Infrastructure

List, View, and Event Enhancements

List Enhancements

View Enhancements

Events Enhancements

New Events

New Event Registration Feature

Post-Synchronous Events

Custom Error Pages

Impersonation Enhancements

Overview of Data Technologies

SharePoint LINQ Support

Managed Client OM

Sandbox Solutions

Types of Solutions You Can Build

Executing Code in the Sandbox

Solution Monitoring

Managing Solutions

Summary

CHAPTER 5: COLLABORATION AND SOCIAL COMPUTING

People-Centricity

User Profile Service Application

Profile Synchronization

Social Networking and My Site

Social Tagging and Ratings

Blogs and Wiki Site Definitions

Summary

CHAPTER 6: SEARCH

Search Options with SharePoint 2010

SharePoint Foundation

Search Server 2010 Express

Search Server 2010

SharePoint Server 2010

FAST Search Server 2010 for SharePoint

Choosing the Right Search Product

Common Platform and APIs

Search User Experience

Search Center

Visual Cues in Search Results with FAST

“Conversational” Search

People Search

Search Architecture and Topologies

SharePoint Search Key Components

FAST Architecture and Topology

Scale-Out with FAST

How Architecture Meets Applications

Developing with Enterprise Search

Range of Customization

Top Customization Scenarios

Search-Driven Applications

Customizing the Search User Experience

Example: New Core Results Web Part

Example: Adding Sorting to Your New Web Part

Web Parts with FAST

Search Connectors and Searching LOB Systems

New Connector Framework Features

Creating Indexing Connectors

FAST-Specific Indexing Connectors

Customizing Connectivity in Summary

Working with Federation

Customization Examples Using Federation

Further Considerations in Federation

Working with the Query OM

Query-Side APIs and OMs

Query Syntax

FAST Query Language (FQL)

Examples Using Query Customization

Social Search

End-User-Visible Functionality

Social Search Architecture and Operations

Content Enhancement

Metadata, Linguistics, and Search

Advanced Content Processing with FAST

Multilingual Search

Extending Search Using the Administrative OM

Authentication and Security

Search Reports

Summary: Customizing Search with SharePoint 2010

CHAPTER 7: ECM: RECORDS MANAGEMENT

SharePoint 2010 Records Management Overview

Recordization

eDiscovery and Holds

Auditing and Reporting

Programming RM in SharePoint

Declaring and Undeclaring a Record

Creating Retention Schedules

Creating Organizer Rules

Creating Workflows That Use RM

Summary

CHAPTER 8: WEB CONTENT MANAGEMENT

The Content Lifecycle in Web Content Management

Separation of Content and Development

The Important Role of Information Architecture

Foundations of Web Content Management

Page Processing Model

Site Columns

Content Types

Page Layouts

Master Pages

Navigation

Content by Query Web Part

Content Conversion

Summary

CHAPTER 9: ELECTRONIC FORMS

Introducing the Training Management Application

Customizing SharePoint List Forms

Creating the Trainings List

Customizing SharePoint List Forms

Adding Intelligence Using Rules and Views

Publishing List Forms

Distributing the Trainings List

Designing InfoPath Form Templates

What Is a Form Library?

Designing Your Form Template

Querying SharePoint Lists in Forms

Querying REST Web Services

Submit Behavior

Form Programming

Publishing an InfoPath Form

Publishing to a Form Library vs. Publishing to a Content Type

Form Security

Sandboxing Your Forms

Form Anatomy

Extracting the Form’s Data

Tools for Form Developers

The Rule Inspector

The Design Checker

IE Developer Tools

Fiddler Tool

Tiny Inline Tools

Building Web Parts Using InfoPath

InfoPath Form Web Part

Using InfoPath to Create Connected Web Parts

Getting Data from Other Web Parts

Empowering Users with Mashups

Summary

CHAPTER 10: ECM: DOCUMENT MANAGEMENT

A New Enterprise Content Mindset

New ECM Features

Expanded ECM Object Model

Getting the Most Out of the Document Center

Visual Studio and the Document Center

Content Routing

Managing the Content Organizer

Using Document Libraries in the Document Center

Metadata Navigation and Filtering

Visual Studio and Document Libraries

Managed Metadata

Types of Metadata

Managed Metadata Service Application

Content Types

Document ID Service

Create a Custom Document ID Provider

Summary

CHAPTER 11: BUSINESS CONNECTIVITY SERVICES

Introducing Business Connectivity Services

Creating Simple BCS Solutions

Understanding BCS Architecture

Understanding Connectors

Understanding Business Data Connectivity

Understanding the Secure Store Service

Understanding Package Deployment

Understanding Authentication Scenarios

Configuring Authentication Models

Accessing Claims-Based Systems

Accessing Token-Based Systems

Managing Client Authentication

Managing Authorization

Creating External Content Types

Creating Operations

Creating Relationships

Defining Filters

Using ECTs in SharePoint 2010

Creating Custom Forms

Using External Columns

Business Data Parts

Creating a Profile Page

Searching External Systems

Supplementing User Profiles

Using ECTs in Office 2010

Using the SharePoint Workspace

Understanding Outlook Integration

Using Word Quick Parts

Creating Custom BCS Solutions

Using the Runtime Object Model

Using the Administration Object Model

Creating .NET Assembly Connectors

Summary

CHAPTER 12: WORKFLOW

Training Approval Workflow

Creating the Training Content Type

Workflow Development Lifecycle

Prototyping in Visio

Customizing the Workflow in SharePoint Designer

Creating Custom Actions with Visual Studio 2010

Importing to Visual Studio 2010

Building Workflows with Visual Studio 2010

Site Workflows

Pluggable Workflow Services

Tapping into Workflow Events

Summary

CHAPTER 13: BUSINESS INTELLIGENCE

Challenges with Traditional Business Intelligence

Integration with SharePoint: The History

Highlights of Business Intelligence in SharePoint Server 2010

Important Terms and Concepts

Using the Adventure Works Sample Databases

The Starting Point: Business Intelligence Center

Excel Services

Excel Services Architecture

Office Data Connection

Authoring Workbooks in Excel

Publishing the Workbook

PerformancePoint Services

Dashboard vs. Scorecard

PerformancePoint Services Architecture

Introducing Dashboard Designer

Creating Your First Dashboard

One-Click Publishing to SharePoint

Time Intelligence Filtering

Reporting Services 2008 R2

Integration Modes

Local Mode Architecture

Connected Mode Architecture

Configuring the BI Center

BIDS 2008 R2 or Report Builder 3.0?

Building and Deploying Reports

Caching and Snapshots

Reporting on SharePoint Data

Claims and BI Solutions

Summary

CHAPTER 14: SHAREPOINT ONLINE

SharePoint Online Overview

Developing in the Cloud

Visual Sandbox Web Parts

Debugging Your Solutions

Example Cloud Scenarios

Summary

Appendix A: Additional Help and Resources

Index

Image

Professional SharePoint® 2010 Development

Published by
Wiley Publishing, Inc.
10475 Crosspoint Boulevard
Indianapolis, IN 46256
www.wiley.com

Copyright © 2010 by Wiley Publishing, Inc., Indianapolis, Indiana

Published simultaneously in Canada

ISBN: 978-0-470-52942-3

Manufactured in the United States of America

10 9 8 7 6 5 4 3 2 1

No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600. Requests to the Publisher for permission should be addressed to the Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ  07030, (201) 748-6011, fax (201) 748-6008, or online at http://www.wiley.com/go/permissions.

Limit of Liability/Disclaimer of Warranty: The publisher and the author make no representations or warranties with respect to the accuracy or completeness of the contents of this work and specifically disclaim all warranties, including without limitation warranties of fitness for a particular purpose. No warranty may be created or extended by sales or promotional materials. The advice and strategies contained herein may not be suitable for every situation. This work is sold with the understanding that the publisher is not engaged in rendering legal, accounting, or other professional services. If professional assistance is required, the services of a competent professional person should be sought. Neither the publisher nor the author shall be liable for damages arising herefrom. The fact that an organization or Web site is referred to in this work as a citation and/or a potential source of further information does not mean that the author or the publisher endorses the information the organization or Web site may provide or recommendations it may make. Further, readers should be aware that Internet Web sites listed in this work may have changed or disappeared between when this work was written and when it is read.

For general information on our other products and services please contact our Customer Care Department within the United States at (877) 762-2974, outside the United States at (317) 572-3993 or fax (317) 572-4002.

Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not be available in electronic books.

Library of Congress Control Number: 2010923551

Trademarks: Wiley, the Wiley logo, Wrox, the Wrox logo, Wrox Programmer to Programmer, and related trade dress are trademarks or registered trademarks of John Wiley & Sons, Inc. and/or its affiliates, in the United States and other countries, and may not be used without written permission. SharePoint is a registered trademark of Microsoft Corporation in the United States and/or other countries. All other trademarks are the property of their respective owners. Wiley Publishing, Inc. is not associated with any product or vendor mentioned in this book.

This book is dedicated to the memory of Dyana Eckstein who was a loved sister, aunt, and friend. She will always be loved and remembered in our thoughts. We miss and love you.

—TOM RIZZO

I would like to dedicate this book to S. Khatoon. Thank you for being the love of my life, my best friend, and my family!

—REZA ALIREZAEI

ABOUT THE AUTHORS

Image

TOM RIZZO is a senior director in the SharePoint team at Microsoft. This is Tom’s second stint with SharePoint having worked in the SharePoint and Exchange Server teams back in the SharePoint 2001 timeframe. Before working in SharePoint, Tom worked in the SQL Server team and also as a technical specialist in the Microsoft field organization, where he evaluated and deployed Microsoft technologies for the United States Department of Defense. You can reach Tom, who authored chapters 1 through 4, 7, 14, and Appendix A, at thomriz@microsoft.com.

Image

REZA ALIREZAEI is an independent consultant and a five-time recipient of Microsoft’s Most Valuable Professional (MVP) award for Microsoft SharePoint Portal Server & Microsoft Office SharePoint Server. He is focused on designing and implementing enterprise solutions for SharePoint, related .Net technologies, and Microsoft Business Intelligence stack. Reza can be reached at reza@devhorizon.com.

Image

PAUL J. SWIDER is a freelance consultant and the Enterprise SharePoint Strategist for OnClick Solutions. In addition, he is President of the Charleston SharePoint Users Group and an accomplished entrepreneur. Paul has trained and consulted thousands of SharePoint administrators, developers, and architects. In addition, he writes and teaches about enterprise collaboration concepts with demonstrated knowledge you can only get in “the trenches.” His specialties include enterprise information architecture, SharePoint development patterns, and social media integration. When not working, Paul enjoys sailing and snowboarding. He wrote chapters 5 and 10.

Image

SCOT HILLIER is an independent consultant and Microsoft SharePoint Most Valuable Professional focused on creating solutions for Information Workers with SharePoint, Office, and related .NET technologies. He is the author/coauthor of 12 books on Microsoft technologies including “Inside SharePoint 2010.” Scot splits his time between consulting on SharePoint projects and training for Critical Path Training (www.criticalpathtraining.com). Scot is a former U. S. Navy submarine officer and graduate of the Virginia Military Institute. Scot authored chapter 11 and can be reached at scot@shillier.com.

Image

JEFF FRIED is a senior product manager at Microsoft, specializing in strategic applications of search technology. Jeff is a frequent speaker and writer in the industry, holds 15 patents, has authored more than 50 technical papers, and has led the creation of pioneering offerings in next generation search engines, networks, and contact centers. He wrote chapter 6.

Image

KENNETH SCHAEFER is an independent developer and designer focusing on SharePoint and web-based solutions. Ken lives in the Chicago area with his daughter, Alexa. Ken, who authored chapter 8, can be reached at ken@kenschaefer.name.

ABOUT THE TECHNICAL EDITORS

MATT RANLETT, a SQL Server MVP, has been a fixture of the Atlanta .NET developer community for many years. A founding member of the Atlanta Dot Net Regular Guys (www.devcow.com), Matt has formed and leads several area user groups. Despite spending dozens of hours after work on local and national community activities such as the SharePoint 1, 2, 3! series (www.sharepoint123.com), organizing three Atlanta Code Camps, working on the INETA Board of Directors as the Vice President of Technology, and appearing in several Pod Casts such as .Net Rocks and the ASP.Net Pod Cast, Matt recently found the time to get married to a wonderful woman named Kim, who he helps to raise three monstrous dogs. Matt currently works as a Senior Consultant with Intellinet and is part of the team committed to helping people succeed by delivering innovative solutions that create business value.

KANWAL KHIPPLE is an independent consultant and Microsoft SharePoint MVP working with enterprise clients in America and Canada. Kanwal strives to build SharePoint solutions that make life easier for Information Workers. His passion lies with Information Architecture, Governance, Business Process Automation, and Branding. Kanwal is an integral part of the global SharePoint Community, contributing through his blog www.sharepointbuzz.com. He can be reached at kanwal@khipple.com.

CREDITS

ACQUISITIONS EDITOR
Paul Reese

DEVELOPMENT EDITORS
Lori Cerreto

PROJECT EDITOR
Ami Frank Sullivan

TECHNICAL EDITORS
Matt Ranlett
Kanwal Khipple

PRODUCTION EDITOR
Rebecca Anderson

COPY EDITOR
Foxxe Editorial

EDITORIAL DIRECTOR
Robyn B. Siesky

EDITORIAL MANAGER
Mary Beth Wakefield

ASSOCIATE DIRECTOR OF MARKETING
David Mayhew

PRODUCTION MANAGER
Tim Tate

VICE PRESIDENT AND EXECUTIVE GROUP PUBLISHER
Richard Swadley

VICE PRESIDENT AND EXECUTIVE PUBLISHER
Barry Pruett

ASSOCIATE PUBLISHER
Jim Minatel

PROJECT COORDINATOR, COVER
Lynsey Stanford

PROOFREADER
Beth Prouty, Word One

INDEXER
Johnna VanHoose Dinse

COVER DESIGNER
Michael E. Trent

COVER IMAGE
© Stephen Strathdee/istockphoto

ACKNOWLEDGMENTS

I WOULD LIKE TO THANK Spencer Harbar and Robert Bogue who answered some of my technical questions during the process of writing my chapters. I also want to thank those at Microsoft who provided their kind support: Chris Keyser, Arpan Shah and Pej Javaheri. And, a special thanks goes to Vahid Haeri, a close friend who always made sure that I had access to my testing farms with the latest bits installed.

—REZA ALIREZEAI

INTRODUCTION

 

 

THIS BOOK IS FOR ANYONE INTERESTED in developing applications on top of SharePoint 2010. While some knowledge is assumed about SharePoint, readers will find the examples comprehensive and easy to follow if they have previous knowledge of web development and development tools.

WHAT THIS BOOK COVERS

SharePoint 2010 is a big product and this book is a big, diverse book. So, before you dive into the book, we wanted to give you a little feel for what each chapter entails and what you can expect once you have read the chapter.

Introductory Chapters

The first couple of chapters provide an introduction to SharePoint 2010, since the 2010 release is a large release across all the many SharePoint workloads. In these chapters, you will develop an understanding of the features that 2010 provides, from creating collaboration sites to managing your content.

From there, you will explore the new developer tools in Visual Studio 2010 for SharePoint. With the 2010 release of Visual Studio, Microsoft has invested in making Visual Studio a first-class SharePoint development tool with new development, debugging, and testing tools targeted specifically at SharePoint 2010.

Finally, you will see the IT professional improvements for developers. These improvements make deploying and debugging with your IT counterparts faster and easier.

Platform Services

The next section of the book is about the base platform services and APIs provided by SharePoint. This is a big section since SharePoint is a big product with a lot of platform services. This section also serves as a basis for the rest of the book when it comes to the APIs and protocols that you will use to develop with SharePoint.

Workload Chapters

The majority of the book focuses on the workload services and platform provided by SharePoint. This includes social networking, content management, search, forms, and business intelligence. This section of the book is where you can learn to build applications that extend the built-in workloads of SharePoint and shape them to perform the functionality you need to solve your business problems.

Online Services

The last section introduces you to moving your applications to Microsoft’s cloud services called Microsoft Online Services. Through these cloud services, specifically Microsoft SharePoint Online, you can start hosting and sharing your application in the cloud with either coworkers or business partners without having to run the IT infrastructure yourself.

HOW THIS BOOK IS STRUCTURED

This book is structured to build logically on the skills you learn as you progress through it. After the initial introduction and base platform chapters, the book moves into the more advanced part of the platform. Each chapter builds on knowledge acquired from earlier in the book, so you will want to read through the chapters in succession or at the very least read the introduction and platform chapters before reading later chapters in the book.

WHAT YOU NEED TO USE THIS BOOK

First, you will need a copy of SharePoint 2010. The book is written to the public beta of SharePoint 2010, so you will want to download the beta. We have done our best to also test against the released version of SharePoint, so please check the WROX site regularly to see if there are updated code samples available.

Besides SharePoint 2010, you will need Visual Studio 2010 and Office 2010. The easiest way to get all these products is to download the pre-build virtual machine, which includes these products that Microsoft will release after the RTM of SharePoint 2010.

CONVENTIONS

To help you get the most from the text and keep track of what’s happening, we’ve used a number of conventions throughout the book.

Image

Boxes like this one hold important, not-to-be forgotten information that is directly relevant to the surrounding text.

Image

Notes, tips, hints, tricks, and asides to the current discussion are offset and placed in italics like this.

As for styles in the text:

We use a monofont type with no highlighting for most code examples.
We use bolded code to emphasize code that is of particular importance in the present context.

SOURCE CODE

As you work through the examples in this book, you may choose either to type in all the code manually, or to use the source code files that accompany the book. All the source code used in this book is available for download at http://www.wrox.com. When at the site, simply locate the book’s title (use the Search box or one of the title lists) and click the Download Code link on the book’s detail page to obtain all the source code for the book. Code that is included on the Web site is highlighted by the following icon:

Image

Listings include the filename in the title. If it is just a code snippet, you’ll find the filename in a code note such as this:

code snippet filename

Image

Because many books have similar titles, you may find it easiest to search by ISBN; this book’s ISBN is 978-0-470-52942-3.

Once you download the code, just decompress it with your favorite compression tool. Alternately, you can go to the main Wrox code download page at www.wrox.com/dynamic/books/download.aspx to see the code available for this book and all other Wrox books.

ERRATA

Every effort is made to ensure that there are no errors in the text or in the code. However, no one is perfect, and mistakes do occur. If you find an error in one of our books, like a spelling mistake or faulty piece of code, your feedback is welcome. By sending in errata, you may save another reader hours of frustration and at the same time you will be helping us provide even higher quality information.

To find the errata page for this book, go to www.wrox.com and locate the title using the Search box or one of the title lists. Then, on the book’s detail page, click the Book Errata link. On this page, you can view all errata that has been submitted for this book and posted by Wrox editors. A complete book list including links to each book’s errata is also available at www.wrox.com/misc-pages/booklist.shtml.

If you don’t spot “your” error on the Book Errata page, go to www.wrox.com/contact/techsupport.shtml and complete the form there to send us the error you have found. Once the information is checked, a message is posted to the book’s errata page and the problem is fixed in subsequent editions of the book.

P2P.WROX.COM

For author and peer discussion, join the P2P forums at p2p.wrox.com. The forums are a Web-based system for you to post messages relating to Wrox books and related technologies, and interact with other readers and technology users. The forums offer a subscription feature to email you topics of interest of your choosing when new posts are made to the forums. Wrox authors, editors, other industry experts, and your fellow readers are present on these forums.

At http://p2p.wrox.com you will find a number of different forums that will help you not only as you read this book, but also as you develop your own applications. To join the forums, just follow these steps:

1.  Go to p2p.wrox.com and click the Register link.

2.  Read the terms of use and click Agree.

3.  Complete the required information to join, as well as any optional information you wish to provide, and click Submit.

4.  You will receive an email with information describing how to verify your account and complete the joining process.

Image

You can read messages in the forums without joining P2P, but in order to post your own messages, you must join.

Once you join, you can post new messages and respond to messages other users post. You can read messages at any time on the web. If you would like to have new messages from a particular forum emailed to you, click the Subscribe to this Forum icon by the forum name in the forum listing.

For more information about how to use the Wrox P2P, be sure to read the P2P FAQs for answers to questions about how the forum software works, as well as many common questions specific to P2P and Wrox books. To read the FAQs, click the FAQ link on any P2P page.

1

Introduction to SharePoint 2010

WHAT’S IN THIS CHAPTER?

Microsoft SharePoint Server 2010 introduces a lot of new functionality that you need to understand in order to write better applications on the platform. Beyond increasing the new features in each of the SharePoint workloads, such as collaboration or portal, Microsoft has added entirely new products to the SharePoint family, including the acquired FAST technologies for Enterprise Search and the PerformancePoint services that enhance SharePoint’s business intelligence (BI) capabilities. With these new additions, the surface area of SharePoint has doubled, so this chapter will quickly introduce the new set of features in both SharePoint and the Office client.

WHAT’S NEW IN THE SHAREPOINT PLATFORM AND TOOLS

SharePoint, as a development platform, has matured over time from server APIs to web services to now supporting the latest developer technologies, such as Silverlight, LINQ, and REST APIs. Developers who build on the SharePoint platform will find some very welcome additions to the platform, which users have been requesting for a number of years, such as the ability to develop and test on client operating systems, including Windows Vista and Windows 7. You no longer need to do remote development or run a virtual server OS on your client machine to develop on SharePoint. Let’s look at the top new enhancements in the platform that you can build against.

Language Integrated Query (LINQ)

In the 2008 release of Visual Studio and .NET 3.5, Microsoft introduced new technology and semantics that allow developers to write against objects that map back to a number of different datasources, even if those datasources do not store the data using object storage. Effectively, LINQ is an object mapper with special operators in the .NET languages. Therefore, you can take a relational database table, use Visual Studio to map the database to your objects, and then write to your objects. For LINQ to work, you need a provider that takes the object calls and translates them into the correct native calls of the underlying datasource, such as SQL queries for databases. With SharePoint 2010, a new LINQ provider for SharePoint converts object operations into the correct SharePoint operations using the native CAML language that SharePoint understands.

List Enhancements

Lists are a critical part of the SharePoint platform. In fact, everything in SharePoint is powered by lists, whether it’s a built-in application or your own custom application. With the 2010 release, lists have new, long-awaited functionality, including new scale limits, XSLT views for better customization, list relationships that allow cascade deletes and updates to work, and formula validation for columns in a list. There is also a new list type called the External Data List. This type of list allows you to surface external data, such as database or web service data, inside SharePoint with read/write capabilities. You’ll learn more about this new type of list later in the book.

Business Connectivity Services

Business Connectivity Services (BCS) is the new name for the Business Data Catalog technologies from SharePoint 2007. BCS is greatly enhanced in the 2010 release with read/write capabilities, support for Windows Communication Foundation (WCF), and new client capabilities so that you have APIs both on the server and client, and can sync Line-of-Business (LOB) data from your backend systems to the client cache and work on that LOB data when offline. BCS will synchronize the data from the client with the server when you can reconnect. As part of the tooling, SharePoint Designer and Visual Studio include entity-modeling tools for BCS so that you can create business objects that connect to your LOB datasources from within these tools, and write your business logic for reading and writing your LOB data.

Silverlight Integration

If you are using SharePoint 2007, one of the biggest challenges is trying to get Silverlight to work in a SharePoint environment. You have to modify your web.config, hack around to deploy your Silverlight application to a content viewer web part, and then hope you don’t need to debug the application. Silverlight shipped after SharePoint 2007, which made it difficult for the SharePoint team to foresee the requirements of being a great Silverlight host. With the 2010 release, SharePoint has become that great Silverlight host. Built into SharePoint is a Silverlight web part; you can drag and drop this web part onto your page, point it to your Silverlight application, and start using the Silverlight application in your SharePoint environment in minutes.

Client-Side OM

Frequently, developers want to write applications that need to talk to SharePoint from a client operating system and from client applications, such as the ones in the Office suite. With the addition of Silverlight integration to SharePoint, a client object model is critical because it makes it easier for developers to write applications against a full object model, rather than trying to call web services from within their client applications. Additionally, because Silverlight runs on the client rather than running server-side, the client Object Model (OM) makes it easier for developers to build rich Silverlight applications on SharePoint. SharePoint 2007 requires you to write against untyped web services for remoting your applications. The client object model provides a more productive development experience since it provides a typesafe environment that works with the Intellisense in Visual Studio.

Web 2.0 Protocols and New Standards

There are a number of new protocols and standards that SharePoint 2010 implements across its workloads. Some are considered “Web 2.0” protocols, such as Representational State Transfer (REST), Asynchronous JavaScript + XML (AJAX), JavaScript Object Notation (JSON) and ATOMSub/Pub, while others are going through standards validation, such as the Content Management Interoperability Services (CMIS). SharePoint still continues to support other standards such as WebDAV and web services. Adding these newer protocols and standards allows SharePoint to interoperate with other systems more easily, whether it is to create mash-ups between systems hosted in SharePoint or to allow data interoperability between systems.

Sandbox Solutions and Resource Governors

One of the biggest downsides to developing custom solutions in SharePoint 2007 is the requirement for the solution developer to be an administrator on the server. Often, IT administrators will not allow developers to access the server with the elevated privileges they need to deploy their solution, as custom web parts or other SharePoint solutions require that you place your code in the global assembly cache (GAC) or in the file system related to your SharePoint site. Plus, the administrator has no simple way to ensure that badly written code does not slow down the system, crash it, or perform malicious activities. You could implement code access security (CAS), but that requires the developer to write the code to implement it; in addition, managing CAS policies is not a simple task.

However, with SharePoint 2010, there is a new feature called Sandbox Solutions that allows for the deployment of SharePoint solutions inside a secure environment hosted in SharePoint. Because it is a secure environment, the IT administrator can control who can deploy solutions and how many resources these solutions receive through the new resource governors built into the system. For example, if a custom-developed solution is using too many CPU resources, SharePoint will automatically stop running the solution. That said, today the Sandbox Solution offers only a subset of the SharePoint object model, so while it might be a good solution for some custom applications, you will have to evaluate if there is enough functionality to meet your application needs.

SharePoint Designer

Besides making SharePoint Designer (SPD) free, Microsoft has invested in making SharePoint Designer better in the 2010 release. SPD has been redesigned to have more of a SharePoint-based view than the folder-based view it previously had. Now, you can browse by the types of items you are looking for rather than just through the site hierarchy. In addition, SPD introduces a new entity modeler to make it easier for you to build BCS connections to your backend systems and model the backend data inside of the SharePoint entity system. Finally, SPD has enhanced the workflow design capabilities that import Visio diagrams into SPD and allow you to add business logic to those diagrams using the SPD Workflow Designer, and then display the graphical status of your workflow overlaid on those diagrams as part of your workflow.

Image

SPD 2010 will continue to be a free product, which makes it an invaluable tool for any SharePoint developer, even if you just use it as a simple web design or SharePoint debugging tool.

Visio and Access Services

Two new web companions are available in SharePoint 2010, Visio Services and Access Services, in addition to the previous web companions — Excel Services and InfoPath Form Services. With Visio Services, you can design your Visio diagrams, connect those diagrams to backend systems for visualization of data, and then post those diagrams to SharePoint. SharePoint will render your diagram, with the data connectivity, through the SharePoint web experience.

Image

Please note that the Visio web rendering is read-only, and to get the Visio Services functionality, you need a high-end version of Visio called Visio Ultimate. (Incidentally, this product is not part of the Office Ultimate suite.)

With Access Services, you can convert your Access applications to web-based applications. With the previous version of Access, Access 2007, you could take certain Access databases that were compatible with SharePoint’s logical data model and export that data to SharePoint but still manipulate it from within Access. With the new capabilities that Access Services provides, you can take your Access forms and move them over to web-based forms to complete the transformation of your application.

InfoPath (Forms, List Forms, Mobile Forms)

InfoPath Form Services has a number of new enhancements, including the ability to replace list item forms for activities such as editing properties on an item. This makes it easier to build richer forms with business logic and data connectivity that work in the rich client through the new SharePoint Workspace (formerly Groove), which is covered later in this chapter, and in the browser. In addition, InfoPath Forms Services adds new mobile form capabilities that let you create forms that run across mobile devices, browsers, and Office clients.

Visual Studio

With Visual Studio (VS) 2010, there is a major jump ahead for SharePoint developers. Previously, VS did not have much SharePoint development functionality and you had to download the community-supported Visual Studio Extensions for Windows SharePoint Services. With VS 2010, you can browse your SharePoint environment from the Server Explorer to quickly see your lists, libraries, content types, workflows, and other SharePoint artifacts. A visual Web Part Designer frees you from having to hand code HTML to add visual elements to your web parts. An entity modeling tool works with the BCS technologies that were discussed earlier so that you can model your business entities, write your business logic, and connect SharePoint to your backend systems. Finally, VS integrates SharePoint development into a team development environment with support for Team Foundation Server and easy deployment using the new Web Solution Package format, which is discussed next.

Web Solution Packages

To make it easier to package and deploy solutions, SharePoint 2010 improves the Web Solution Package (WSP) format so that it is supported across all tools, allowing you to export your site through the browser, SharePoint Designer, and Visual Studio. This means that you can quickly upgrade or downgrade your solutions between the tools, depending on the person working on the solution or the tool required to build the solution. In addition, SharePoint Online, the Microsoft-hosted version of SharePoint, supports this format so that you can move solutions from on-premises to the cloud without having to change formats or rework the package.

Developer Dashboard

One of most common culprits of poorly performing SharePoint sites is poorly performing code, whether the problem is bad .NET code, bad database calls the .NET code makes, or coding errors that cause excessive CPU, disk, or memory utilization. Tracking down and figuring out where the issues are in the code was a laborious process in the 2007 release. SharePoint 2010 introduces a new developer dashboard that allows you to see all the calls made on a page right inside of the user interface. Those calls can be ones that SharePoint is making or they can be your custom code. By looking at the call stack, response times, and utilization, you can quickly uncover where your code is performing poorly and try to fix it.

WHAT’S NEW IN COLLABORATION/SOCIAL COMPUTING

Collaboration and social computing are two of the fastest changing technologies in the industry. Looking back just a few years, you’ll note a number of technologies in this space did not exist, such as social tagging, microblogging, and the APIs that support these technologies. SharePoint 2010 adds new capabilities in these areas, but this space is not done innovating, so at some point you may have to build your own social capabilities on top of SharePoint 2010 to take advantage of future technology advances in this area.

Enhanced Blogs and Wikis

SharePoint 2007 introduced blog and wiki capabilities to the SharePoint product. The most interesting piece of the blog and wiki capability was the integration with the rest of the SharePoint functionality for versioning and content approval. Unfortunately, blogs and wikis were a late addition to the 2007 product, so not all of the desired functionality made it into the final release. In the 2010 product, blogs and wikis are enhanced to add new capabilities to the core blog and wiki functionality. Also, these applications can take better advantage of new 2010 capabilities, such as content rating, tagging, and feeds. In addition, records management can now be applied to blogs and wikis just like any other content in SharePoint so that you can have compliance and governance on your blog and wiki content. Finally, SharePoint also introduces enterprise wikis, which combine the content publishing and social features to provide a more robust wiki solution that has capabilities such as ratings of wiki pages.

Social Tagging and Ratings

One phenomenon on the Internet is social tagging and content rating. If you have ever used Delicious or Digg, then you’ve used a social tagging technology where you can search, sort, and filter by tag, track what other people are tagging, and obtain feeds on your tags related to your areas of interest. Combined with tagging, ratings help you understand the value of the content and can help filter out poor content based on other people’s ratings. Both of these features are implemented in the 2010 release so that you can tag anything in SharePoint, whether it’s content or people. Plus, you can rate all of your content, so if you want to find all Word documents rated with four or more stars, you can quickly search your site to find this information. There is a blurring of the line between social and Enterprise Content Management (ECM) areas, as you will see throughout this book. The two areas are converging, with social being the bottom-up technology driven by users and ECM being the top-down technology that helps with compliance in your social environment. Many of the features are shared between the two technological areas, especially tagging, where the social tag infrastructure, called folksonomies, are actually open term sets in a corporate taxonomy. Finally, as everyone always asks about this in regard to 2007: yes, SharePoint 2010 does ship with a Tag Cloud web part.

Activity Feeds

If you have used Facebook or MySpace, then you know how powerful it is to have the ability to track what your circle of friends is doing. In a corporate environment, understanding what is happening in your social network is important so that if someone is working on a document that you may be interested in and that information appears in your social feed, you can quickly view the document. Another example is if there is a tag that you have been tracking as an interest area; you may want to get an activity feed on that tag as people tag other content or people with it.

Social Bookmarking

Often, there are interesting web bookmarks that people want to share with other members of their organizations. These bookmarks can be internal or external websites and can be rated, tagged, or shared using the other social features included in SharePoint.

Organization Browser

In both large and small organizations, browsing through an organizational chart is a good way to get an understanding of which people are in which groups and what they work on. While SharePoint 2007 shipped a simple organizational tree view, many customers wanted something richer with which to look at their organizational hierarchy and the rich profile information stored in their organization. SharePoint 2010 ships a Silverlight-based organizational browser. The advantages of using Silverlight are a better navigation experience and the ability to quickly navigate the organizational hierarchy without postbacks to the server.

Outlook Social Newsfeeds and Expertise

No social solution would be complete without integrating into the most popular information management client that people leave open on their desktop all day — Outlook. While Outlook and SharePoint integrate today for working with tasks, discussions, and documents, Outlook 2010 now integrates with SharePoint and other social technologies, such as Facebook or MySpace, through its ability to surface richer information about people such as pictures, activity feeds, previous conversations, and even previous instant messaging sessions. By showing related information, you can quickly surmise the semantics around the conversation and the people involved.

Beyond social newsfeeds, Outlook supports expertise mining by discovering, surfacing, and allowing you to approve keywords associated with you based on your email communications. These keywords are stored with your profile, so they are searchable, which makes connecting to experts in an organization easier.

Microblogging and Mobile Client

One of the new developments on the Internet is microblogs — 140 character blogs — from services such as Twitter. With SharePoint, you are able to create microblogs and, with the new implementation of the SharePoint Mobile client, write those microblogs on your mobile device. The mobile client also supports browsing your SharePoint sites, synchronizing the content offline to your mobile device, and performing searches. By having a mobile client, you can quickly find information about people, including their status updates, tags, expertise, and other social information.

Social Search

Once you start using the new social features of SharePoint, finding information becomes easier because of the ability of the search engine to leverage the social information contained in other pieces of the product. Tags work with search queries, content rating can be used to refine results, and you get better social distance calculations and expertise results because of the enhanced people profiles. An improved search user interface makes finding the right information easier with a preview of Office documents, expertise location, and better navigators for filtering down to the right content or person.

WHAT’S NEW IN SEARCH

With the acquisition of FAST, Microsoft is making a lot of changes in search from the low-end to the high-end.  With these changes come new challenges for the developer in understanding which technologies to use and how to write custom code.  But, it also presents new opportunities to innovate in the applications you create that are powered by search.

New Core Search Query Capabilities

One criticism of the 2007 release was that search did not support wildcards, suffix matchings, grouping of query terms, or logical operators. Many of these deficiencies were not the result of the engine not supporting these options; it was that the search web parts did not expose these capabilities. So, developers had to write custom user interfaces to the search API if they wanted this functionality, which meant recreating all the functionality shipped in the web parts. With 2010, you no longer need to write this functionality yourself. In fact, the search web parts are also extensible in this release, unlike in 2007, in which they were sealed from developers.

Enhanced Core Search Results

There are a number of new capabilities in the visualization of search results. If you have seen search results for people in 2007, then you will be familiar with navigators which allow you to refine your results based on different properties, such as a person’s title or department. This capability has been expanded to support not just people results but also core content results so that when you run a search, you can filter by author, document type, or other properties.

Beyond the navigators, search also provides rich previewing of content by leveraging the integrated FAST technologies. When an Office document is the search result, end users can preview that document. They do not have to open the document to see if it is the result they wanted. Instead, they can just preview the document, and then open it if they want to, which saves time hunting and pecking for the right content.

Enhanced People Search: Phonetics

Often when people are searching for another person, they don’t know how to spell certain parts of the other person’s name. They may know how it sounds phonetically but not the exact spelling. Normally, with search, if you don’t spell the name correctly, the engine can’t find it. However, with the 2010 release, the query engine has phonetic search capability for searching for people. As long as the spelling sounds like the name of the person (such as searching for Tom Risso when you are in fact looking for Tom Rizzo), the engine will sound out the search term and find the right person.

Enhanced People Search: Address Book Style Lookups