Tuesday, December 22, 2009

Sharepoint 2010 Top 10 : Development

  1. Client Object Model
    • SharePoint 2010 introduces three new client APIs for interacting with SharePoint sites: from a .NET managed application, from a Silverlight application, or from ECMAScript (JavaScript, JScript) that executes in the browser. These new APIs provide access to a subset of the types and members that are contained in the Microsoft.SharePoint namespace of the server-side object model.
    • The new client object models provide an object-oriented system for interoperating with SharePoint data from a remote computer, and they are easier to use than the already existing SharePoint Web services. You start by retrieving a client context object that represents the current request context, and through this context, you can obtain access to client objects at site-collection level or lower in the SharePoint hierarchy. Client objects inherit from the ClientObject class (ECMAScript: ClientObject), and you can use them to retrieve properties for a specific SharePoint object, to retrieve child objects and their properties, or to retrieve child items from a collection.
    • Examples - SP.ClientContext, SP.Site, SP.Web, SP.ListItem, SP.Field, SP.WebParts.
  2. Mobile Device Development Enhancements
    • Greatly expands access from mobile devices to SharePoint pages, lists, and functionality.
    • Mobile Web Part Adapters - It is now possible to have a mobile page that corresponds to a nonmobile Web Parts page. You can adapt any Web Part on a nonmobile page by adding a control (mobile adapters) to the mobile page that duplicates the Web Part’s functionality. Some built in Web Parts already have adapters. You can develop your own adapters. A mobile adapter must be registered in the compat.browser file and registered as a Safe Control. For each Web Part on the Web Part page that has an adapter control, the adapter control will be rendered on the mobile page.
    • Mobile Messaging - SharePoint can now incorporate Short Messaging Service (SMS) messages sent to mobile telephones. A rich set of classes has been added to the object model to represent the Web Methods and response types of this protocol. If your solution requires a different protocol (other than OMS), base classes have been provided with default implementations of essential properties and methods.
    • ALERT - SharePoint 2010 takes advantage of the new mobile messaging framework to enhance its Alerts feature, to enable users to have alerts sent as SMS messages to their mobile devices. The SPAlert class now has a property that indicates whether the alert is delivered as e-mail or as an SMS message.
    • New Mobile Pages and Controls - SharePoint 2010 adds many new types of mobile pages and over 60 new public mobile controls for view filtering, people selection, file uploading, images, wiki pages, Web Parts pages, and other functionality.
  3. Sandboxed Solution
    • A sandboxed solution allows site collection users to upload their own custom code solutions. A sandboxed solution uses a subset of the Microsoft.SharePoint namespace. These objects are marked in the object model to show their availability in a sandboxed solution. All sandboxed solutions are stored in a solution gallery(under the _catalogs). In addition, there are facilities provided to help server farm administrators monitor and validate solutions that have been uploaded to these galleries. Performance can be monitored by measuring CPU execution time, memory consumption, and database query time. You can also monitor other aspects of operation including abnormal termination, critical exceptions, unhandled exceptions, and data marshaling size.
    • Now solutions built from the SharePoint Designer and Visual Studio are all .WSP.
    • Enables you to run user solutions without affecting the rest of the SharePoint farm. Users can upload their own custom solutions without requiring intervention from administrators, and without putting the rest of the farm at risk.
    • Runs in a separate process. Sandboxed solutions are restricted by CAS and the API subset
    • Sandboxed solutions are managed in Central Administration. Fully supported tooling in VS 2010
    • You can switch your project back and forth between PTS and Full Trust.
    • Supported elements -
      Content Type, Site Columns,Custom Actions, Declarative Workflow,Event receivers, feature receivers,InfoPath Form Services etc.
  4. Visual Studio 2010 SharePoint tools
    • Lot of great features and project templates for SharePoint developers. With all new SharePoint project templates you can leverage new configurable deployment feature which lets you configure the way you want to deploy or retract your project. You can use SharePoint extensibility to create your own, custom deployment steps and deployment configurations. Some SharePoint projects can be deployed either as sandboxed or farm solutions.
    • You can create extensions for projects, project items, define your own project item types and create deployment extensions.
    • Feature and package designers give you the ability to customize features in your solution and with packaging designer you can customize which features are getting deployed and how.
    • SharePoint Explorer is a new tool window that gives you a view into your SharePoint server. You can get a hierarchical view of lists, sites and workflows on your SharePoint server.
    • The following SharePoint specific project templates and project item templates are available in Visual Studio 2010:
      • Project Templates - Empty SharePoint project, Visual Web Part project, Sequential and State Machine Workflow,Business Data Connectivity Model, Event Receiver,List Definition,Content Type,Module Project,Site Definition
      • Project Item Templates - Empty Element,Web Part ,User Control,Application Page,Association Form,Initiation Form,
        Business Data Connectivity Resource Item,List Instance,List Definition From Content Type,Global Resources File
      • Besides above mentioned project templates, there are two import project templates for importing : Import Reusable Workflow,Import SharePoint Solution Package
    • VS 2010 have a very good integration support with SP2010 and we can easily build Sharepoint Artifacts and debug artifacts like web-parts just by hitting (CTRL-F5). For building custom web-parts, list definitions, etc out of the box i.e. no need to install a separate set of templates as we used to do it in MOSS 2007. The UI is cool which also gives us an option to preview the web-parts. you *can’t* use VS 2010 and SPD 2010 with MOSS 2007 or WSS 3.0, no backward compatibility. Just an exception to this fact is workflow projects of MOSS 2007, you can use it with VS 2010.
  5. Developer Dashboard
    • This feature displays us the diagnostic and performance related statistics. Something like how long did the request take to run, what event handlers were fired, in what sequence did these event handlers fire.
    • The developer dashboard in SharePoint gives developers the ability to monitor how well their code base is performing – on a page by page basis. For instance – when enabled, at the bottom of every page you'll see a report of all the custom code that has ran on that page, as well as how long it took to run. This dashboard helps you know how well each performs, which can help you identify if one is becoming a bottle neck for your whole page.
    • This is a tool that will give you
      • A breakdown of the request/response cycle with timings for each operation.
      • A breakdown of the response times for each database query that the rendering process triggers.
      • A breakdown of the load times for each Web Part on the page.
    • There are two methods to initialize this tool to work on your sites. You can do this with your handy old stsadm.exe or with PowerShell.
      • stsadm –o setproperty –pn developer-dashboard –pv OnDemand
      • (Get-SPFarm).PerformanceMonitor.DeveloperDashboardLevel = "OnDemand" .
    • The results will show you a little icon on the top right corner of your page. Clicking on the icon circled with either display or hide the results.
  6. Event Enhancements - new event model capabilities include the following:
    • on-create events for lists and Web sites.
    • Many of the new events are available in both synchronous and asynchronous modes.
    • add and delete events on lists.
    • add events on Web sites.
    • after events can now be either synchronous or asynchronous.
    • Event registration at the site collection level.
    • XML event registration at the site receiver.
    • Improved semantics for retrieving event data.
    • Improved user interface for form-level events.
    • Web-Adding: this event fires when a new Web site is created. If cancelled, then no Web site is created and the provisioning process does not begin.
    • WebProvisioned : This event fires after the Web site is fully provisioned and the provisioning process has stopped. It can be either synchronous or asynchronous.
  7. Query Enhancements (LINQ ,CAML)
    • New Query Support for Server Side Code - Querying data in server code has become significantly easier and more powerful in SharePoint 2010.
    • List Joins Supported in CAML Queries - You can now join multiple lists in a single query with the new Join Element (View). Use the new ProjectedFields Element (View) to specify what list fields to include in the results.
    • Querying in Client Side Code (Client Object Model) - You can query within the client object model in two ways: CAML queries or LINQ query.
    • Support for ADO.NET Data Services Framework - If your client application does not use the new SharePoint client object model and you only need to query list data, you have the option of querying the content databases by using ADO.NET Data Services Framework.
    • LINQ to SharePoint
      • SharePoint 2010 includes a LINQ to SharePoint provider to enable your code to query SharePoint lists from server code by using LINQ syntax. The provider translates your LINQ queries into CAML queries for submission to the content database.
      • you can have both implicit and explicit joins in your LINQ queries by using the join keyword.
      • You can also write to the lists by using the provider. As always with a LINQ provider, you must have classes that provide an object-oriented interface over the relational content databases. These classes are generated for you by the SPMetal tool that is included with SharePoint 2010.
      • SPMetal is a command line tool that generates entity classes, which provide an object oriented interface to the Microsoft SharePoint content databases. These classes are primarily used in LINQ to SharePoint queries; but they are also be used to add, delete, and change list items with protection against concurrency conflicts. Finally, they can be used as an alternative to the regular SharePoint object model for referencing content.
      • You can use LINQ syntax in your code even if you are not using the LINQ to SharePoint provider. Any SharePoint object that implements IEnumerable<(Of <(T>)>) can be queried with LINQ syntax.
      • The Microsoft.SharePoint.Linq namespace will contain the LINQ to SharePoint provider.
  8. Workflow Improvements
    • New Workflow Activities - New workflow actions (activities) are built into the core installation of SharePoint Foundation. New activities give you greater flexibility in your workflow design.
    • Pluggable Workflow Services - Pluggable workflow services allow you to create workflows that interact and receive data from external sources.
    • Workflow Events - Workflows in WSS3.0 were built to respond to a limited number of events. In SharePoint Foundation, workflows can interact with even more events. SharePoint Foundation also gives you the ability to create your own custom events and event receivers.
    • Site Workflows - Site workflows now allow you to develop workflows that can be associated with specified events and other workflow activities.
    • High Privilege Workflows - High Privilege Workflows allow declarative workflows to be executed with privileges other than the privileges of the workflow initiator.
    • Reusable Declarative Workflows - In SharePoint Foundation, declarative workflows are reusable, which allows you to apply your workflow development efforts for one list to multiple places.
    • It is now possible in SP2010 to have workflows scoped at Site level.In MOSS2007 it was only possible to apply workflow to List level.
    • SharePoint 2010 now supports workflows that can run without a SharePoint list item.
    • SharePoint Designer 2010 has a new designer for building workflows and these workflows can be exported directly to Visual Studio 2010. Visual Studio 2010 also has workflow tools improvements with a new workflow form designer, support for Sandboxed Solution workflow activities and the new Visual Studio 2010 SharePoint tools packaging designer.
    • Workflows used to be at Web Application Level in 2007. Now, you can build workflow at the site-level.
  9. Timer Jobs
    • Timer Job Overhauled. You can assign a timer job to any number of server in the farm.
    • From Central Admin you can run the timer job at will (Option: Run Now).
    • Detailed report on the job status, history as well as Progress bar showing the jobs which are running.
    • New Timer Jobs – new 21 jobs been added. we have 60 Jobs for SharePoint 2010
    • Timer Links - menu allows you to manage all jobs from the single screen, so you don’t need to navigate back to the Central Administration to switch on another screen.
    • You can see the jobs grouped by status – Scheduled, Running and History, instead of just a list of all jobs.
    • Ability to edit the job property from the status screen – all jobs are hyperlinks.
    • The change of edit time jobs are in the ability to change the time when the job starts via UI (previously you should do this via STSADN) and run job immediately
    • you can use the following PowerShell cmdlets(STSADM is still supported) to manage your Timer Jobs:Disable-SPTimerJob ,Enable-SPTimerJob
      Get-SPTimerJob ,Set-SPTimerJob ,Start-SPTimerJob
  10. Others
    • WCF - many of SharePoint’s own web services are now WCF services, but also because if you ever want to build a service application in SharePoint 2010, you’ll need to do WCF work.
    • Development on Windows 7 - SP 2010 development now on Windows-7 & vista(sp1 64-bit)
    • Upgrade and Packaging - SharePoint 2010 provides a more availability during upgrades and patching.
      • There is better support for read-only databases which allows users to access content while you upgrade or patch that content in another location.
      • SharePoint supports simultaneous database attach via Powershell which may reduce downtime associated with patching by multithreading the upgrade process.
      • There is also an option to redirect users to a 2007 farm on a per AAM basis which could reduce perceived downtime on large farms with multiple web applications since the entire farm doesn’t have to “appear” to be undergoing upgrade.
      • There is an option during patching to schedule the disruptive portion of the patch (the database upgrade part) so that downtime can be scheduled for a better time.


More - SharePoint 2010 Top 10 Features

Source - SharePoint 2010 Resources

No comments: