Tải bản đầy đủ (.pdf) (649 trang)

inside microsoft sharepoint 2010

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (18.23 MB, 649 trang )

www.it-ebooks.info
Ted Pattison
Andrew Connell
Scot Hillier
David Mann
Inside Microsoft
®

SharePoint
®
2010
www.it-ebooks.info
Published with the authorization of Microsoft Corporation by:
O’Reilly Media, Inc.
1005 Gravenstein Highway North
Sebastopol, California 95472
Copyright © 2011 by Critical Path Training, LLC
Complying with all applicable copyright laws is the responsibility of the user. All rights reserved. Without limiting the
rights under copyright, no part of this document may be reproduced, stored in or introduced into a retrieval system, or
transmitted in any form or by any means (electronic, mechanical, photocopying, recording, or otherwise), or for any
purpose, without express written permission of O’Reilly Media, Inc.
Printed and bound in the United States of America.
1 2 3 4 5 6 7 8 9 M 6 5 4 3 2 1
Microsoft Press titles may be purchased for educational, business, or sales promotional use. Online editions are also
available for most titles (). For more information, contact our corporate/institutional
sales department: (800) 998-9938 or Visit our website at microsoftpress.oreilly.com. Send
comments to
Microsoft, Microsoft Press, ActiveX, Excel, FrontPage, Internet Explorer, PowerPoint, SharePoint, Webdings, Windows,
and Windows 7 are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or
other countries. Other product and company names mentioned herein may be the trademarks of their respective owners.
Unless otherwise noted, the example companies, organizations, products, domain names, email addresses, logos, people,


places, and events depicted herein are ctitious, and no association with any real company, organization, product, domain
name, email address, logo, person, place, or event is intended or should be inferred.
This book expresses the author’s views and opinions. The information contained in this book is provided without any
express, statutory, or implied warranties. Neither the author, O’Reilly Media, Inc., Microsoft Corporation, nor their
respective resellers or distributors will be held liable for any damages caused or alleged to be caused either directly or
indirectly by such information.
Acquisitions and Development Editors: Martin DelRe and Kenyon Brown
Production Editor: Holly Bauer
Editorial Production: Custom Editorial Productions
Technical Reviewer: David Mann
Indexing: Fred Brown
Cover: Karen Montgomery
Compositors: Octal Publishing, Inc., and Nellie McKesson
Illustrator: Robert Romano
978-0-735-62746-8
www.it-ebooks.info
This book is dedicated to Patrick Tisseghem, our dear friend and colleague, who passed away at the
beginning of this project. Those who were fortunate enough to know Patrick remember him and his
outgoing sense of humor, his knowing smile, and his ability to completely explain complex topics using
simple concepts and examples.
Patrick, we all learned so much from knowing you and working with you. Many of your keen insights and
clear explanations of SharePoint that you shared with us live on in this book. We miss you, all your blog
readers miss you, and the entire SharePoint platform misses you as well.
www.it-ebooks.info
www.it-ebooks.info

Contents at a Glance
 SharePoint 2010 Developer Roadmap                             1
 SharePoint Foundation Development                            35
 SharePoint Developer Tools in Microsoft Visual Studio 2010        69

 Sandboxed Solutions                                          89
 Pages and Navigation                                        117
 Controls and Web Parts                                       169
 Lists and Events                                              225
 Templates and Type Denitions                                277
 Accessing Data in Lists                                        319
 Client-Side Programming                                     353
 Creating and Developing Workows                           393
 SharePoint Security                                           455
 Business Connectivity Services                                 485
 Enterprise Content Management                               535
 SharePoint Search                                            569
www.it-ebooks.info
www.it-ebooks.info

Table of Contents
Foreword                                                              xv
Acknowledgments                                                     xvii
Introduction                                                          xix
 SharePoint 2010 Developer Roadmap                             1
SharePoint Foundation                                                 2
SharePoint Foundation Architecture                                3
SharePoint Farms                                                 5
Web Applications                                                 8
Service Applications                                              10
SharePoint Server 2010                                           13
Sites                                                            14
Customizing Sites                                                17
SharePoint Designer 2010                                         20
Site Customization vs SharePoint Development                     22

