Wednesday 9 February 2011

SharePoint 2010 Development Session 1 : Introduction

Despite being hands on with SharePoint 2010 during the beta version, I haven't had much exposure to developing in 2010. Obviously there has been information release which I have read but I havent got my hands dirty in a while. When I was offer then chance to sit in on some SharePoint 2010 Dev training I jumped at the chance. This post relates to the first session which gives you an intro to development in SP2010. These are my notes but you are welcome to read them.

SharePoint 2010 Developer introduction

A developer training virtual machine is available for free at
The following links are usefule sites relating to the development community. 
SharePoint 2010 Development Stack
  • Development can be done on client operating system.Don't have to develop on the server.
  • 64 bit windows server 2008 for production (Windows 7 possible for local)
  • .net 3.5 (Not .net 4.0)
General points relating to SP2010
  • There is a client object model for silver light and JavaScript
  • Can share service applications across farms.
  • SharePoint designer will help you connect to BCS as opposed to old school XML files
  • Claims based authentication allows you to authenticate against other providers. Eg Google / face book and so on.
New User Interface
  • Contains the ribbon which is inline with existing office version.
  • The page editing tools have given more power via the UI. It is possible to change the layout, insert a picture and format text, insert web parts more easily.
  • List management is improved. A user can select item and edit without post back due to AJAX functionality.
  • List management also allows selection of multiple items in a list and act on them as a group. Previously the only way to group list items by selection was via manage content and structure. This method only allowed administrators to perform certain tasks.
  • Essentially the interface is more user friendly.
SharePoint Dev Terminology review (Object model) 
  1. SPFarm - Farm object
  2. SPWebApplication - Web application
  3. SPSite - Site collection
  4. SPWeb - Site / Sub site
  5. SPList / SPDocumentLibrary - List or document library
  6. SPItem / SPFile - Item or document library
SharePoint 2010 Development Tools
Introduction to Visual Studio platform
  • When adding references it is possible to configure Visual Studio to have a tab to allow you to select SharePoint assemblies without browsing the 14 hive.
  • If you receive an error saying file not found when you run code, it is likely that the assembly is not compiled in 64 bit.. You must change the build to be 64 bit in VS there will be an error.
SharePoint designer 2010
  • SPD can be started from site actions menu.
  • When opening a site the a "Site object" browser is available which allows viewing of Content types / external content types / lists/ master pages / workflow / groups sub sites / all files (and more).
  • Can see permissions of objects directly via summary screen so can update permissions this way through SharePoint designer.
  • Summary pages shows other information including list id and other relation ships / forms views / etc
  • Makes it easier to use
  • The are options to copy and modify the SharePoint workflows. This includes out of the box workflows like approval.
  • Can have site workflow to apply to whole site. So can upload lots of files and process as one group.
  • Workflow designer is improved and is not in wizard form (although some of the pop ups are the same).
  • Site work flows available from the all site content screen
  • Preference is PowerShell over Stsadm.
  • Cmdlets are used to provide functionality and to do administrative tasks
  • Pipe lining and formatting allows output to be filtered and formatted in a particular way. This can be piped to file.
  • To run .ps1 files execution policy will need to be set. There are 3 levels  Restricted / unrestricted / bypass.
  • All dos commands are available as well as others.
  • "Tab" key allows command completion
  • "Integrated Scripting environment" will help you come up with power shell commands and writing code. Intelisense and debugging is available in this environment. (Need to add SharePoint commands to load SharePoint snap in for your profile).
  • Add ps snap in to the Micrsoft.SharePoint.PowerShell to allow SharePoint to access SP commands.
  • Help is there "Get-help"
  • Can write powershell snap its which are like stsadm extensions. (Gary lapoint is still doing it at
SharePoint 2010 Ribbon and UI
  • Ribbon control development is the same as for office except for the "Ribbon gallery control".
  • Alerting the user can be doing by status (at the top of the page) / page notifications (pop up in to right hand corner of the page..You can write to these as a developer. They don't require postbacks.
  • In place editing allows users to edit in place without doing postbacks. Highlight and edit. (There seems to be a lot of focus on not doing postbacks so bare this in mind when implementing modifications).
SharePoint 2010 Dialogs
Modal Dialog pop ups are available through JavaScript calls which are great for replacing traditional "pop up alerts".
Var dialog = {url : "", title: "hello", width: 400, height: 400};
Sp.UI.Notify.addNotification to add the notification

Custom actions

These allow you to add extra actions to various parts of the interface. This includes the ribbon.
Actions can be added directly through SharePoint designer making it much easier than 2010.

  1. Create a new view for a list in SharePoint designer.
  2. Add a custom action to the ribbon so that there is a quick way to get to the list view.
Other points
  • All sites now have pages and page libraries.
  • Sites contain the following Master pages( V4.master, Minimal.master, Simple.master, Default.master)
  • SharePoint now contains Well formed XHTML (cant believe this is advertised as a selling point - but hey at least we are finally here)
  • SharePoint Cross browser IE Firefox and CHROME
  • WCAG 2.0 AA supported OOTB
  • Rich text editor supports XHTML
So there we have an introduction to SharePoint development in note form.

No comments:

Post a Comment