12
© Ignia Pty Ltd 1 Presented by: Harnessing client-side technologies to enhance your SharePoint site Matt Menezes

Harnessing client-side technologies to enhance your SharePoint site

  • Upload
    spmatt

  • View
    4.387

  • Download
    1

Embed Size (px)

DESCRIPTION

SharePoint developers are often far too quick to jump into Visual Studio to solve every problem they face. It’s easy to get stuck in the .NET 2.0 way of thinking and get shielded from the latest technology and trends absorbing the web. SharePoint 2010 opened the door to client side technologies by introducing the Client Object Model and REST services – it’s only right that we as developers learn to embrace it.Curious to see how simple it is to combine the Client Object Model with jQuery? Create out of the box solutions with the Content Query Web Part and XSL? Explore the power of REST services with Knockout? Or perhaps see what all the fuss is about regarding SignalR?This session is not just for developers. Rather than deep dive into a particular client side technology we’ll explore this range of tools at our disposal to deliver interactive user experiences. Learn how to harness these client side technologies to rapidly deliver solutions for your organisation, whether you’re an architect, developer or power user there will be something here to get your imagination running wild.

Citation preview

Page 1: Harnessing client-side technologies to enhance your SharePoint site

© Ignia Pty Ltd 1

Presented by:

Harnessing client-side technologies to enhance your SharePoint site

Matt Menezes

Page 2: Harnessing client-side technologies to enhance your SharePoint site

© Ignia Pty Ltd 2

Who am I

Matthew MenezesSenior Solutions Consultant at Ignia

E: [email protected]: @spmatt_menezesB: http://spmatt.wordpress.com

7+ years .NET / Microsoft technologies4+ years SharePoint

MCTS: Application DevelopmentMCTS: WSS Configuration & DevelopmentMCTS: MOSS ConfigurationMCTS: SharePoint 2010, Application DevelopmentMCPD: SharePoint Developer 2010

Page 3: Harnessing client-side technologies to enhance your SharePoint site

© Ignia Pty Ltd 3

Agenda

• JavaScript• jQuery• Knockout• SignalR• Client Object Model• REST services• SPServices• HTTP Handlers• Content Query Web Part

Page 4: Harnessing client-side technologies to enhance your SharePoint site

© Ignia Pty Ltd 4

JavaScript

• JavaScript is a dynamic scripting language• Primarily used for client-side scripting• Supported by web browsers• Requires JavaScript to be enabled within the browser

Page 5: Harnessing client-side technologies to enhance your SharePoint site

© Ignia Pty Ltd 5

jQuery

• jQuery is a cross-browser JavaScript library• Designed to simplify client-side scripting• As it is based on JavaScript, also requires JavaScript to be enabled• Requires a reference to the jQuery library

• So popular now, the libraries are hosted on multiple content delivery networks• http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js • http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.6.4.min.js• http://code.jquery.com/jquery-1.6.4.min.js

Page 6: Harnessing client-side technologies to enhance your SharePoint site

© Ignia Pty Ltd 6

The basics

The old way:

var elem = document.getElementById(“id1");

The jQuery way:

$(‘#id1’) // get by id$(‘.class1’) // get by class$(‘a’) // get by element type

Large array of built in functions to make scripting easier:

• Selectors• Attributes• Traversing• Manipulating the DOM• CSS• Events and more

Page 7: Harnessing client-side technologies to enhance your SharePoint site

© Ignia Pty Ltd 7

Tips and Tricks

• Use jQuery.noConflict()• Use jQuery(document).ready()• Leverage callbacks• Don’t write scripts directly into the CEWP• Know your options for referencing jQuery• Enable Intellisense in Visual Studio• Know your options for debugging

Page 8: Harnessing client-side technologies to enhance your SharePoint site

© Ignia Pty Ltd 8

Plugins!

• Accordion menu• Image sliders• Lightbox• Tooltips• Auto Extenders• Pagination• A-Z lists• Charts and graphs

Page 9: Harnessing client-side technologies to enhance your SharePoint site

© Ignia Pty Ltd 9

Knockout

• Is a JavaScript library which uses ‘observers’ to sync the UI with a data model• Dependency is tracked throughout the view model• You declaratively bind properties in the view model to elements• Can data-bind to templates, nested templates and loop through data• Can use jquery-tmpl or jsRender for templating• Works particularly well with the MVVM (model-view, viewmodel) pattern

Page 10: Harnessing client-side technologies to enhance your SharePoint site

© Ignia Pty Ltd 10

SignalR

• Real-time client/server communication over the web• Runs on the .NET 4.0 framework• Can support cross-domain calls

Page 11: Harnessing client-side technologies to enhance your SharePoint site

© Ignia Pty Ltd 11

Retrieving Data on the Client Side

• Client Object Model• REST Services• SPServices• HTTP Handlers• Content Query Web Part