Windows PowerShell Boot Camp for SharePoint Professionals              23
Learn Windows PowerShell in 21 Minutes                           24
The Windows PowerShell Integrated Scripting Environment (ISE)      28
The SharePoint PowerShell Snap-in                                30
Conclusion                                                           33
 SharePoint Foundation Development                            35
The Server-Side Object Model                                          35
Creating the Hello World Console Application                       36
Enabling the SharePoint Developer Dashboard                      39
Developing SharePoint Solutions                                        40
Developing a SharePoint Solution Using a Class Library Project        41
The SharePoint Root Directory                                    42
Creating a Feature Denition                                      44
Creating a Solution Package                                       50
Feature Upgrade Enhancements in SharePoint 2010                  61
Conclusion                                                           68
 SharePoint Developer Tools in Microsoft Visual Studio 2010        69
Life Before SharePoint Developer Tools                                  69
Getting Started with the SharePoint Developer Tools                      71
What do you think of this book? We want to hear from you!
Microsoft is interested in hearing your feedback so we can continually improve our
books and learning resources for you To participate in a brief online survey, please visit:
microsoftcom/learning/booksurvey
www.it-ebooks.info
 Table of Contents
Using SharePoint Explorer                                        71
Adding a Feature Receiver                                        76
Adding a SharePoint Project Item                                       78
Deployment and Testing                                               82
Working with Mapped Folders                                          84

Conclusion                                                           87
 Sandboxed Solutions                                          89
Understanding the Sandbox                                            90
Building a Basic Sandboxed Solution                               91
Understanding the Architecture                                   95
Understanding Solution Restrictions                                     97
Designing a Sandboxed Solution                                  100
Understanding Full-Trust Proxies                                       104
Administrating Sandboxed Solutions                                   108
Using Central Administration Tools                                108
Validating Sandboxed Solutions                                  111
Using Windows PowerShell for Administration                     114
Using Site Collection Tools                                       115
Conclusion                                                          116
 Pages and Navigation                                        117
SharePoint Foundation Integration with ASPNET                        117
ASPNET Fundamentals                                               118
SharePoint Web Applications                                          121
Web Application Conguration Files                                    123
The Virtual File System of a Site                                        125
Page Templates and Ghosting                                         128
Application Pages                                                    130
Master Pages                                                        133
Creating Site Page Templates                                          138
Creating Pages in Sandboxed Solutions                                 141
The Module SharePoint Project Item Type                               141
The SandboxedSolutionPages Sample Project                           145
Creating Web Part Pages                                              147
Creating Output References to Integrate Silverlight Applications           149
Creating Pages in Farm Solutions                                       151

Navigation Support for Application Pages                               156
Custom Breadcrumb Navigation Using a Site Map                        157
Creating a Reusable Branding Solution                                  159
Deploying a Custom Master Page                                      160
Deploying CSS Files and Images to the Style Library                      162
Conclusion                                                          166
www.it-ebooks.info
Table of Contents 
 Controls and Web Parts                                       169
Developing with Controls                                             169
The WingtipControls Sample Project                              170
Safe Mode Processing and Safe Controls                           172
Using a Custom Control to Create a Menu                         175
User Controls                                                   178
Delegate Controls                                               182
Developing Web Parts                                                186
Web Part Fundamentals                                         187
Web Part Output Rendering                                      196
Persistent Properties                                            203
Custom Editor Parts                                             206
Web Part Verbs                                                 208
Web Parts Connections                                          211
Asynchronous Processing                                        216
Conclusion                                                     223
 Lists and Events                                              225
Creating Lists                                                        225
Fields and Field Types                                           229
Views                                                          235
Site Columns                                                   236
Content Types                                                  241

Working with Document Libraries                                      248
Creating a Document Library                                     249
Adding a Custom Document Template                            250
Creating Document-Based Content Types                          252
Programming with Documents                                   254
Creating Documents with Code                                   255
Creating and Registering Event Handlers                                258
Event Receiver Classes                                           260
Registering Event Handlers                                       261
Programming Before Events                                      268
Programming After Events                                       273
Conclusion                                                          275
 Templates and Type Denitions                                277
