CONTENTS
Chapter 1: Introduction to Sharepoint 2010
What’s New in the SharePoint Platform and Tools
What’s New in Collaboration/Social Computing
What’s New in Search
What’s New in Enterprise Content Management
What’s New in Forms
What’s New in Groove (SharePoint Workspace)
What’s New in Cloud Services
Summary
Chapter 2: Developer Tools for Sharepoint 2010
OOB Developer Experience
Understanding SharePoint Designer 2010
Understanding Visual Studio 2010 Tools
Setting Up Your Development Environment
Troubleshooting with Debugging and Testing
Deploying and Maintaining Your Code
Upgrading Code from 2007
Summary
Chapter 3: It Pro Enhancements for the Developer
Performance Improvements
High-Availability Improvements
Security Improvements in SharePoint 2010
Management Improvements
Summary
Chapter 4: Sharepoint Platform
Platform Overview
New User Interface
List, View, and Event Enhancements
Overview of Data Technologies
Timer Service Applications
Sandbox Solutions
Mobile Solutions
Summary
Chapter 5: Collaboration and Social Computing
People-Centricity
Social Networking and My Site
Blogs and Wiki Site Definitions
Summary
Chapter 6: Search
Search Options with SharePoint 2010
Search User Experience
Search Architecture and Topologies
Developing with Enterprise Search
Customizing the Search User Experience
Search Connectors and Searching LOB Systems
Working with Federation
Working with the Query OM
Social Search
Content Enhancement
Extending Search Using the Administrative OM
Combining Search with Other Workloads
Search and the Cloud
Summary
Chapter 7: Records Management
SharePoint 2010 Records Management Overview
Programming RM in SharePoint
Summary
Chapter 8: Web Content Management
The Content Lifecycle in Web Content Management
Foundations of Web Content Management
Site Variations
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
Designing InfoPath Form Templates
Tools for Form Developers
Building Web Parts Using InfoPath
Summary
Chapter 10: ECM: Document Management
A New Enterprise Content Mindset
Getting the Most Out of the Document Center
Content Routing
Using Document Libraries in the Document Center
Managed Metadata
Content Types
Document ID Service
Summary
Chapter 11: Introducing Business Connectivity Services
Introducing Business Connectivity Services
Understanding BCS Architecture
Working with BDC Metadata Models
Working with External Datasources
Creating Methods
Working with External Lists
Summary
Chapter 12: Advanced Business Connectivity Services
Creating .NET Assembly Connectors
Packaging Considerations
Enabling Search Support
Working with the BDC Server Runtime Object Model
Summary
Chapter 13: Workflow
Training Approval Workflow
Workflow Development Lifecycle
Building Workflows with Visual Studio 2010
Summary
Chapter 14: Business Intelligence
Challenges with Traditional Business Intelligence
Integration with SharePoint: The History
Highlights of Business Intelligence in SharePoint Server 2010
Important BI Terms and Concepts
Using the AdventureWorks Sample Databases
The Starting Point: Business Intelligence Center
Excel Services
PerformancePoint Services
Reporting Services 2008 R2
Reporting on SharePoint Data
Claims and BI Solutions
Summary
Chapter 15: Sharepoint Online
BPOS: SharePoint Online Overview
Developing in the Cloud
Example Cloud Scenarios
Office 365 Overview
Azure Overview
Windows Azure Virtual Network
Developer Tools for Windows Azure
SharePoint and Azure Integration Scenarios
Writing SharePoint Online Applications
Summary
Appendix
Introduction
Advertisement

