Wrox Programmer to Programmer™ Join the discussion @ p2p.wrox.com Beginning SharePoint ® 2010 Development Steve Fox Fox $39.99 USA $47.99 CAN Programming (.NET/C) / Microsoft Office 2010 Put the power of SharePoint 2010 into practice wrox.com Programmer Forums Join our Programmer to Programmer forums to ask and answer programming questions about this book, join discussions on the hottest topics in the industry, and connect with fellow programmers from around the world. Code Downloads Take advantage of free code samples from this book, as well as code samples from hundreds of other books, all ready to use. Read More Find articles, ebooks, sample chapters and tables of contents for hundreds of books, and more reference resources on programming topics that matter to you. As a first-class platform that has evolved significantly since its previous release, SharePoint 2010 now provides several advancements for the developer (native Visual Studio tools support, services and extensibility enhancements, and APIs), and many new capabilities (improved data programmability, line-of-business interoperability, and sandboxed solutions). With this authoritative guide, industry veteran Steve Fox provides expert guidance on developing applications as he walks you through the fundamentals of programming, explores the developer toolset, and provides practical code examples to teach you how to use many of SharePoint’s new developer features. You’ll quickly discover how SharePoint’s rich platform supports great collaboration, extensibility, and interoperability. Beginning SharePoint 2010 Development: • Guides you through the creation of your first SharePoint 2010 application • Addresses working with SharePoint 2010 sites, lists, and Web parts • Describes developing SharePoint applications using SharePoint Designer 2010 • Reviews standard and Visual Web parts, as well as data view Web parts • Details integrating SharePoint with Microsoft ® Office • Explains how to secure your SharePoint 2010 applications Steve Fox is a Technical Evangelist in the Developer Platform Evangelism group at Microsoft. He presents at many conferences and has written numerous articles. Wrox Beginning guides are crafted to make learning programming languages and technologies easier than you think, providing a structured, tutorial format that will guide you through all the techniques involved. SharePoint ® 2010 Development Beginning Get more out of wrox.com Programmer to Programmer ™ Interact Take an active role online by participating in our P2P forums @ p2p.wrox.com Wrox Online Library Hundreds of our books are available online through Books24x7.com Wrox Blox Download short informational pieces and code to keep you up to date and out of trouble! Join the Community Sign up for our free monthly newsletter at newsletter.wrox.com Browse Ready for more Wrox? We have books and e-books available on .NET, SQL Server, Java, XML, Visual Basic, C#/ C++, and much more! Contact Us. We always like to get feedback from our readers. Have a book idea? Need community support? Let us know by e-mailing wrox-partnerwithus@wrox.com Related Wrox Books Beginning SharePoint 2010 Administration: Windows SharePoint Services 4 and Microsoft SharePoint Server 2010 978-0-470-59712-5 Packed with step-by-step instructions, tips and tricks, and real-world examples, this book dives into the basics of how to install, manage, and administrate SharePoint 2010 in an effective and secure manner. Beginning SharePoint 2010: Building Team Solutions with SharePoint 978-0-470-61789-2 Beginning SharePoint 2010: Building Team Solutions with SharePoint provides you with extensive knowledge and expert advice, empowering you to become a SharePoint champion within your organization. Beginning Microsoft SharePoint Designer 2010 978-0-470-64316-7 Covering both the design and business applications of SharePoint Designer, this complete Wrox guide brings you thoroughly up to speed on how to use SharePoint Designer in an enterprise. Professional SharePoint 2010 Administration 978-0-470-53333-8 Written by a team of SharePoint experts, this book covers installation, upgrading, configuration, architecture and capacity planning, monitoring, backups, and disaster recovery. Professional SharePoint 2010 Branding and User Interface Design 978-0-470-58464-4 SharePoint allows influence over key branding issues like site design, how the user interface affects site visitors’ experience, ease of use, and other branding topics. This book, from a team of SharePoint branding experts, covers it all. Professional SharePoint 2010 Development 978-0-470-52942-3 This comprehensive book shows readers how to build field-tested solutions and create custom content management applications. Professional Microsoft FAST Search: Customizing, Designing, and Deploying Search for SharePoint 2010 and Internet Servers 978-0-470-58466-8 FAST is Microsoft’s intelligent search-based technology that boasts an ability to integrate business intelligence with Search. This guide provides you with advanced coverage on FAST search and shows you how to use it to plan, customize, and deploy your search solution, with an emphasis on SharePoint 2010 and Internet-based search solutions. Real World SharePoint 2010: Indispensable Experiences from 20 SharePoint MVPs 978-0-470-59713-2 Containing contributions from nearly a score of SharePoint MVPs, this book is an anthology of best practices for all areas of SharePoint 2010. BEGINNING SHAREPOINT 2010 DEVELOPMENT INTRODUCTION xxiii PART I WELCOME TO SHAREPOINT 2010 Introduction to SharePoint 2010CHAPTER 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3 Getting Started with SharePoint 2010 DevelopmentCHAPTER 2 . . . . . . . . . . . . . . . . . 25 PART I I GETTING STARTED WITH SHAREPOINT 2010 DEVELOPMENT SharePoint 2010 Developer ToolsCHAPTER 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .69 Common Developer Tasks in SharePoint 2010CHAPTER 4 . . . . . . . . . . . . . . . . . . . . . . 129 Programming Against SharePoint 2010 ListsCHAPTER 5 . . . . . . . . . . . . . . . . . . . . . . . . 159 Building and Deploying SharePoint CHAPTER 6 Web Parts . . . . . . . . . . . . . . . . . . . . . . 217 Creating Your First SharePoint 2010 ApplicationCHAPTER 7 249 PART II I ADVANCED TOPICS FOR SHAREPOINT 2010 DEVELOPMENT Integrating Line-of-Business Data Using CHAPTER 8 Business Connectivity Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .277 Creating Enhanced User Experiences for SharePoint CHAPTER 9 with Silverlight . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317 Developing Service-Oriented Applications for SharePoint 2010CHAPTER 10 . . . . . . .363 Integrating SharePoint with Microsoft OceCHAPTER 11 . . . . . . . . . . . . . . . . . . . . . . . .399 Securing Your SharePoint 2010 ApplicationsCHAPTER 12 433 PART IV APPENDIX Where to Go from HereAPPENDIX 449 INDEX 451 584637ffirs.indd 1 5/3/10 10:41:36 AM 584637ffirs.indd 2 5/3/10 10:41:36 AM Beginning SharePoint ® 2010 Development 584637ffirs.indd 3 5/3/10 10:41:36 AM 584637ffirs.indd 4 5/3/10 10:41:36 AM Beginning SharePoint ® 2010 Development Steve Fox 584637ffirs.indd 5 5/3/10 10:41:36 AM Beginning SharePoint ® 2010 Development Published by Wiley Publishing, Inc. 10475 Crosspoint Boulevard Indianapolis, IN 46256 www.wiley.com Copyright © 2010 by Wiley Publishing, Inc., Indianapolis, Indiana Published simultaneously in Canada ISBN: 978-0-470-58463-7 ISBN: 978-0-470-88182-8 (ebk) ISBN: 978-0-470-88183-5 (ebk) ISBN: 978-0-470-90477-0 (ebk) Manufactured in the United States of America 10 9 8 7 6 5 4 3 2 1 No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600. Requests to the Publisher for permission should be addressed to the Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201) 748- 6008, or online at http://www.wiley.com/go/permissions. Limit of Liability/Disclaimer of Warranty: The publisher and the author make no representations or warranties with respect to the accuracy or completeness of the contents of this work and specifically disclaim all warranties, including without limitation warranties of fitness for a particular purpose. No warranty may be created or extended by sales or pro- motional 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 pub- lisher nor the author shall be liable for damages arising herefrom. The fact that an organization or Web site is referred to in this work as a citation and/or a potential source of further information does not mean that the author or the publisher endorses the information the organization or Web site may provide or recommendations it may make. Further, readers should be aware that Internet Web sites listed in this work may have changed or disappeared between when this work was written and when it is read. For general information on our other products and services please contact our Customer Care Department within the United States at (877) 762-2974, outside the United States at (317) 572-3993 or fax (317) 572-4002. Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not be available in electronic books. Library of Congress Control Number: 2010926824 Trademarks: Wiley, the Wiley logo, Wrox, the Wrox logo, Wrox Programmer to Programmer, and related trade dress are trademarks or registered trademarks of John Wiley & Sons, Inc. and/or its affiliates, in the United States and other coun- tries, and may not be used without written permission. SharePoint is a registered trademark of Microsoft Corporation in the United States and/or other countries. All other trademarks are the property of their respective owners. Wiley Publishing, Inc. is not associated with any product or vendor mentioned in this book. 584637ffirs.indd 6 5/3/10 10:41:36 AM For my wife 584637ffirs.indd 7 5/3/10 10:41:36 AM 584637ffirs.indd 8 5/3/10 10:41:36 AM [...]... P2P and Wrox books To read the FAQs, click the FAQ link on any P2P page xxix 584637flast.indd 29 5/2 /10 7 :11 :45 PM 584637flast.indd 30 5/2 /10 7 :11 :45 PM Part I Welcome to SharePoint 2 010 ⊲⊲ Chapter 1: Introduction to SharePoint 2 010 ⊲⊲ Chapter 2: Getting Started with SharePoint 2 010 Development 584637c 01. indd 1 5/2 /10 7 :11 :56 PM 584637c 01. indd 2 5/2 /10 7 :11 :56 PM 1 Introduction to SharePoint 2 010 What... SharePoint 2 010 Development Core Developer Features for SharePoint 2 010 Developer Productivity Rich Platform Services Flexible Deployment Key Skills for the SharePoint Developer Your Development Environment Installing and Configuring Windows Server Hyper-V Installing SharePoint Server 2 010 Getting Familiar with SharePoint 2 010 Working with SharePoint Sites 584637ftoc.indd 17 12 14 15 17 18 19 20 21 21 21 21. .. ASP.NET Web Services 13 0 13 0 13 3 13 5 14 1 14 7 15 0 15 3 15 7 15 8 15 9 15 9 16 2 16 3 17 1 xviii 584637ftoc.indd 18 5/3 /10 10 :42:24 AM CONTENTS Programming Against Lists Using the Client Object Model Programming Against Lists Using a Custom WCF Service REST-Based Services and List Development Creating Event Receivers for a SharePoint List Summary Recommended Reading Chapter 6: Building and Deploying SharePoint Web... SharePoint 2 010 — This includes the following: ➤➤ ➤➤ ➤➤ Chapter 1, “Introduction to SharePoint Chapter 2, “Getting Started with SharePoint Development Part II: Getting Started with SharePoint 2 010 Development — This includes the following: ➤➤ ➤➤ Chapter 4, “Common Developer Tasks in SharePoint 2 010 ➤➤ Chapter 5, “Programming Against SharePoint 2 010 Lists” ➤➤ Chapter 6, “Building and Deploying SharePoint. .. the beginning SharePoint developer On a personal note, I’d like to thank my wife who put up with me locking myself away for hours at a time Nicole, you are ever-tolerant and I’m deeply indebted to you 584637ffirs.indd 15 5/3 /10 10 : 41: 37 AM 584637ffirs.indd 16 5/3 /10 10 : 41: 37 AM Contents Introduction xxiii Part I: Welcome to SharePoint 2 010 Chapter 1: Introduction to SharePoint 2 010 3 Getting to Know SharePoint. .. 21 22 22 22 24 25 26 26 30 32 34 36 37 42 45 46 5/3 /10 10 :42:24 AM CONTENTS Working with SharePoint Lists Working with SharePoint Web Parts Setting Permissions for a SharePoint Site Summary Recommended Reading 50 58 63 64 66 Part II: Getting Started with SharePoint 2 010 Development Chapter 3: SharePoint 2 010 Developer Tools SharePoint Development Across Developer Segments Web-Based Development in SharePoint. .. administrative capabilities for SharePoint 584637c 01. indd 3 5/2 /10 7 :11 :56 PM 4 ❘ Chapter 1 Introduction to SharePoint 2 010 Getting to Know SharePoint Microsoft describes SharePoint 2 010 as the business productivity platform for the enterprise and the Internet To provide you with an idea of the types of things that you can do with SharePoint, Figure 1- 1 breaks down SharePoint into three separate... Services Excel Services Word Services Access Services Summary Recommended Reading 2 91 306 307 313 315 317 317 325 326 328 3 31 343 3 61 362 363 365 366 370 378 387 390 396 398 399 400 404 406 410 418 418 420 426 427 429 4 31 xx 584637ftoc.indd 20 5/3 /10 10 :42:24 AM CONTENTS Chapter 12 : Securing Your SharePoint 2 010 Applications Authorization Solution Trust Secure Store Service Federated Authentication Forms-Based... to a Site Developing SharePoint Applications Using SharePoint Designer 2 010 Customizing a Site Page Managing Other Data Sources in SharePoint Designer Using JavaScript in SharePoint Designer Master Pages 69 70 71 72 74 76 78 80 85 86 91 Developing SharePoint Applications Using Visual Studio 2 010 Development Using the Expression Blend Suite Summary Recommended Reading 98 11 6 12 6 12 7 Chapter 4: Common... Applications for SharePoint 2 010 xxiv 584637flast.indd 24 5/2 /10 7 :11 :44 PM introduction ➤➤ ➤➤ ➤➤ Chapter 11 , “Integrating SharePoint with Microsoft Office” Chapter 12 , “Securing Your SharePoint 2 010 Applications” Part IV: Appendix — This includes the following: ➤➤ Appendix, “Where to Go from Here” The goal is to quickly take you from the basics of SharePoint, to installing and configuring a development . 4 51 584637ffirs.indd 1 5/3 /10 10 : 41: 36 AM 584637ffirs.indd 2 5/3 /10 10 : 41: 36 AM Beginning SharePoint ® 2 010 Development 584637ffirs.indd 3 5/3 /10 10 : 41: 36 AM 584637ffirs.indd 4 5/3 /10 10 : 41: 36. you. 584637ffirs.indd 15 5/3 /10 10 : 41: 37 AM 584637ffirs.indd 16 5/3 /10 10 : 41: 37 AM Contents INTRODUCTION xxiii WelCome to sharePoint 201Part i: 0 introduCtion to sharePoint 2 010 ChaPter 1: 3 Getting to Know SharePoint. 10 : 41: 36 AM Beginning SharePoint ® 2 010 Development Steve Fox 584637ffirs.indd 5 5/3 /10 10 : 41: 36 AM Beginning SharePoint ® 2 010 Development Published by Wiley Publishing, Inc. 10 475 Crosspoint