Field Type Denitions                                                 277
Creating Custom Field Types                                     278
Creating a Custom Field Control                                  284
List Denitions                                                       292
Creating Site Column Denitions                                 294
Creating Content Type Denitions                                296
Creating List Denitions                                         298
Feature Activation Dependencies                                 302
www.it-ebooks.info
 Table of Contents
Site Denitions                                                      304
Congurations and Web Templates                               305
ONETXML: The Site Denition Manifest                           306
The Global Site Denition                                        310
Creating and Initializing Sites                                     312
Creating a Site Provisioning Provider                              314
Conclusion                                                          318

 Accessing Data in Lists                                        319
Using the Basic List Object Model                                      319
Querying Lists with CAML                                             321
Querying Joined Lists                                           323
Querying Multiple Lists                                          324
Throttling Queries                                              327
Introducing LINQ                                                    329
LINQ Overview                                                 330
Understanding LINQ Language Elements                          331
Working with LINQ to SharePoint                                      335
Generating Entities with SPMetal                                 335
Querying with LINQ to SharePoint                                340
Adding, Deleting, and Updating with LINQ to SharePoint            342
Working with Document Libraries                                      344
Using the Basic Library Object Model                             344
Working with Open XML                                         347
Conclusion                                                          352
 Client-Side Programming                                     353
Understanding Client Object Model Fundamentals                       353
Understanding Contexts                                         355
Loading and Executing Operations                                356
Working with the Managed Client Object Model                         359
Handling Errors                                                 359
Understanding Authentication and Authorization                   362
Creating, Updating, and Deleting                                 364
Working Asynchronously                                        367
Working with the Silverlight Client Object Model                        368
Introducing Silverlight Development                              368
Asynchronous Programming with Silverlight                       371
Error Handling in Silverlight                                      374

Passing Parameters to Silverlight                                 374
Creating a Custom Silverlight Host                                376
Working with the JavaScript Client Object Model                        378
Setting Up a Basic Page                                          378
Handling Errors in the JavaScript Client Object Model               380
Running Code on Page Load                                     382
www.it-ebooks.info
Table of Contents 
Debugging JavaScript                                           382
Working with AJAX                                             382
Using Object-Oriented JavaScript                                 384
Working with jQuery                                            387
Working with WCF Data Services                                       388
Getting Started with WCF Data Services                           389
Using WCF Data Services in Visual Studio                          390
Conclusion                                                          391
 Creating and Developing Workows                           393
What Is Workow?                                                   393
SharePoint Workow Fundamentals                               395
The User Experience in a SharePoint Workow                     397
Creating Custom Workows                                           399
SharePoint Designer 2010                                        399
Getting Started                                                 400
Creating a Workow with Visio and SharePoint Designer            409
Developing Custom Workow Components                             417
Developing Custom Actions                                      419
Developing Custom Workow Templates                          426
Conclusion                                                          453
 SharePoint Security                                           455
Authentication, Authorization, and Identities                            455

User Information List                                            458
Users and Groups                                               459
Application Pool Identities                                       462
SHAREPOINT\SYSTEM Account                                   462
Delegating User Credentials                                      466
User Impersonation with the User Token                                467
Securing Objects with SharePoint                                 468
Rights and Permission Levels                                     469
Handling Authorization Failures with SPUtility                      472
Claims-Based Security                                                473
Claims Architecture                                             475
User Claims                                                    476
Custom Claims Providers                                         479
Conclusion                                                          484
 Business Connectivity Services                                 485
Introducing Business Connectivity Services                              486
Creating Simple BCS Solutions                                         488
Creating External Content Types                                  488
Creating External Lists                                           491
Understanding External List Limitations                                 493
www.it-ebooks.info
 Table of Contents
Understanding BCS Architecture                                       495
Understanding Connectors                                       495
Understanding Business Data Connectivity                         496
Managing the BDC Service                                       496
Understanding the BDC Server Runtime                           500
Understanding the Client Cache                                  500
Understanding the BDC Client Runtime                            501
Introducing the Secure Store Service                              501

