ebook img

Beginning SharePoint 2010 development Beginnning Share Point 2010 development PDF

465 Pages·2010·19.184 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Beginning SharePoint 2010 development Beginnning Share Point 2010 development

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 Contents IntroductIon xxiii Part i: WelCome to sharePoint 2010 ChaPter 1: introduCtion to sharePoint 2010 3 Getting to Know SharePoint 4� Addressing the Needs of the Developer 8� Extension and Enrichment for Developers 9� Breaking It Down for Developers 10� SharePoint 2010: The Platform 12 SharePoint 2010 Capabilities 14 Site Collection and Sites 15 Server APIs and Client APIs 17 Data Modeling and Programmability 18 SharePoint Central Administration 19 Application Management 20 Monitoring 21 Security 21 General Application Settings 21 System Settings 21 Backup and Restore 21 Upgrade and Migration 22 Configuration Wizards 22 Summary 22 Recommended Reading 24 ChaPter 2: GettinG started With sharePoint 2010 develoPment 25 Core Developer Features for SharePoint 2010 26 Developer Productivity 26 Rich Platform Services 30 Flexible Deployment 32 Key Skills for the SharePoint Developer 34 Your Development Environment 36 Installing and Configuring Windows Server Hyper-V 37 Installing SharePoint Server 2010 42 Getting Familiar with SharePoint 2010 45 Working with SharePoint Sites 46 584637ftoc.indd 17 5/3/10 10:42:24 AM CONTENTS Working with SharePoint Lists 50 Working with SharePoint Web Parts 58 Setting Permissions for a SharePoint Site 63 Summary 64 Recommended Reading 66 Part ii: GettinG started With sharePoint 2010 develoPment ChaPter 3: sharePoint 2010 develoPer tools 69 SharePoint Development Across Developer Segments 70 Web-Based Development in SharePoint 71 Site Settings 72 Inline Rich Text and HTML Editing 74 Adding Multimedia to a Site 76 Developing SharePoint Applications Using SharePoint Designer 2010 78 Customizing a Site Page 80 Managing Other Data Sources in SharePoint Designer 85 Using JavaScript in SharePoint Designer 86 Master Pages 91 Developing SharePoint Applications Using Visual Studio 2010 98 Development Using the Expression Blend Suite 116 Summary 126 Recommended Reading 127 ChaPter 4: Common develoPer tasks in sharePoint 2010 12 9 Creating Web Parts 130 Standard and Visual Web Parts 130 Data View Web Parts 133 Creating Lists, Site Columns, and Content Types 135 Working with SharePoint Data 141 Creating Event Receivers 147 Creating aspx Pages 150 Creating Master Pages 153 Summary 157 Recommended Reading 158 ChaPter 5: ProGramminG aGainst sharePoint 2010 lists 159 Overview of SharePoint Lists 159 Programmatically Accessing Lists 162 Programming Against Lists Using the Server-Side Object Model 163 Programming Against Lists Using ASP.NET Web Services 171 xviii 584637ftoc.indd 18 5/3/10 10:42:24 AM CONTENTS Programming Against Lists Using the Client Object Model 186 Programming Against Lists Using a Custom WCF Service 197 REST-Based Services and List Development 202 Creating Event Receivers for a SharePoint List 210 Summary 215 Recommended Reading 216 ChaPter 6: BuildinG and dePloyinG sharePoint WeB Parts 217 Understanding Web Parts 217 Web Part Architecture 220 Custom Web Parts 223 Visual Web Parts 233 Custom Web Part Properties 244 Summary 246 Recommended Reading 248 ChaPter 7: CreatinG your First sharePoint 2010 aPPliCation 249 Requirements 250 Solution Design 251 Customer Sales and Total Sales Lists 252 Building the Application 254 Adding a Record to the Sales List 254 Viewing the Customer Sales 258 Viewing the Total Sales 262 Adding a Chart Web Part 268 Final Dashboard 271 Summary 272 Recommended Reading 274 Part iii: advanCed toPiCs For sharePoint 2010 develoPment ChaPter 8: inteGratinG line-oF-Business data usinG Business ConneCtivity serviCes 277 Understanding Office Business Applications (OBAs) 278 OBAs and BCS 280 Anatomy of an External Content Type 284 Connectivity Options with BCS 287 Developing Your First Application Using BCS 289 Creating the External Data Source 290 xix 584637ftoc.indd 19 5/3/10 10:42:24 AM CONTENTS Creating the External Content Type 291� Setting Permissions for External Content Types 306� Taking the External List Offline 307� Summary 313� Recommended Reading 315� ChaPter 9: CreatinG enhanCed user exPerienCes � For sharePoint With silverliGht 317� Understanding Silverlight 317� Why Integrate Silverlight and SharePoint? 325� Integrating Silverlight with SharePoint 326� No-Touch Integration 328� Low-Touch Integration 331� High-Touch Integration 343� Summary 361� Recommended Reading 362� ChaPter 10: develoPinG serviCe-oriented � aPPliCations For sharePoint 2010 363� ASP.NET Web Services 365� Native Web Service 366� Custom ASP.NET Services 370� WCF Web Services 378� RESTful Web Services 387� Azure and SharePoint 390� Summary 396� Recommended Reading 398� ChaPter 11: inteGratinG sharePoint � With miCrosoFt oFFiCe 399� Content Type as a Document Template 400� Using InfoPath in Your SharePoint Solutions 404� Managing Office Documents through a SharePoint Workflow 406� Integrating Office Documents with SharePoint List Data 410� Server-Side Services 418� Visio Services 418� Excel Services 420� Word Services 426� Access Services 427� Summary 429� Recommended Reading 431� xx 584637ftoc.indd 20 5/3/10 10:42:24 AM CONTENTS ChaPter 12: seCurinG your sharePoint 2010 aPPliCations 433 Authorization 434 Solution Trust 436 Secure Store Service 440 Federated Authentication 442 Forms-Based Authentication 442 Claims-Based Authentication 443 Summary 444 Recommended Reading 446 Part iv: aPPendix aPPendix : Where to Go From here 449 Index 451 xxi 584637ftoc.indd 21 5/3/10 10:42:24 AM Part I Welcome to SharePoint 2010 ⊲ ChaPter 1: Introduction to SharePoint 2010 ⊲ ChaPter 2: Getting Started with SharePoint 2010 Development 584637c01.indd 1 5/2/10 7:11:56 PM 1 Introduction to SharePoint 2010 What You'll learn in thiS ChaPter: ➤➤ Getting familiar with the core functionality and features of SharePoint ➤➤ Understanding the basics of SharePoint architecture ➤➤ What's available to developers in SharePoint 2010 SharePoint is an exciting Web-based technology. In its fourth version, SharePoint has undergone quite an evolution since the 2003 release, and the types of things you can do with SharePoint run far and wide. Those who have had the chance to see the product grow up will be surprised and happy with many of the changes that are now built into the platform. In fact, existing SharePoint developers will witness what arguably is a significant change in the features and functionality that SharePoint provides, as well as an evolution in the tools supported and the developer community that rallies around the technology. Aspiring SharePoint developers will realize there is quite a bit of power in the platform that you should be able to put into practice by the end of this book. SharePoint has matured into a first-class platform that will enable you to build and deploy a wide array of solutions, as well as take advantage of the build-and-publish model that SharePoint users and developers have come to enjoy. In fact, SharePoint 2010 offers such a wide array of features that it is challenging for any one person to claim to be an expert across all of the SharePoint workloads. You will need to dedicate some time to becoming an expert, but the journey will be worth it. With that in mind, this chapter introduces you to what SharePoint is and examines some of the high-level features for the developer. This chapter will also describe the capabilities that make SharePoint a platform that is interesting and compelling for you, the developer, to learn. Specific topics include the types of platform services to expect, data programmability, and the ways in which you can build and deploy a SharePoint solution. Toward the end of this chapter, you’ll be introduced to Central Administration, where you’ll find an array of administrative capabilities for SharePoint. 584637c01.indd 3 5/2/10 7:11:56 PM 4 ❘ ChaPter 1 IntroductIon to SharePoInt 2010 GettinG to KnoW SharePoint Microsoft describes SharePoint 2010 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 areas: ➤➤ Collaborate — As you move throughout this book, you’ll see the notion of collaboration is a very strong theme for SharePoint. This is because SharePoint is about bringing people together through different types of collaboration, such as enterprise content management (ECM), Web content management (WCM), social computing through the use of wikis or blogs, creating dashboards to fulfill your business intelligence (BI) needs, and so on. ➤➤ Interoperability — SharePoint is also about bringing this collaboration together through interoperability. This means Office client and Web-based document integration, and the capability to build and deploy Office business applications (OBAs) — custom solutions that integrate line-of-business (LOB) data with SharePoint and Office, integrating with Web 2.0 technologies, or deploying applications to the cloud. It also means enhanced security through an evolved security model called Claims-Based Authentication that helps facilitate integration with other line-of-business (LOB) systems. ➤➤ Platform — As you’ll see, SharePoint is a platform that supports not only interoperability and collaboration but also extensibility, through a rich object model, a solid set of developer tools, and a growing developer community. • ECM & WCM • Client Integration • 1st Class Developer • Social Computing • OBA Platform • Search • Web 2.0 • Visual studio • Portals/Sites • S+S • SharePoint Designer • Business Intelligence • Intranet/Internet • Rich Community • MS Product Integration Collaborate Interoperability Platform FiGure 1-1 SharePoint as a platform These are three key themes that you will find crop up throughout most discussions of SharePoint and implicitly through many of the capabilities you’ll get to explore throughout this book. At its essence, SharePoint is a Web-based platform that provides the following: ➤➤ A set of native capabilities to support productivity and collaboration ➤➤ An extensible set of APIs and services ➤➤ A configuration engine that provides rich administrative abilities 584637c01.indd 4 5/2/10 7:11:57 PM

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.