Professional SharePoint 2010 Development, Second Edition
Published by
John Wiley & Sons, Inc.
10475 Crosspoint Boulevard
Indianapolis, IN 46256
www.wiley.com
Copyright © 2012 by John Wiley & Sons, Inc., Indianapolis, Indiana
Published simultaneously in Canada
ISBN: 978-1-118-13168-8
ISBN: 978-1-118-22504-2 (ebk)
ISBN: 978-1-118-23868-4 (ebk)
ISBN: 978-1-118-26319-8 (ebk)
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 publishes in a variety of print and electronic formats and by print-on-demand. Some material included with standard print versions of this book may not be included in e-books or in print-on-demand. If this book refers to media such as a CD or DVD that is not included in the version you purchased, you may download this material at http://booksupport.wiley.com. For more information about Wiley products, visit www.wiley.com.
Library of Congress Control Number: 2012933263
Trademarks: Wiley, the Wiley logo, Wrox, the Wrox logo, 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. All other trademarks are the property of their respective owners. John Wiley & Sons, Inc., is not associated with any product or vendor mentioned in this book.
I would like to dedicate this book to my very dear grandmother, S.Khatoon, who passed away as I was working on the second edition of this book. She will be loved and remembered.
—Reza Alirezaei
ABOUT THE AUTHORS
TOM RIZZO is a Senior Director in the Microsoft Office and Office 365 product management group. Previously, Tom was part of the SharePoint, SQL Server, and Exchange Server product management groups, where he focused on helping shape and grow those businesses and the solutions built on top of them. You can reach Tom at thomriz@microsoft.com.
REZA ALIREZAEI, MVP, MCP, MCPD, MCITP, AND MCTS for SharePoint 2010, is a SharePoint solution architect focused on designing custom applications with SharePoint, Office, and Microsoft Business Intelligence technologies. Reza is the founder and president of Development Horizon where he has helped many clients architect and build large-scale, mission-critical SharePoint applications. Reza also speaks in many local and international conferences. Reza achieved the status of Microsoft Most Valuable Professional (MVP) for SharePoint in 2006, which he still is today. He has also co-authored several books, papers, and articles. Reza can be reached at reza@devhorizon.com.
PAUL J. SWIDER is an international speaker, trainer, and freelance consultant. In addition, he is the founder of the Charleston SharePoint Users Group and an accomplished entrepreneur straight from a barrier island near Charleston, SC where Paul also chases the tides and winds as an avid boater and sailor. Paul is grateful he is able to escape the summer heat in Charleston and consults with some of the most successful companies in the world. Seventeen years of software consulting experience combined with many Microsoft certifications and speaking credentials has made Paul an authority in the SharePoint community. As an MCT, Paul has trained and consulted thousands of SharePoint administrators, developers, and architects.
KEN 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 can be reached at ken@kenschafer.name.
JEFF FRIED began writing software at the tender age of 13 and has been hooked ever since. He has worked extensively with Enterprise Search, including roles as SVP Products for the semantic search startup LingoMotors and VP Advanced Solutions for FAST Search and Transfer. FAST’s acquisition landed him at Microsoft, where he was a senior technical product manager in the SharePoint group. Jeff is currently the CTO at BA Insight, focused on the development of search-based applications with SharePoint. 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 is an amateur musician and lives with his lovely wife and three delicious children in Newton, Massachusetts.
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 15 books and DVDs on Microsoft technologies including Inside SharePoint 2010 and Professional Business Connectivity Services. Scot splits his time between consulting on SharePoint projects, speaking at SharePoint events like Tech Ed, and delivering training for SharePoint Developers. Scot is a former U. S. Navy submarine officer and graduate of the Virginia Military Institute. Scot can be reached at scot@shillier.com.
ABOUT THE TECHNICAL EDITORS
RAHUL SONI started his career working with Visual Basic and went on to learn VB.NET after he moved to Bengaluru, India. After two years of being a dedicated software developer, he joined the Microsoft support team for ASP.NET. Later, he worked for the IIS + ASP.NET team as a Technical Lead at Microsoft for almost two years. Currently, he is a Senior Premier Field Engineer for Microsoft, working on multiple technologies including ASP.NET, AJAX, Silverlight, C#, VB.NET, ADO.NET, LINQ, SharePoint 2007 Administration, SharePoint Development, and SharePoint 2010. He blogs at www.dotnetscraps.com.
ELI ROBILLARD is an independent consultant specializing in large-scale SharePoint solutions, a Microsoft SharePoint Server MVP, a Wrox author, founder of the Toronto SharePoint Users Group, co-founder of the Toronto SharePoint Camp, and co-founder of the ASPInsiders. His clients have included leading energy companies, financial institutions, HR firms, and consulting companies. Eli lives in Toronto, Canada where he also plays music and goes on adventures with his wife Dawn, daughter Irina, and their dog Nukka.
CREDITS
ACQUISITIONS EDITOR
Paul Reese
PROJECT EDITORS
Adaobi Obi Tulton
Rock Solid Editing
TECHNICAL EDITORS
Rahul Soni
Eli Robillard
PRODUCTION EDITOR
Rebecca Anderson
COPY EDITOR
Kezia Endsley
EDITORIAL MANAGER
Mary Beth Wakefield
FREELANCER EDITORIAL MANAGER
Rosemarie Graham
ASSOCIATE DIRECTOR OF MARKETING
David Mayhew
MARKETING MANAGER
Ashley Zurcher
BUSINESS MANAGER
Amy Knies
PRODUCTION MANAGER
Tim Tate
VICE PRESIDENT AND EXECUTIVE GROUP PUBLISHER
Richard Swadley
VICE PRESIDENT AND EXECUTIVE PUBLISHER
Neil Edde
ASSOCIATE PUBLISHER
Jim Minatel
PROJECT COORDINATOR, COVER
Katie Crocker
PROOFREADER
Jen Larsen, Word One New York
INDEXER
Robert Swanson
COVER DESIGNER
LeAndra Young
COVER IMAGE
© iStock / Stephen Strathdee
INTRODUCTION
THIS BOOK IS FOR ANYONE INTERESTED in developing applications on top of SharePoint 2010 or SharePoint Online in Office 365. Although some knowledge is assumed about SharePoint, you will find the examples comprehensive and easy to follow if you 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 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 coworkers or business partners without having to run the IT infrastructure yourself. With Office 365, SharePoint 2010 comes to the cloud and allows you to integrate your SharePoint environment with other environments such as Windows Azure.
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 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.
Boxes like this one hold important, not-to-be forgotten information that is directly relevant to the surrounding text.
Notes, tips, hints, tricks, and asides to the current discussion are offset like this.
As for styles in the text:
- New terms and important words are italicized when introduced.
- Keyboard strokes are shown like this: Ctrl+A.
- Filenames, URLs, and code within the text looks like this: persistence.properties.
- Code is presented in two different ways:
We use a monofont type with no highlighting for most code examples.
We use bold to emphasize code that is particularly important in the present context or to show changes from a previous code snippet.
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 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 website is highlighted by the following icon:

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:
Because many books have similar titles, you may find it easiest to search by ISBN; this book’s ISBN is 978-1-118-13168-8.
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/miscpages/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 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 want to provide, and click Submit.
4. You will receive an email with information describing how to verify your account and complete the joining process.
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.