Understanding Package Deployment                              504
Understanding Authentication Scenarios                                504
Conguring Authentication Models                               504
Accessing Claims-Based Systems                                  508
Accessing Token-Based Systems                                  509
Managing Client Authentication                                       509
Creating External Content Types                                       510
Creating Operations                                             511
Creating Relationships                                           513
Dening Filters                                                 515
Using ECTs in SharePoint 2010                                         516
Creating Custom Forms                                          516
Using External Data Columns                                     517
External Data Web Parts                                         518
Creating a Prole Page                                          519
Searching External Systems                                      520
Supplementing User Proles                                     521
Using ECTs in Ofce 2010                                             522
Using the SharePoint Workspace                                 522
Understanding Outlook Integration                               523
Using Word Quick Parts                                         524
Creating Custom BCS Solutions                                        525
Using the BDC Runtime Object Models                            525
Using the Administration Object Model                           528
Creating NET Assembly Connectors                                    531
Conclusion                                                          534
 Enterprise Content Management                               535
ECM in SharePoint Server 2010                                        535
“Featurization” of ECM Capabilities for Wide Use                   536
ECM Site Templates                                             536

Document Management                                              537
Large Lists                                                     537
Check-in/Checkout                                              539
Document Sets                                                 540
Document IDs                                                  547
www.it-ebooks.info
Table of Contents 
Records Management                                                550
Declaring Records                                              550
Content Organizer                                              551
Web Content Management                                            552
Page Rendering Process                                         552
Creating New Page Types                                        554
Content Aggregation with the Content Query Web Part             557
Managed Metadata                                                  559
Term Sets                                                      560
Enterprise Content Types                                        567
Conclusion                                                          568
 SharePoint Search                                            569
Introducing Search-Based Applications                                 570
Understanding Search Architecture                                    571
Understanding the Search Service Application                      572
Understanding the Indexing Process                              573
Understanding the Query Process                                 574
Introducing Search Web Parts                                    574
Introducing the Search Object Models                             575
Creating Ranking Models                                             575
Creating a Custom Ranking Model                                577
Using a Custom Ranking Model                                   580
Customizing Search Centers                                           581

Adding New Tabs                                               582
Customizing Search Core Results                                 583
Working with Keyword Query Syntax                                   588
Working with SQL Full-Text Search                                     589
Creating NET Assembly Connectors for Search                          590
Search-Enabling a Model                                        590
Implementing Security in Search Results                           593
Crawling the NET Assembly Connector                            596
Conclusion                                                          596
Index                                                       597
What do you think of this book? We want to hear from you!
Microsoft is interested in hearing your feedback so we can continually improve our
books and learning resources for you To participate in a brief online survey, please visit:
microsoftcom/learning/booksurvey
www.it-ebooks.info
www.it-ebooks.info
  
Foreword
With the recent release of SharePoint 2010, one of Microsoft’s fastest growing products has
gotten even hotter. SharePoint 2010 has not only become more popular among end users and
IT pros, but it’s also doing extremely well with developers. This is in part due to the signi-
cant advances in the platform, but also because of the great tooling that Visual Studio 2010
has introduced.
Platform capabilities and tooling combined make SharePoint one of the most compel-
ling collaborative platforms in the market today; a platform where many projects seek out
custom development. Platform capabilities and tooling, though, are just the foundation; to
truly build boundless solutions using SharePoint requires a solid understanding of how you
can apply those capabilities. And as you embark on your custom development projects with
SharePoint, it’s important to get the right training and insight into the platform to ensure you
not only understand what you can exploit in SharePoint 2010 but also how you can build and

