Thư viện tri thức trực tuyến
Kho tài liệu với 50,000+ tài liệu học thuật
© 2023 Siêu thị PDF - Kho tài liệu học thuật hàng đầu Việt Nam

Microsoft SharePoint 2010 Building Solutions for SharePoint doc
Nội dung xem thử
Mô tả chi tiết
Malik Microsoft SharePoint 2010: Building Solutions for SharePoint 2010
Companion
eBook
Available
this print for content only—size & color not accurate
CYAN
MAGENTA
YELLOW
BLACK
PANTONE 123 C
BOOKS FOR PROFESSIONALS BY PROFESSIONALS®
Sahil Malik, Author of
Pro ADO.NET 2.0
US $59.99
Shelve in:
Microsoft Servers
User level:
Intermediate–Advanced
THE APRESS ROADMAP
Microsoft SharePoint 2010:
Building Solutions
for SharePoint 2010
Pro SharePoint 2010
Solution Development
SharePoint 2010
as a Platform
SharePoint 2010
as a Platform
Pro
SharePoint 2010
Solution Development
Pro
SharePoint 2010
Development Techniques
Microsoft SharePoint 2010:
Building Solutions
for SharePoint 2010
www.apress.com
SOURCE CODE ONLINE
Companion eBook
See last page for details
on $10 eBook version
ISBN 978-1-4302-2865-3
9 781430 228653
5 59 9 9
Microsoft SharePoint 2010:
Building Solutions for SharePoint 2010
Dear Reader,
SharePoint 2010 is a huge product—with huge promise, but a big learning curve.
Having worked on many SharePoint projects, and delivered many SharePoint
training sessions, I asked myself, what is the minimum set of SharePoint knowledge I'd like every development team member to know? Given the sheer size and
capabilities of this product, it poses an interesting challenge. It's like this big juicy
hamburger that you know will taste good, but you just don't know where to start
without making a mess!
You see, there is truly nothing else like SharePoint 2010. This platform is so
versatile, it spans into almost every Microsoft technology and can be extended
to integrate with non-Microsoft technologies. There’s a lot to learn and many
people wonder where to begin and where to go.
To satisfy these questions, I put together this book for you. This book covers
the set of SharePoint knowledge that I wish every SharePoint development team
member knew, including:
• The structure and nature of a typical SharePoint project
• The bare minimum administration every developer should know
• A good overview of out of the box capabilities with sufficient discussion around
the development/extensibility of SharePoint
This book is organized in an easy-to-understand fashion, and I’ve included many
practical tips to get you started on your SharePoint journey quickly and efficiently.
I hope you enjoy this book.
Sahil Malik
www.winsmarts.com
7.5 x 9.25 spine = 0.75" 400 page count
THE EXPERT’S VOICE® IN SHAREPOINT
Sahil Malik
Your fundamental resource for learning and
creating with SharePoint 2010
Microsoft
SharePoint 2010
Building Solutions for SharePoint 2010
Microsoft
SharePoint 2010
Building Solutions for SharePoint 2010
Sahil Malik
Microsoft SharePoint 2010: Building Solutions for Sharepoint 2010
Copyright © 2010 by Sahil Malik
All rights reserved. No part of this work may be reproduced or transmitted in any form or by
any means, electronic or mechanical, including photocopying, recording, or by any
information storage or retrieval system, without the prior written permission of the copyright
owner and the publisher.
ISBN-13 (pbk): 978-1-4302-2865-3
ISBN-13 (electronic): 978-1-4302-978-1-4302-2866-0
Printed and bound in the United States of America 9 8 7 6 5 4 3 2 1
Trademarked names may appear in this book. Rather than use a trademark symbol with every
occurrence of a trademarked name, we use the names only in an editorial fashion and to the
benefit of the trademark owner, with no intention of infringement of the trademark.
President and Publisher: Paul Manning
Lead Editor: Jonathan Hassell
Technical Reviewer: Rob Garrett
Editorial Board: Clay Andres, Steve Anglin, Mark Beckner, Ewan Buckingham,
Gary Cornell, Jonathan Gennick, Jonathan Hassell, Michelle Lowman, Matthew
Moodie, Duncan Parkes, Jeffrey Pepper, Frank Pohlmann, Douglas Pundick,
Ben Renow-Clarke, Dominic Shakeshaft, Matt Wade, Tom Welsh
Coordinating Editor: Debra Kelly, Tracy Brown
Copy Editors: Katie Stence, Nancy Sixsmith
Compositor: Lynn L’Heureux
Indexer: BIM Indexing & Proofreading Services
Artist: April Milne
Cover Designer: Anna Ishchenko
Distributed to the book trade worldwide by Springer-Verlag New York, Inc., 233 Spring Street,
6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax 201-348-4505, e-mail orders[email protected], or visit www.springeronline.com.
For information on translations, please e-mail [email protected], or visit www.apress.com.
Apress and friends of ED books may be purchased in bulk for academic, corporate, or
promotional use. eBook versions and licenses are also available for most titles. For more
information, reference our Special Bulk Sales–eBook Licensing web page at
www.apress.com/info/bulksales.
The information in this book is distributed on an “as is” basis, without warranty. Although
every precaution has been taken in the preparation of this work, neither the author(s) nor
Apress shall have any liability to any person or entity with respect to any loss or damage
caused or alleged to be caused directly or indirectly by the information contained in this work.
The source code for this book is available to readers at www.apress.com.
I would like to dedicate this book to Tanya, Anish, and Shawn.
v
Contents at a Glance
About the Author..................................................................................................................xii
About the Technical Reviewer............................................................................................xiii
Acknowledgements ............................................................................................................ xiv
Chapter 1: The First Chapter. Please Read! ..........................................................................1
Chapter 2: SharePoint Basics..............................................................................................17
Chapter 3: The SharePoint 2010 Feature Solution Framework ..........................................35
Chapter 4: WebParts and SharePoint Pages.......................................................................79
Chapter 5: Client Object Model, ADO.NET Services, and Custom Services......................113
Chapter 6: Managing SharePoint Data: Part 1..................................................................171
Chapter 7: Managing SharePoint Data: Part 2..................................................................199
Chapter 8: Enterprise Content Management.....................................................................229
Chapter 9: Business Connectivity Services.......................................................................269
Chapter 10: Workflows ......................................................................................................289
Chapter 11: Business Intelligence.....................................................................................311
Chapter 12: Security ..........................................................................................................339
Index...................................................................................................................................367
vii
Contents
About the Author..................................................................................................................xii
About the Technical Reviewer............................................................................................xiii
Acknowledgements ............................................................................................................ xiv
Chapter 1: The First Chapter. Please Read! ..........................................................................1
How to Read this Book .............................................................................................................1
SharePoint Environments .........................................................................................................2
The SharePoint 2010 Development Environment................................................................2
SharePoint Integration Environment ...................................................................................4
SharePoint QA Environment ...............................................................................................4
SharePoint Production Environment ...................................................................................5
Your SharePoint Development Machine ....................................................................................5
Summary ...............................................................................................................................16
Chapter 2: SharePoint Basics..............................................................................................17
What Did Installing SharePoint Do to My Machine?.................................................................17
Central Administration............................................................................................................20
The Great SharePoint Hierarchy..............................................................................................26
Creating and Using SharePoint Lists .......................................................................................28
Summary ...............................................................................................................................34
Chapter 3: The SharePoint 2010 Feature Solution Framework ..........................................35
Writing Your First SharePoint Console App..............................................................................36
What are WebParts?...............................................................................................................37
Writing Your First Feature and Solution...................................................................................40
Create the Project ............................................................................................................41
Add Functionality to Your Project......................................................................................44
Deploying and Debugging ................................................................................................48
Versioning and Upgrade...................................................................................................50
Feature Receivers ............................................................................................................55
CONTENTS
viii
Writing Sandboxed Solutions .................................................................................................. 58
The Basics.......................................................................................................................58
Writing a Farm Solution ...................................................................................................59
Sandbox Solution Restrictions..........................................................................................62
Sandbox Solution Monitoring, Management, and Deployment ..........................................65
Sandbox Solution Validations ...........................................................................................69
Sandbox Solution Full Trust Proxies .................................................................................73
Summary ...............................................................................................................................77
Chapter 4: WebParts and SharePoint Pages.......................................................................79
What Are WebParts?...............................................................................................................79
What Are SharePoint Pages? ..................................................................................................80
Using SharePoint Designer with WebParts..............................................................................80
Writing Visual WebParts .........................................................................................................85
SharePoint Pages ...................................................................................................................86
Deploying Pages: A Quick Example ..................................................................................88
Writing a WebPart ..................................................................................................................95
Writing the RSSFeed WebPart ..........................................................................................96
Writing the OPML WebPart and a WebPart Editor ...........................................................105
WebPart Communication................................................................................................109
Some Closing Thoughts about WebParts ..............................................................................112
Chapter 5: Client Object Model, ADO.NET Services, and Custom Services......................113
The Client Object Model .......................................................................................................113
ADO.NET Data Services and the REST API ............................................................................114
Custom WCF Services ..........................................................................................................114
The Client Object Model .......................................................................................................115
Client Object Model Design ............................................................................................115
Infrastructural Objects ...................................................................................................116
Object Identity ...............................................................................................................119
Writing the Silverlight WebPart.......................................................................................121
Writing the JavaScript WebPart......................................................................................128
WebPart Communication Without Postbacks ..................................................................130
ADO.NET Data Services and REST ........................................................................................136
ADO.NET Data Services and REST Basics.......................................................................136
Consuming ADO.NET Data Services in .NET Applications................................................141
Consuming ADO.NET Data Services in Silverlight ...........................................................145
CONTENTS
ix
Consuming ADO.NET Data Services in JavaScript ..........................................................150
Some Architectural Thoughts Before We Move On..........................................................153
Writing Custom WCF Services ..............................................................................................155
Consuming the Service in a .NET Application .................................................................161
Consuming the Service in a Silverlight application..........................................................164
Consuming the Service in ASP.NET Ajax ........................................................................166
Summary .............................................................................................................................170
Chapter 6: Managing SharePoint Data: Part 1..................................................................171
Content Types ......................................................................................................................172
Custom Field Types..............................................................................................................178
Creating Site Columns and Content Types in Code................................................................186
Writing a List Definition and List Instance .............................................................................190
Summary .............................................................................................................................198
Chapter 7: Managing SharePoint Data: Part 2..................................................................199
SharePoint Events ................................................................................................................199
SharePoint 2010 Improvements in the Event Model .......................................................203
Lists Scalability in SharePoint...............................................................................................204
Scalability versus Performance ......................................................................................205
The 20% Scenario .........................................................................................................205
List Column Indexing .....................................................................................................207
List Throttling ................................................................................................................209
SharePoint 2010 RBS Storage........................................................................................211
Querying SharePoint Data.....................................................................................................216
Querying Using CAML ....................................................................................................216
Querying Using LINQ......................................................................................................222
Summary .............................................................................................................................227
Chapter 8: Enterprise Content Management.....................................................................229
What Is ECM?.......................................................................................................................229
What is Records Management?......................................................................................230
Document IDs ......................................................................................................................231
Document Sets.....................................................................................................................233
CONTENTS
x
Managed Metadata, Keywords and Tags ..............................................................................236
Content Organizer ................................................................................................................247
Enterprise Content Types .....................................................................................................253
In-Place Records Management.............................................................................................256
Hierarchical File Plans and Folder-Based Retention ..............................................................264
Records Center ....................................................................................................................266
Summary .............................................................................................................................267
Chapter 9: Business Connectivity Services.......................................................................269
External Content Types.........................................................................................................270
BCS and SharePoint Designer (No Code)...............................................................................270
BCS with Visual Studio 2010 ................................................................................................279
The BCS Object Model..........................................................................................................285
Summary .............................................................................................................................287
Chapter 10: Workflows ......................................................................................................289
Out of the Box Workflows .....................................................................................................290
Customizing Out of the Box Workflows .................................................................................295
Writing Workflows with SharePoint Designer ........................................................................300
Writing Workflows with Visual Studio....................................................................................302
Summary .............................................................................................................................310
Chapter 11: Business Intelligence.....................................................................................311
Visio Services.......................................................................................................................312
Excel Services......................................................................................................................318
Accessing Excel Services Over REST..............................................................................322
Accessing Excel Services Over SOAP .............................................................................324
PerformancePoint Services...................................................................................................327
PerformancePoint Central Administration Settings..........................................................329
PerformancePoint Site Collection Settings......................................................................331
Using PerformancePoint.................................................................................................332
Summary .............................................................................................................................338
CONTENTS
xi
Chapter 12: Security ..........................................................................................................339
Claims Based Authentication ................................................................................................339
Claims Based Identity in SharePoint ...............................................................................341
Secure Store Service............................................................................................................347
Using SSS with BCS .............................................................................................................348
The SharePoint Security Object Model..................................................................................357
Elevating Security ..........................................................................................................364
Summary .............................................................................................................................366
Index...................................................................................................................................367
CONTENTS
xii
About the Author
Sahil Malik, the founder and principal of Winsmarts, has been a
Microsoft MVP and INETA Speaker for the past many years, author
of numerous books and articles, consultant, and a trainer who
delivers training and talks at conferences internationally.
CONTENTS
xiii
About the Technical Reviewer
Rob Garrett has worked with SharePoint since the early beta version of MOSS 2007 and has leveraged
his talents for SharePoint architecture and design with Portal Solutions—a SharePoint consultant
company in Rockville, MD. Rob has extensive background in .NET technologies and has developed
software for Microsoft Frameworks since the early days of C++ and MFC. In pursuit of his career dreams,
Rob left his birthplace in England for a journey to the United States on Thanksgiving Day 1999. Upon
arrival, he enjoyed his first American meal from a gas station.