SharePoint 2010 Development Training Resources

Links to some very good training resources for developers of SharePoint 2010:

 

SharePoint 2010 Reference: Software Development Kit

Contains a huge amount of product documentation and examples.

http://www.microsoft.com/downloads/details.aspx?FamilyID=f0c9daf3-4c54-45ed-9bde-7b4d83a8f26f&displaylang=en

 

SharePoint 2010 Developer Training Kit

Another download of a huge amount of resources covering the entire platform. Contains videos, presentations and demos.

http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=83a80a0f-0906-4d7d-98e1-3dd6f58ff059

 

What’s new for developers | SharePoint 2010

Quick overview of new features for developers.

http://msdn.microsoft.com/en-us/sharepoint/ee514561.aspx

 

Get Started Developing on SharePoint 2010

10 free online training modules on SharePoint 2010.

http://msdn.microsoft.com/sv-se/sharepoint/ee513147(en-us).aspx

 

SharePoint 2010 Advanced Training

10 free online modules on advanced developer features.

http://msdn.microsoft.com/sv-se/sharepoint/ff420378(en-us).aspx

Working safely with SharePoint client scripts

SharePoint 2010 uses a lot of client side scripts and have now many ways of making sure that this is executed without errors and hang-ups. The method ExecuteOrDelayuntilScriptLoaded makes sure that calls to a library is not executed until said library is loaded.

Example:

   1: ExecuteOrDelayUntilScriptLoaded(showModal, 



   2:                 "sp.js");



   3:  



   4: function showModal()



   5: {



   6:     SP.UI.ModalDialog.showModalDialog({



   7:         url: "/Lists/Announcements/NewForm.aspx";



   8:     });



   9: }




This is excellent practice as we can then ensure that our script libraries are loaded properly without the need for the developer to worry about when it’s loaded. To ensure that this works, add the following call at the bottom of your .js file:



NotifyScriptLoadedAndExecuteWaitingJobs("my.custom.lib.js");



This will cause the queued scripts to execute.



Also, make sure to enable client-side script debugging using Visual Studio and add breakpoints as the libraries can be very hard to navigate.

Tip: Debugging JavaScript using Visual Studio

Short tip. How to enable breakpoints and step-through debugging using IE and Visual Studio.

I find this very useful for debugging those pesky long SharePoint client script files.

You need to first enable script debugging in your browser (list quoted from MSDN):

  1. In Internet Explorer, click the Tools menu and choose Internet Options.
  2. Click the Advanced tab.
  3. Under the Browsing category, clear the Disable Script Debugging checkbox

Then add the reserved keyword debugger. This keyword indicates where Script Debugger stops execution and starts the debugger. You can use this keyword to trace the values of variables throughout the remainder of the routine. Add this either in your script or, as I prefer to do, on the element using the IE developer toolbar.

image

Clicking the button above will now cause Visual Studio to enter debug mode in step-through from that breakpoint.

 image

For more info, see

http://support.microsoft.com/kb/816173

Automating SharePoint Deployments

Today I compiled a SharePoint 2010 version of the SPDocGen SharePoint Documentation Generator and am very happy to get farm configuration documentation done automatically.

Later on, I also automated my SharePoint installation using the PowerShell based scripted installer AutoSPInstaller which also had the added benefit of supporting offline prerequisite install mode.

You can have one configuration file per environment (so one for development, one for test/build, one for stage/UAT and one for production). Combine this with the automated farm documentation and you have a great package.

In the end, I prepared an image with the scripted install and offline prerequisites already slipstreamed and the configuration change to allow the install to run on Windows 7. What more can you ask for?