deploy compelling solutions.
If you’re picking up this book, you’ve probably got more than a casual interest in SharePoint;
you’re likely ready to begin or are already actively engaged in SharePoint development.
SharePoint 2010 offers so much for the developer, ranging from sandboxed solutions, new
data modeling and management capabilities, improved user experience programmabil-
ity, workow, line-of-business integration, security, to enterprise content management, and
much, much more. And to provide you with a clear, concise breakdown of each of these areas
and to help you build the professional-grade solutions you need to build, I can’t think of any-
body better than Ted, Andrew, Scot, and David to deliver this to you. No matter where you
are in your SharePoint development career, Inside Microsoft SharePoint 2010 provides you
with a technical understanding that cuts across new features and functionality, giving you
invaluable insight into SharePoint 2010.
As you make your way through this book and beyond, I hope you’ll see and experience the
great potential that lies within SharePoint 2010. For the developer, it represents a signicant
shift enabling you to more easily build and deploy great solutions on what is one of the
best collaborative platforms on the market today. And in the true spirit of the Inside series,
with this book you’ll get a deep look into the innards of SharePoint 2010; it’s one of the core
books you’ll keep on your shelf as a reference that will eventually become dog-eared and
tabbed from overuse.
Enjoy Inside SharePoint 2010, and best of luck in your SharePoint development!
Steve Fox
Director, Developer & Platform Evangelism
Microsoft
www.it-ebooks.info
www.it-ebooks.info
  
Acknowledgments
There are so many people we need to thank for helping us create this manuscript. First, we
would like to thank the Microsoft folks on the Developer Platform Evangelism (DPE) team, in-
cluding Steve Fox, Paul Stubbs, Donovan Follette, Bruno Nowak, Chris Mayo, Roger Doherty,

and Neil Hutson. They gave us our rst opportunity to work with SharePoint 2010 when they
hired us to write content for a SharePoint developer’s workshop back in July of 2008. We
would also like to thank Wouter van Vugt, the ying Dutchman, who contributed signicantly
to this project with his ruthless code samples, his unorthodox presentation styles, and his
timely comic relief.
There are many others at Microsoft who deserve our thanks for reviewing slides, code sam-
ples, and chapters, including Mike Ammerlann, Rob Howard, Brad Stevenson, Mike Morton,
Reza Chitsaz, Chris (CJ) Johnson, Ryan Duguid, Paul Andrew, Richard Riley, Mike Gannotti,
Arpan Shah, John Durant, Doug Mahugh, Mauricio Ordonez, Elisabeth Olson, Kirk Evans, Pej
Javaheri, Steve Tullis, Matthew Burnett, Javier Dalzell, Harneet Sidhana, Eilene Hao, Umesh
Unnikrishnan, Boris Scholl, Maxim Lukiyanov, Jie Li, Johanna White, and Jon Flanders. There
are also folks on the MSDN team who helped in countless ways, including Randall Isenhour,
Uma Subramanian, Beck Andros, and Jean Philippe Bagel.
We would like to thank our fellow colleagues at Critical Path Training for their valuable in-
sight and feedback during the project, including Maurice Prather, Asif Rehmani, Matthew
McDermott, Chris Predeek, and Karine Bosch. A special thanks also goes to Meredith Connell,
Marshall Butler, and Maggie Smith for keeping our company aoat as the authors constantly
disappeared into their SharePoint VMs for days at a time.
We would like to thank the SharePoint MVP community past and present, whose collective
output has taught the industry so much about the SharePoint platform. Our special thanks
goes out to Melissa Travers, April Dalke, Dan Larson, Spencer Harbar, Rob Foster, Todd
(T-Bag) Baginski, Rob Bogue, Dan Holme, Ben Robb, Andrew Woodward, Reza Alirezaei,
Eric Shupps, Gary Lapointe, Jan Tielens, Tony Bierman, Natalya Voskresenskaya, Carsten
Keutmann, Shane Young, Darrin Bishop, Renaud Comte, Mirjam van Olst, Jeremy Sublett,
Loke Kit Kai, Todd Bleeker, Sahil Malik, Bill English, Joris Poelmans, Nick Swan, Matt Ranlett,
Dave McMahon, Adam Buenz, Steve Smith, Stephen Cummins, Todd Klindt, John F. Holliday,
Ton Stegeman, Chandima Kulathilake, Penelope Coventry, Chris O’Brien, Tobias Zimmergren,
Waldek Mastykarz, Randy Drisgill, Jeremy Thake, Liam Cleary, Ludovic Lefort, Martin Harwar,
Debbie Ireland, Brendon Schwartz, Paul Schaeein, Becky Bertram, Wictor Wilen, Heather
Solomon, Dustin Miller, Cornelius J. van Dyk, Bob Fox, and even the infamous Ben “Can you

