Thursday 26 May 2011

My jQuery, AJAX and SharePoint 2010 slide deck (SUGUK)

I attended a great SharePoint User Group UK meeting last night – compared to the London event it was notable how many people had travelled significant distances to be there, great dedication! The first session was me (doing the first dev-focused session at this event) and the second was a panel Q & A discussion with some excellent conversations. The topic for my talk was ‘SharePoint, jQuery and AJAX - a beginner's survival guide’, and although I’ve given this talk before I want to publish the deck and code samples again as I made some updates since the last time. In fact, it’s worth calling out one of these in particular here I think:

  • If using jQuery with SharePoint 2010, ALWAYS put jQuery into ‘no conflict mode’ via jQuery.noConflict(). This is necessary because SharePoint’s internal JavaScript uses the $ symbol as a variable name in a couple of places, and this causes clashes since it’s the alias used by jQuery

The deck has information on my ‘3 core techniques’ for jQuery/AJAX apps with SharePoint, and also tips and tricks like how to get Intellisense for jQuery and the SP2010 Client Object Model, tools for debugging AJAX apps etc. The code samples cover a fairly wide range of things:

  • jQuery
    • Showing/hiding elements
    • Setting the HTML of an element
    • Cascading dropdowns
    • AJAX requests
  • Client Object Model
    • Fetching simple data
    • Implementing a “type-ahead filtering” sample against the documents in a document library
    • Creating data e.g. a new list item
    • Techniques for reducing the data going over the wire (by 95% in my example!)
  • jQuery + HTTP handlers
    • Why/how
    • Returning simple data
    • Returning complex data as JSON

You can download my slide deck and code samples from:

http://dl.dropbox.com/u/11342240/ChrisOBrien_jQueryAJAXSP2010_SamplesAndDeck.zip

Big thanks to Mark Stokes for hosting the event and inviting me to speak.

Tuesday 10 May 2011

Speaking at SUGUK (Manchester) on jQuery, AJAX and SP2010–24th May

In a couple of weeks (24th May) I head north to speak at the North West branch of the UK SharePoint user group – I’m looking forward to it for several reasons, not least because I come from Manchester originally. As usual I’m talking about SharePoint development matters, but hopefully the evening will have fairly broad SharePoint appeal as the 2nd session will be an open Q&A session with myself, Brett Lonsdale, Mark Stokes, Sam Dolan and Alex Pearce on the panel. This means we’ll be strong on topics such as development, architecture, BCS, tools, branding/design, governance, end-user adoption, education and Office 365 etc., but there should also be enough combined expertise to answer an even wider range of questions. It should be an interesting discussion. 

My talk is aimed at devs, but I’m also hoping it’s interesting in user experience terms to a wider audience. Here’s the summary:

SharePoint, jQuery and AJAX - a beginner's survival guide

It takes a different approach to build SharePoint apps with a slick AJAX experience - getting rid of those nasty postbacks involves declining some help from .Net and learning new techniques. Whilst the answers often lie with the Client Object Model and jQuery, both are hefty topics so the barrier can be intimidating. This talk aims to boil things down to "3 core techniques to survive by", with step by step demos to show the development process. Tips and tricks such as enabling jQuery intellisense, debugging JavaScript and using JSON will be covered. To pull the concepts together, the session will round off with a demo migration of an existing mini-application from postbacks to AJAX. Building custom SharePoint experiences that users love is simpler than you think!

I’ve given this talk before (at SharePoint Saturday UK), but it’s taken on another dimension for me since then as I’ve spent the last 6 months using these techniques day in, day out for my current project. I’m extremely glad I spent time getting to grips with jQuery and AJAX, my career would probably be in the toilet otherwise. Hopefully my talk will be useful information to novices and experienced devs alike.

The event is free and on Tuesday 24th May, at the Palace Hotel Manchester. Sign up here - http://suguk.org/forums/26548/ShowThread.aspx