1269 SharePoint 2010 Development with Silverlight
NET Development Series was established in 2002 to provide professional developers with the Authors in this series include Microsoft architects, MVPs, and other experts and leaders in the field of Microsoft development technologies. Each book provides developers with the vital information and critical insight they need to write highly effective applications.
T most comprehensive, practical coverage of the latest .NET technologies
Authors in this series include Microsoft architects, MVPs, and other experts and leaders in the field of Microsoft development technologies. Each book provides developers with the vital information and critical insight they need to write highly effective applications.
Bob German Paul Stubbs
The authors and publisher have taken care in the preparation of this book, but make no expressed or implied warranty of any kind and assume no responsibility for errors or omissions. This publication is protected by copyright, and permission must be obtained from the publisher prior to any prohibited reproduction, storage in a retrievalsystem, or transmission in any form or by any means, electronic, mechanical, photocopying, recording, or like- wise.
Contents at a GlancePART I Getting Started 1 Getting Started with SharePoint and Silverlight 2 Introduction to SharePoint Development 3 Introduction to Silverlight Development
PART II SharePoint and Silverlight Development4 A First Look at Silverlight in SharePoint 5 Web Part Development 6 Expression Blend, Data Binding, and Sample Data 7 Accessing SharePoint Using the HTML Bridge 8 Accessing SharePoint Data with the Client Object Model 9 Accessing SharePoint Data with WCF Data Services 10 Accessing SharePoint with Web Services 11 Accessing External Data PART III Building Solutions 12 Windows Phone 7 SharePoint Applications 13 Creating Silverlight Navigation 14 SharePoint and Silverlight in the Cloud 15 Creating a Silverlight Field Control vii This page intentionally left blank
With the release of SharePoint 2010, Microsoft made it easier to consume and integrate data stored within SharePoint into Silverlightapplications with the client object model and a new RESTful service. Part 2 dives into the fundamentals and basics you need to know, such as working with the client object model, the REST serv-ice, web services, and external data (that which SharePoint is aware of but lives in another system).
We’despecially like to thank Joan Murray for the opportunity to write the book, for her constant feedback and encouragement, and for deftly guiding usthroughout the publishing process.xxi Bob German I want to thank my parents, who wrote more than 35 books, for inspiring me to write and exposing me to the writing process at a young age. Bob is going to have a brightfuture in writing more books, and I look forward to doing more projects with Bob in the future.
About the Authors
The most common extension by far is to add custom “web parts,” which are small applicationcomponents that appear on the screen as part of a SharePoint solution.(Web parts are similar to “portlets” or “widgets” used by other portal plat- forms.) However this is really only the beginning, as developers can alsoextend SharePoint workﬂows, add custom application and administrative pages, connect to line-of-business data, and more. It wasn’t long after the introduction of NCSA Mosaic, the ﬁrst graphical web browser, that it was dubbed a “killer application.” Instead of a hodge-podge of tools such as WAIS, FTP, and Gopher, the web browser provided universal access to Internet resources in a way that was easy enough for anycomputer user.
SILVERLIGHT VERSIONS IN THIS BOOK Silverlight 5 was in beta testing while this book was being written
Before clicking OK to create the new login, click the ServerRoles option on the left and grant your service account the dbcreator and securityadmin roles so it can create and secure new databases when theconﬁguration runs, and when running the SharePoint Central Administra- tion web site. If the developer creates the master page in SharePoint Designer or uploads it into the Master Page Gallery using a web browser, it is createddirectly in the content database and is only visible to the site collection where it was created.
Building a Web Part A good ﬁrst project for SharePoint development is to build a web part
Begin by setting up your development environment as described in Chap- ter 1, “Getting Started with SharePoint and Silverlight.” Log in to yourdevelopment machine as a server and SharePoint administrator and then open a web browser and visit the test SharePoint site you created at the endof the SharePoint installation. They can only use a subset of Building a Web Part the SharePoint API within the site collection where they are installed, and they can’t call out over the network or gain access to the servers wherethey run.
Building a Simple Silverlight Application with Visual Studio 2010
After setting the text property to thecurrent date, it adds a couple of CSS styles to the label and adds it to the web part’s collection, making the a child of the ' . The easiest way to do this is to create some public propertiesin your web part and decorate them with attributes to let SharePoint know that it should save the properties and allow the user to edit them.