believe I’m still talking” Curry.
www.it-ebooks.info
 Acknowledgments
We would also like to thank everyone on the publishing side who made this book possible.
Thanks to everyone at Microsoft Press and O’Reilly. This includes Ben Ryan, who helped us
put together the original contract, and the production staff made up of Dan Fauxsmith,
Sumita Mukherji, Holly Bauer, and Linda Allen. Special thanks goes out to Ken Brown, who
had the challenging task of getting us to ship our chapters on schedule. If not for Ken and
his cattle prod, Ted would no doubt still be writing and rewriting Chapter 5 trying to get the
explanation of page ghosting just a tad more clear and concise.
—Ted Pattison
So many people go into writing a book, but I’d like to specically call out a few of them who
made a signicant impact in my contributions to this book. I’d rst like to thank my colleagues
Ted Pattison and Scot Hillier, who poured so much of their knowledge into this work. I also
want to thank my wife Meredith and children Steven and Kathryn for their patience. No au-
thoring experience can happen without the full buy-in from your family! I would also like to
specically thank Ryan Duguid and Chris Johnson at Microsoft, who shared many conversa-
tions around Enterprise Content Management and SharePoint Server 2010 over the last few
years. Their insight into a lot of the “why” and reasoning behind certain decisions by the
product team dramatically helped my understanding of Enterprise Content Management in
SharePoint Server 2010.
—Andrew Connell
www.it-ebooks.info
  
Introduction
The purpose of this book is to help you design and develop custom business solutions for
SharePoint 2010, which includes the two products SharePoint Foundation and SharePoint
Server 2010. Our goal is to teach you how to create, debug, and deploy the fundamental
building blocks such as Features, Pages, Web Parts, Site Columns, Content Types, Event Handlers,
and Workow Templates. Once you apply yourself and become comfortable developing with

these building blocks, there’s no limit to the types of applications and solutions you can create
on the SharePoint 2010 platform.

This book is written for experienced Windows developers who are procient with Visual
Studio, the Microsoft .NET Framework, and ASP.NET. The code samples in this book are writ-
ten in C# and have been created to provide a comprehensive overview of the projects you
can create for SharePoint 2010. Our primary audience for this book is software developers
and architects looking for expert guidance on designing and developing business applications
on this platform. Developers who are new to the SharePoint platform as well as experienced
SharePoint developers will benet from this book.


You’ll need the following hardware and software to build and run the code samples for
this book: Microsoft Windows Server 2008 or Microsoft Windows Server 2008 R2.
o
The operating system can be installed natively or on a Virtual Machine (VM)
o
For a native installation, we recommend at least 4 GB of RAM
o
For an installation on a VM, we recommend 8 GB of RAM on most machines

Microsoft SharePoint Foundation or SharePoint Server 2010

Microsoft Visual Studio 2010

Microsoft SharePoint Designer 2010

Microsoft Ofce Visio 2010
www.it-ebooks.info
 Introduction


All the code samples discussed in this book have been added to a single .zip archive named
InsideSharePoint2010.zip. This .zip archive can be downloaded from the support page for this
book at the following address:

This support page also provides a list of errata as well as a reference to step-by-step instructions
that you can use to build a VM that is identical to the VM we used to write and test all our
sample projects.
You can also download the companion code from this book’s catalog page at:
/>
Every effort has been made to ensure the accuracy of this book and the companion content.
Microsoft Press provides support for books and companion content at the following website:
/>You can also nd a list of errata at the following website:
/>
www.it-ebooks.info
  
