I recently went to SharePoint 2010 Developer training. The following are some notes I took which were really interesting for me to learn about when comparing to my past experiences in SharePoint 2007. There are tons of published articles out there that capture much of the big things; this should capture some subtle changes as a developer you should know about.
My instructor was Scott Hillier with Critical Path Training. The course was really good.
- Upgrade Actions and Event Handler – Can I say Hallelujah? This is a new ability to add on custom actions to deployed features without having to completely remove old versions and redeploy. There is a new tag called <UpgradeActions> which can be added to the Feature.xml. There is also a new FeatureUgrading event handler. One note is that PowerShell must be used to actually initiate the upgrade. This will be very helpful to managing deployed Features. When Features are activated across a large number of sites it can be challenging to push out changes and make sure that all new activations of that Feature are the same from that point on.
- Declarative Features – Little tip is that in Visual Studio 2010, if you are building a purely declarative Feature, like content types, turn off the DLL generation because there really is no DLL that needs to be deployed.
- SharePoint Explorer – Do not take this for granted. This is a great way to dig around SharePoint and get things you may need for development, like those pesky instance GUIDs.
- Asynchronous Web Parts – For long running processes in your web parts. You can use System.Web.UI.PageAsyncTask class to facilitate handling the callback when the processing is complete.
- Upgrading Content Types – Along the lines previously mentioned, <UpgradeActions> has a tag called <AddContentTyepField> which can be used to help with content type Features deployments. Sometimes pushing out changes in SharePoint 2007 would not well and this should resolve those problems.
- Relational Lists – This will be very interesting to work with in SharePoint 2010. We all know that SharePoint lists do not replace a real database like SQL Server however we do Joins between lists and referential integrity is now supported. Another interesting feature is that columns can now be marked as unique, forcing a unique value for that the list.
- List Throttling – Has been introduced to ensure that developers do not continue bad behavior by querying too many items and taking down your SharePoint site.
- List Item and List Item Field Validation – We can now create formulas for validations reducing the amount of custom event handlers we would have to write.
- Post Synchronous Events – THANK YOU. We can now add a property to the receiver definition (SPEventReceiverDefinition.Synchronization) which allows for post-processing after the commit but before the user is shown the result.
- Cancel Event Error Page – We now have the ability when we want to cancel an event handler, maybe because a business rule failed, we can route the user to a screen with custom error explaining why the event failed.
- LINQ to SharePoint – This is news everyone should know about but man is working with data in SharePoint lists so much easier without CAML code. NOTE – if you want to extend the code that is generated code by SPMetal are partial classes. So you can write your own partial class that combines custom logic which will not be lost when you regenerate your classes.
- WCF Data Services – REST based services make it very easy for external applications to have direct access to data in SharePoint. Generating a Proxy for simple Windows or command line application is easy.
- Content Organizer – You should really look into the new features here instead of custom coding like we have had to do the past.