Your SlideShare is downloading. ×

SharePoint 2010 Developers


Published on

Presentation from MSDN event in San Diego May 2010

Presentation from MSDN event in San Diego May 2010

Published in: Technology
  • Be the first to comment

No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

No notes for slide
  • SharePoint adoption is skyrocketing. With over 100M licenses to date…Huge developer communityHundred of thousands of developers and growing towards 1MM!100M+ licensesUsers love SharePoint, huge growth in the businessGreat opportunity for you to leverage your ASP.NET skillsBuild on a successful platform
  • This slide should cover all the ways in which you can take on SP projects if you’ve got ASP.NET experience
  • SharePoint 2010 has lots to offer developersVisual Studio 2010 SharePoint Developer Tools- we’ll talk about that today.Client OS installs allowed for developers (Win 7 & Vista SP1)- One of the big pain points we addressed was having to have a Server OS to develop SP customizations. In 2010 we enable you to run SP on a 64 bit client OS, special created for developers, so that you don’t have to alter your workstation.VS2010 Ultimate and Team Foundation Server for source code control, item tracking, testing, lab management, and much more. We’ll talk more about availability and capability of Team Foundation server in another breakout.SPD is new and artifact focused (rather than server structure focused), great new WF designer, and there is a developer continuum between SPD & VS. SharePoint designer is a free download.
  • There have been some great enhancements made in SharePoint 2010!For example, the new client object model enables you to access SharePoint objects through a referenced DLL as opposed to Web service calls. (In SharePoint 2007, you access SharePoint list data, for example, by using an ASP.NET Web service.) LINQ for SharePoint brings the power of LINQ to SharePoint, letting you treat lists, for example, as strongly typed objects. Silverlight (especially in combination with the client object model) is supported natively in SharePoint 2010—no more messing around with the web.config to get started with this development. And sandboxed solutions also offer a way to build SharePoint Web Parts and deploy them to a site without needing administrative intervention—that is, you can deploy a Web Part to a SharePoint site and have it run in the context of that site either in an on-premises instance of SharePoint or in the cloud using the hosted version of SharePoint. New on Codeplex VS extension for SharePoint Dev -, external data lists make interacting with line-of-business systems a read/write process, and while seemingly small, this is a huge leap forward given the tools support that enables you to build line-of-business integrations quickly and efficiently. For each of these innovations in SharePoint 2010, Visual Studio 2010 provides some measure of support, whether through project templates or APIs, for professional developers.NOTE:This is basically a “read and go” slide but a good start to give a sense of the vast amount of changes to the SP 2010 product.
  • We’ve had project templates you can add into Visual Studio through the Visual Studio Extensions for Windows SharePoint Services (VSeWSS). There weren’t many templates then but now things have changed…Here are what some of these templates do:Visual Web PartA visual Web part is a Web part that you create by using the Visual Web Developer designer in Visual Studio.Business Data Connectivity ModelLets you integrate business data into SharePoint. Business data can come from back-end server applications, such as SQL Server, Siebel, and Service Advertising Protocol (SAP). Site Definition Provides site-level infrastructure that you can build out and deploy.Import SharePoint Solution Package Enables you to import a SharePoint Solution Package (.wsp) for redeployment to a local server instance. NOTE:I would suggest opening up VS2010 and showing the New Project dialog.
  • Since most of the SharePoint project templates are typically empty templates with extra items thrown in, we should probably look at what comprises an Empty Project.Assuming you know what the Project File, Properties Page, and References are for, let’s take a close look at the remaining items.FeaturesFeatures reduce the complexity involved in making simple site customizations. Features eliminate the need to copy large chunks of code to change simple functionality. Features thus reduce versioning and inconsistency issues that may arise among front-end Web servers. Features make it easier to activate or deactivate functionality in the course of a deployment, and administrators can easily transform the template or definition of a site by simply toggling a particular Feature on or off in the user interface. Features provide the following capabilities:Scoping semantics for determining where custom code runsPluggable behavior for installing or uninstalling Features within a deploymentPluggable behavior for activating or deactivating Features at a given scopeA scoped property bag for storing data required by a Feature within its scopeThe basis of a unified framework for distributed deployment of Windows SharePoint Services solutionsPackageThe Package Node contains a single file that serves as the distribution mechanism for the SharePoint project.This file, known as a solution package, is .CAB-based with a .WSP extension. A solution package is a deployable, reusable file that contains a set of features, site definitions, and assemblies that apply to SharePoint sites, and that you can enable or disable individually. The Package node also always contains a file that is named Package.wspdef, an XML definition file for the package. Once a package is deployed to the SharePoint server, the SharePoint administrator can install it and activate its features.
  • Before you even get your project started, we have already made major improvements! Server Explorer now includes connections to SharePoint! The Server Explorer connects to a SharePoint implementation and shows you all the artifacts including sites, document libraries, lists. You can click on an item and view the properties of it in the Properties tab.
  • From might have seen that there is a new designer for working with web parts in Visual Studio 2010.  This is actually, not quite the case, so I thought I would share with you how it actually works.  When you use the Visual Web Part SPI (SharePoint Project Item), it will create a number of files for you: a .cs file, a .webpart file, an elements.xml file, and a .ascx file.  That’s right, it creates an ASP.NET user control.  Now, the Visual Studio interface does a nice job of grouping all of the files together.  When you open the designer on the web part, you in fact just open the designer for the user control.  So now you might be thinking, how does this work?  Well no SharePoint can’t host user controls directly still. In fact all it does is create a simple web part with a Page.LoadControl() method pointing at our user control.  This in fact is the same method we’ve been using for years to get user controls into SharePoint.  I don’t really see this as an issue though, since Visual Studio does a great job making it painless to deploy these now and use them inside SharePoint.
  • Visual Web PartA Visual Web Part item includes a Web Part item and a User Control item. You can design the appearance of the Web part by dragging controls from the Visual Studio  Toolbox to the surface of the user control.  NOTE:You don’t create one of these in the lab, which is unfortunate, but you can see a good demo here if you want to do one:
  • Web PartA Web Part item provides files that enable you to design a Web part for a SharePoint site.
  • The Packaging Explorer shows you all the items inside the package in a WYSIWYG view. You are able to drag and drop items around to create your package differently.The package designers allow you to manage the SharePoint package (.wsp) that Visual Studio builds. The designer abstracts many of the complexities of dealing with the SharePoint packaging xml files. The designers are a good balance between doing everything for you and giving you the ability to dump out and bypass them if you have advanced requirements. Or you could even do something in between by creating your own extensions which plug in to give you new or modified functionality.
  • As with everything else that has changed in VS2010, the Deployment and Debugging experience as also been vastly improved and integrated into the IDE…
  • When you create a SharePoint project one of the earliest dialogs you are faced with is the security level selection.The structure of a sandboxed solution is very similar to a farm solution, which generally runs with full-trust permissions. The main differences lie in how a sandboxed solution is deployed and in the process that hosts the solution (which determines whether a solution is a sandboxed solution or a farm solution). This means that the same sandboxed solution can run with full trust when it’s deployed at the farm level and with partial trust when it’s deployed at the site collection level.
  • One of the changes is the addition of the new SharePoint tab that gives you direct control over pre- and post- deployment activities as well as specifying, in detail, what configuration you would like to have. You can create new configurations or modify existing ones to meet your needs.
  • The deployment experience has become a simple right-click action. The deployment process copies the newly created .wsp file to the SharePoint server, installs the solution, and then activates the Features. You can also create a package file that you can install on another computer.
  • Make sure we talk about TFS IntegrationI want to visually see the manual steps involved in setting up the environment, attaching the debugger, manually moving deployed files between dev and admin, sharing design assets between SP designer and VS.Consider breaking out SP designer into a separate slide but definitely talk to how it is complementary here.Consider breaking out TFS support into a separate slide but definitely talk to how it improves collaboration here.Demo recap:There are lots of great new templates and tools in Visual Studio to connect users to data. We saw three things:1. Business Data Connector brings enterprise data to your users- We surfaced external LOB of business data in the form of a list of customer complaints from the Blue Yonder Database and displayed it as a list inside of SharePoint.2. Rich client object model allows you to integrate with SharePoint via JavaScript. We added a button to invoke an AJAX-based dialog and wired it directly to our complaints list to improve the experience for the end user.3. Workflow designer enabled us to associate a workflow with an existing list and quickly package and deploy it to our SP site.
  • BCS is used for you to build an External Content Type in Visual Studio 2010 and deploy it to SharePoint Foundation 2010 and the code in the External Content Type retrieves the data which is then shown in a standard SharePoint list.SPMetalis included with SharePoint Foundation and is located in %ProgramFiles%Common FilesMicrosoft Sharedweb server extensions14BIN.ExampleSPMetal /web:http://ContosoServer/Marketing /code:MarketingSite.cs
  • So let’s recap what we’ve just seen. We were able to enhance the BlueYonder SharePoint site by using the power of Silverlight to add data visualizations. We used the built-in Silverlight Web Part in SharePoint 2010 for in-browser experience but also enabled our end users to take the Silverlight chart control to their desktop.
  • There are three approaches to integrating Silverlight :(build)The ‘No Touch’ solution involves simply incorporating Silverlight content as you would in a traditional ASP.NET application, as an object tag in your page that initiates the download of the application and its execution in the confines of a web page, or even directly on the desktop as an out-of-browser application.(build)The ‘Low Touch’ approach involves integrating a Silverlight application directly as a web part, by incorporating the Silverlight application (.xap file) as an asset within your SharePoint site.(build)The ‘High Touch’ approach goes one step further and actually incorporates SharePoint data into the visualization experience via the SharePoint Silverlight client object model or technologies such as OData (or Open Data Protocol) feeds exposed by SharePoint artifacts such as lists.
  • I like using these slides to reinforce the concepts that were covered. I want one of these for BDC, list events, workflow, Silverlight integration.
  • Transcript

    • 1. SharePoint Developmentwith Microsoft Visual Studio 2010
      Lynn Langit
      Microsoft Developer Evangelist
    • 2.
      • Huge developer community
      • 3. 650,000 SharePoint Developers
      • 4. 100M+ licenses
      • 5. Users love SharePoint
      Great opportunity for you to leverage your ASP.NET skills
      Build on a successful platform
    • 6. Leverage .NET and ASP.NET skills
      You are using the same tools
      Same designers, controls, etc.
      Event handling model
      Save “F5” deploy/debug experience
      Familiar programming model
      Built on ASP.NET
      Built on Windows Workflow Foundation
      Styling is the same
      Use JavaScript and Silverlight
    • 7. Developer Productivity
      SharePointDesigner 2010
      Visual Studio 2010
      Windows 7
      Project Templates
      WSP Packaging
      Visual Designers
      One Development Machine
      For Developers Only
      X64 OS Required
      Source code control
      Team Foundation Server (TFS)
      Artifact Focus
      New Workflow Designer
      Export as WSP
      Developer Tools · Developer Workstation · Team · Design Tools
    • 8. Features, Features, Features
    • 9. SharePoint 2010 Enhancements
      New object model
      LINQ for SharePoint
      Native support for Silverlight
      Sandboxed Solutions
      External data lists
    • 10. SharePoint Templates
    • 11. Empty Project
    • 12. Server Explorer
    • 13. Visual Web Part
      New for SharePoint 2010
      Uses ASP.NET User Controls (ASCX)
      Can combine ASP.NET and SharePoint controls
      Integrated designer support in Visual Studio
      Develop, deploy, debug using new SharePoint project system
    • 14. Demo 1: Visual Web Part
    • 15. Visual Web Part
    • 16. Web Part
    • 17. Packages
    • 18. Deployment & Debugging
    • 19. Deployment: Project Creation
    • 20. Properties:SharePoint Tab
    • 21. Deployment
    • 22. Visual Studio 2010Developer Tools for SharePoint
    • 23. BCS: Connecting data and people with SharePoint
    • 24. Business Connectivity Services
      Business Data Connectivity brings enterprise data to your users quickly
      Visual designers
      BDC visual designer & explorer in VS2010
      BDC method details in VS2010
      Tools to generate classes
      SPMetal - here
    • 25.
    • 26. Enabling Rich Visualizations
      No Touch
      High Touch
      OM, Web 2.0,
      Service, …
    • 27. SharePoint & Silverlight
      New client API build especially for Silverlight
      New Silverlight Web Part to ease deployment and use of Silverlight Applications
    • 28. Demo 2: SharePoint and Silverlight
    • 29. Leverage your skillset
      Connect people to data
      Enable rich visualizations
      Go where your users are
    • 30. Resources
      Learn SharePoint 2010 on Channel 9
      SharePoint 2010 Developer Center