Chapter 1
SharePoint 2010 Developer
Roadmap
Unless you’ve been hiding under a rock or programming in the clouds, you’ve probably
noticed that Microsoft SharePoint technologies have become popular. Over the last few
years, IT professionals throughout the industry—including many people at Microsoft—
have been surprised by the accelerated adoption rate of SharePoint and its impressive sales
revenue, which is over a billion dollars.
It is safe to say that SharePoint technologies have made it into the mainstream of software
products used by companies and organizations around the world. Today, millions of people
work with SharePoint technologies every day, including business users, power users,
executives, site administrators, farm administrators, and professional developers.
Microsoft has released four versions of SharePoint technologies, which are listed in Table 1-1.
Each SharePoint release has included an underlying core infrastructure product and a second

product that adds business value to the infrastructure. The core infrastructure product has
always been free to customers who already have licenses for the underlying server-side
operating system, Microsoft Windows Server. Microsoft makes money on SharePoint
technologies by selling customers server-side licenses as well as client access licenses (CALs).
 
Year Core Infrastructure Product Business Value Product
2001 SharePoint Team Services SharePoint Portal Server 2001
2003 Windows SharePoint Services 2.0 Microsoft SharePoint Portal Server 2003
2007 Windows SharePoint Services 3.0 Microsoft Ofce SharePoint Server 2007
2010 Microsoft SharePoint Foundation Microsoft SharePoint Server 2010
SharePoint 2001 introduced an environment that allowed users to create sites, lists, and
document libraries on demand based on a data-driven design. The implementation was
based on a Microsoft SQL Server database that tracked the creation of sites and lists by
adding records to a static set of database tables. This initial version of SharePoint had a
couple of noteworthy shortcomings. First, it was cumbersome to customize sites. Second, the
les uploaded to a document library were stored on the local le system of the front-end
Web server, which made it impossible to scale out SharePoint Team Services sites using a
farm of front-end Web servers.
SharePoint 2003 was the rst version to be implemented on top of the Microsoft .NET
Framework and ASP.NET. This version began to open new opportunities for professional
www.it-ebooks.info
 Chapter 1 SharePoint 2010 Developer Roadmap
developers looking to extend the SharePoint environment with Web Parts and event
handlers. Also in this version, Microsoft altered the implementation for document libraries
to store les inside a back-end SQL Server database, which made it possible to scale out
SharePoint sites using a standard farm of front-end Web servers.
SharePoint 2007 introduced many new concepts to the underlying SharePoint architecture,
including site columns, content types, and features and solution packages. Microsoft also
improved the integration of SharePoint with ASP.NET, which made it possible for .NET
developers to extend SharePoint sites by creating familiar ASP.NET components such as

master pages, user controls, navigation providers, authentication providers, and custom
HttpModule components.
SharePoint 2010 is the fourth and most recent release of SharePoint technologies. It includes
Microsoft SharePoint Foundation and Microsoft SharePoint Server 2010. The goal of this
chapter is to build your high-level understanding of SharePoint Foundation from the viewpoint
of a professional developer. Along the way, you will learn how SharePoint Server 2010
extends SharePoint Foundation to add extra functionality and business value.

SharePoint Foundation introduces many changes to the core platform from SharePoint
2007. The improved user experience in the browser constitutes the most obvious change for
experienced SharePoint users moving to SharePoint 2010. The SharePoint 2007 user interface
experience is outdated. It wasn’t designed to today’s HTML standards, nor does it embrace
any of the principles of Web 2.0. These limitations negatively impact accessibility and cross-
browser functionality. The user experience of SharePoint 2007 can also be criticized for
triggering unnecessary server-side postbacks and confusing page transitions.
SharePoint 2010 introduces a new AJAX-powered user interface that signicantly improves
the user experience. The pages in a SharePoint 2010 site eliminate unnecessary postbacks
by communicating with the Web server using asynchronous JavaScript calls. SharePoint
Foundation also eliminates potentially confusing page transitions using inline editing and
modal dialogs. Finally, SharePoint Foundation enhances the user experience by introducing
the server-side Ribbon, which allows the user to locate and execute a larger number of
contextual commands without having to navigate away from the current page.
SharePoint Foundation includes a wealth of enhancements beyond user interface changes.
Table 1-2 lists some of the new enhancements that will be most interesting to developers
moving from SharePoint 2007. These topics are covered throughout the course of this book.
www.it-ebooks.info
SharePoint Foundation 
 
