Zlatan Dzinic Principal Consultant Microsoft Most Valuable Professional SharePoint Business Connexion Session Objectives and Takeaways Audience: Developers who want to learn more about building services for SharePoint Session Objectives: To understand the different ways in which you can develop web services for SharePoint Provide some guidance around native, ASMX, and WCF services for SharePoint 2007 Level 400 means: You’ve got enough development experience We will walk through concepts and code You understand at least basic concepts of services You have a general willingness to toil and occasionally be frustrated Agenda Custom app development and SharePoint SharePoint Web services Custom Web services Futures Summary Q&A Custom App Development and SharePoint SharePoint? Development Platform? Custom Solutions MOSS Internet Windows SharePoint Services LOB Systems VS/SPD SQL Server WF ASP.NET IIS .NET Framework Intranet … Microsoft Windows 2003/2008 - 650,000 SharePoint Developers WW Your Development Environment Getting Started Windows Server 2003 or 2008 WSS 3.0 SP1 MOSS 2007 (Standard/Enterprise/FIS) SP2 .NET Framework 3.5 SP1 Visual Studio 2008 SP1 VSeWSS 1.2 or 1.3 Optional Expression Blend (WPF or Silverlight UI development) SharePoint Designer (Master pages, custom field types) Silverlight Tools for VS 2008 SP1 (Silverlight solution development) SharePoint Web Services SharePoint Web Services Provide programmatic access to key SharePoint functionality Work with lists, Excel services, business data catalog, etc. Both admin and nonadmin services available Cannot be accessed anonymously Windows Credentials are required SharePoint Web Services (cont’d) Take caution when writing custom services You could write one when the service already exists Think about type of reference Creating a service increases portability Referencing DLL increases performance (but you’re restricted to server-only deployment) SharePoint Virtual Directories _vti_bin _vti_adm Things you can do in WSS sites Things you can do in Central Admin http://server/site/_vti_bin/service.asmx http://server:1234/_vti_adm/service.asmx * Note the path to the site! * Note the PORT! C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\isapi C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\admisapi Exploring the Native SharePoint Web Services Common Usage Document and asset management Create or store images Document and form libraries Read/write list data Enhance applications using DM capabilities Site management Create sites dynamically Add users programmatically Custom lists Create and populate custom lists Microsoft Office 2003 and 2007 Check In/Out Documents Development Methodology Native SharePoint Web Service Get familiar with the available services Create your client Discover the services Consume the service in your app Through service integration Through DLL reference Windows Server SharePoint Deploy your app 1 Client Microsoft.SharePoint.dll 2 Consuming a Native SharePoint Web Service Custom Web Services ASP.NET and WCF You can create either ASMX or WCF Web services SharePoint supports ASMX natively Both are supported through isolated Web app domain Deployment to hive requires additional service configuration Security considerations include cross-domain policy files Consuming Custom Services No different than other web services Create a Web Reference Write some code Here’s how to call a custom web service deployed to the _layouts virtual directory which creates sub sites Development Methodology Custom ASP.NET Web Service Create and build your service Test the service Deploy the service Windows Server To SharePoint Hive (with configurations) To Isolated Web App Domain Test in deployed environment Create your client Client Discover the services Consume the service in your app Deploy your client SharePoint 1 App Domain 2 Creating the ASMX Web Service Deploying to SharePoint Hive In VS 2008, create an ASP.NET Web Service Copy the DLL to the GAC and make sure you add a fully qualified reference to it in your ASMX file Run the disco tool against the ASMX file to create a .dsco and .wsdl file Amend the files to work with SharePoint Append the files with .aspx and copy to ISAPI folder (copy ASMX and the two ASPX files) List in SPDISCO.ASPX file Creating the ASMX Web Service Deploying to SharePoint Hive In VS 2008, create an ASP.NET Web Service Copy the DLL to the GAC and make sure you add a fully qualified reference to it in your ASMX file Run the disco tool against the ASMX file to create a .dsco and .wsdl file Amend the files to work with SharePoint Append the files with .aspx and copy to ISAPI folder (copy ASMX and the two ASPX files) List in SPDISCO.ASPX file Developing and Consuming a Custom ASP.NET Web Service Development Methodology Custom WCF Web Service Create and build your service Test the service Deploy the service Windows Server To SharePoint Hive (with configurations) To Isolated Web App Domain Test in deployed environment Create your client Client Discover the services Consume the service in your app Deploy your client SharePoint 1 App Domain 2 Developing and Consuming a Custom WCF Service Futures Silverlight and SharePoint Integrating Custom Services No Touch <iframe/> Streaming Services Low Touch Web Part as Host High Touch .NET Assembly/ Web Part SP OM/External Data SharePoint, Silverlight & Custom Services Windows Azure Windows Azure - Services Windows Azure exposes services Blob storage Table storage Queues Services can be exposed via Web Role Worker Role can consume services Scheduled or command initiated tasks can interact with SharePoint web services Summary Summary You have a number of options when developing services for SharePoint Range from native Web services to custom services to services in the cloud Be sure to evaluate needs and design for custom services against existing Web services Explore both native and custom services—trying both ASMX and WCF to test the difference The future will see more development in the area of Azure SharePoint Services and certainly more Silverlight integration with services Win! LifeCam Show Ultra-Thin Mobile Design World-Class High Definition Optics Question: {Enter the qualifying question here / or find another way to select your winner} Please attend other business productivity sessions Office and SharePoint track (OFC) Unified Communications (UNC) Additional Resources Blogs http://dotnet.org.za/zlatan http://blogs.msdn.com/steve_fox/default.aspx http://blogs.msdn.com/sharepoint/ Books Microsoft SharePoint 2007 Development Unleashed (Sams) Real World SharePoint Development (Wrox) Professional SharePoint Developing using Silverlight 2 (Wrox) MSDN http://msdn.microsoft.com/en-us/sharepoint/default.aspx http://msdn.microsoft.com/en-us/office/aa905503.aspx © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
© Copyright 2024