Enhancement Benet
Service application architecture Redesigned infrastructure to facilitate sharing of resources across

Web applications and farms.
Windows PowerShell support New support and capabilities for writing administrative scripts.
Feature versioning and upgrade New support for versioning and upgrading features.
SharePoint Developer Tools for
Visual Studio 2010
A rst-class development experience for SharePoint developers
(nally).
Sandboxed solutions New support for deploying solution packages at site collection
scope in a sandboxed environment.
New features for throttling lists
and controlling query execution
Enhanced support for stabilizing the farm by prohibiting large,
inefcient queries.
New events for sites, lists, and
workows
Additional events for developers to hook up event handlers.
LINQ to SharePoint provider New support for writing LINQ query statements to access
SharePoint list data.
REST-based access to SharePoint
list items
New support for accessing SharePoint list data from across the
network using REST-based Web service calls.
Client-side object model Ability to leverage the SharePoint object model from across the
network when programming with .NET, Silverlight, and JavaScript.
Enhanced support for integrating
Silverlight applications
Rich support for deploying and versioning Silverlight applications
within a SharePoint environment.
Claims-based security New authentication support for leveraging external identity
management systems and extending access control in SharePoint

sites using custom claims.
Business Connectivity Services
(BCS) and external lists
New support for creating read-write connections to back-end
databases and line-of-business systems and exposing their data
as lists within SharePoint sites.
.NET Assembly Connectors for
BCS
Support for creating a custom component to integrate any data
source with the BCS.
SharePoint Foundation Architecture
At its core, SharePoint Foundation is a provisioning engine—that is, its fundamental design
is based on the idea of using Web-based templates to create sites, lists, and libraries to store
and organize content. Templates are used to create both new websites and various elements
inside a website, such as lists, pages, and Web Parts.
SharePoint Foundation is particularly helpful to companies and organizations faced with the
task of creating and administering a large number of websites because it dramatically reduc-
es the amount of work required. Someone in the IT department or even an ordinary business
user can provision (a fancy word for create) a site in SharePoint Foundation in less than a min-
ute by lling in a browser-based form and clicking the OK button. Creating a new page or a
new list inside a site is just as easy.
www.it-ebooks.info
 Chapter 1 SharePoint 2010 Developer Roadmap
SharePoint Foundation takes care of all the provisioning details behind the scenes by adding
and modifying records in a SQL Server database. The database administrator doesn’t need
to create a new database or any new tables. The ASP.NET developer doesn’t need to create a
new ASP.NET website to supply a user interface. And the system administrator doesn’t need
to copy any les on the front-end Web server or congure any Internet Information Services
(IIS) settings. It all just works. That’s the magic of SharePoint.
The architecture of SharePoint Foundation was specically designed to operate in a Web

farm environment. Figure 1-1 shows a basic diagram of a simple Web farm with two front-
end Web servers and a database server. In scenarios that have multiple front-end Web
servers, a network load balancer is used to take incoming HTTP requests and to determine
which front-end Web server each request should be sent to.
Web Server 1
Web Server 2
Database Server
Network Load
Balancer
 SharePoint Foundation is designed to scale out using a farm of front-end Web servers.
SharePoint Foundation and SharePoint Server 2010 are available only in 64-bit versions. They
can be installed on a 64-bit version of Windows Server 2008 or Windows Server 2008 R2. When
building a development environment, you also have the option of installing either SharePoint
Foundation or SharePoint Server 2010 on a 64-bit version of a client operating system such
as Windows 7 or Windows Vista.
SharePoint Foundation leverages IIS 7.0 on front-end Web servers to listen for incoming
HTTP requests and to manage the server-side worker processes using the IIS application
pool infrastructure. The runtime environment of SharePoint Foundation runs within a worker
process launched from the IIS application pool executable, named w3wp.exe, as shown in
Figure 1-2. You can see in Figure 1-2 that SharePoint Foundation is built on .NET Framework
3.5 and ASP.NET 3.5 with Service Pack 1.
www.it-ebooks.info

×