Cloud Formations for Curriculum Transformation Tech-read “Mashing up Services for Students” Alex...

24
Cloud Formations for Curriculum Transformation Tech-read “Mashing up Services for Students” Alex Lee & Steve Nisbet, Learning & Research Technology. MMU http://lrt.mmu.ac.uk

Transcript of Cloud Formations for Curriculum Transformation Tech-read “Mashing up Services for Students” Alex...

Page 1: Cloud Formations for Curriculum Transformation Tech-read “Mashing up Services for Students” Alex Lee & Steve Nisbet, Learning & Research Technology. MMU.

Cloud Formations for Curriculum Transformation

Tech-read “Mashing up Services for Students”

Alex Lee & Steve Nisbet, Learning & Research Technology. MMUhttp://lrt.mmu.ac.uk

Page 2: Cloud Formations for Curriculum Transformation Tech-read “Mashing up Services for Students” Alex Lee & Steve Nisbet, Learning & Research Technology. MMU.

Why change what we do?• National Student Survey - we’ve actually asked students what they think

– Lots of things they don’t like– They Do like the IT (certainly @ MMU in the main), more tech savvy?

• Some Unsurprising results perhaps –– Don’t make me think– Do give me what I want– I want it now!

Page 3: Cloud Formations for Curriculum Transformation Tech-read “Mashing up Services for Students” Alex Lee & Steve Nisbet, Learning & Research Technology. MMU.

EQAL

• EQAL – Complete review of teaching, support and administration of the University. Awareness of the need for change and new tools

Page 4: Cloud Formations for Curriculum Transformation Tech-read “Mashing up Services for Students” Alex Lee & Steve Nisbet, Learning & Research Technology. MMU.

Considerations for a solution• Students require (recurring themes):

– Immediacy– Personalisation– Simplicity and ease in finding the information they want– A core set of vital information to help them study and take part in their course

• Research from Initial developments, lessons learned– Student Portal – Background services for WebCT (alex?)

• Identification of needs, software and partners– What do students actually need?– Who /what can best provide (sometimes – choice is limited) the information

• How can we tap into the software solutions to provide immediacy, personalisation in a seamless manner, simple for the student?

Page 6: Cloud Formations for Curriculum Transformation Tech-read “Mashing up Services for Students” Alex Lee & Steve Nisbet, Learning & Research Technology. MMU.

Past PapersScanned articlesOn/off-campus media

Unit Code

Reading Lists Unit Code

Unit Code

Podcasts

Hand-ins & marksUnit Code

MMU ID

Unit Area TimetableUnit Code

MMU ID

EnrolmentsUnit Code

MMU ID

This work is licensed under a Attribution-NonCommercial-ShareAlike 2.0 licence

provisioning

Consistent mashups for every Unit

Page 7: Cloud Formations for Curriculum Transformation Tech-read “Mashing up Services for Students” Alex Lee & Steve Nisbet, Learning & Research Technology. MMU.

The key Problems then…

• How do we mash it all up?– Systems often incompatible with each other– Corporate buy-in (we need that data)– Common enforced tags (student id,unit_id)– Get around the incompatibilities• XML as a transit• SSO (permissions, authorization and so on)

Page 8: Cloud Formations for Curriculum Transformation Tech-read “Mashing up Services for Students” Alex Lee & Steve Nisbet, Learning & Research Technology. MMU.

Services model• Separate service oriented support platform

– Eases the load on the mainline platform– Aggregates many different and occasionally incompatible database driven systems and

delivers a standard output of XML based information for consuming blocks/plugins on the mainline

– Portable data - isolated from major platform changes (should still work fine in Moodle 2 – doesn’t rely on schema changes Etc.)

– standard architecture (render anything not quite standard)– Can be used to deliver to other platforms (W2C Widgets -> phones, CMS etc)– Clear set of logs and statistics – better measurement of use– DR / resiliency potentially easier, but requires excellent network connections and hosting

(shameless ULCC plug folks!)

Page 9: Cloud Formations for Curriculum Transformation Tech-read “Mashing up Services for Students” Alex Lee & Steve Nisbet, Learning & Research Technology. MMU.

Service-oriented architecture

SOAP

REST

REST Podcast

Producer

REST

REST

SOAP

apis.mmu

getMoodleAreasgetMoodleAnnouncementsgetMoodleEventsgetEventsgetResourcesgetEnrolmentsgetAssessmentsgetCurriculumDetailsgetFeeStatus

REST

This work is licensed under a Attribution-NonCommercial-ShareAlike 2.0 licence

Page 10: Cloud Formations for Curriculum Transformation Tech-read “Mashing up Services for Students” Alex Lee & Steve Nisbet, Learning & Research Technology. MMU.

getResources web service

SOAP

REST

REST Podcast

Producer

REST apis.mmu

This work is licensed under a Attribution-NonCommercial-ShareAlike 2.0 licence

Individual it

ems

extra

cted fr

om

RDF & XHTML

Lists tagged with Unit code

Podcasts tagged with Unit code

Search by Unit code

returns RSS feed

of matching podcasts

Uploads tagged with Unit code

Web-service searchby Unit returns matching items

Custom block

+ To buy (3)

+ Essential (8)

+ Further (12)

+ Podcasts (4)

+ Exam papers (4)

getResources returns:Atom feed with SSO item links(item provenance maintained in source element)

getResources called with: moodle auth usermoodle course id (unit code)datetime stampsecurity token

Page 11: Cloud Formations for Curriculum Transformation Tech-read “Mashing up Services for Students” Alex Lee & Steve Nisbet, Learning & Research Technology. MMU.

PC Availability Web Service

Page 12: Cloud Formations for Curriculum Transformation Tech-read “Mashing up Services for Students” Alex Lee & Steve Nisbet, Learning & Research Technology. MMU.

Rest Web Service Overview

• Can be accessed over http in a browser• Allows focus on data!• Very quick to develop • Quick development time means innovation can happen quickly• MMU web services output data in XML, RSS, and Atom• Turns inconsistent formats into standard compliant formats• Access data around firewalls and across networks – access anywhere

Page 13: Cloud Formations for Curriculum Transformation Tech-read “Mashing up Services for Students” Alex Lee & Steve Nisbet, Learning & Research Technology. MMU.

REST Web Service Overview

• Can develop in a variety of languages – MMU use C# • Strict syntax – good for critical services

• What version of .NET?• Cool software or addons:• Use SoapUI to check SOAP services to consume in .NET!• LinqPad• PasteXML as XElement

Page 14: Cloud Formations for Curriculum Transformation Tech-read “Mashing up Services for Students” Alex Lee & Steve Nisbet, Learning & Research Technology. MMU.

Consuming RSS in Moodle Block require_once($CFG->libdir .'/rsslib.php'); require_once(MAGPIE_DIR .'rss_fetch.inc'); if (!defined('MAGPIE_OUTPUT_ENCODING')) { define('MAGPIE_OUTPUT_ENCODING', 'utf-8'); // see bug 3107 } ob_start(); $rss = fetch_rss(‘http://apis.mmu.ac.uk/Service1.svc/getResources?’.

‘getResources?person=' . $USER->id . '&unit=' . $COURSE->shortname); $rsserror = ob_get_contents(); ob_end_clean(); if ($rss === false) {

//handle error} foreach ($rss->items as $item) {

//process the RSS!}

Personalised! Tagged!

Page 15: Cloud Formations for Curriculum Transformation Tech-read “Mashing up Services for Students” Alex Lee & Steve Nisbet, Learning & Research Technology. MMU.
Page 16: Cloud Formations for Curriculum Transformation Tech-read “Mashing up Services for Students” Alex Lee & Steve Nisbet, Learning & Research Technology. MMU.

Results & Stats

• In 227 days the web services have had 6,445,204 hits

• getWebCTAreas 2,426,383• getWebCTAnnouncements 1,600,768• getFeeStatus 768,057• getPCAvailability 306,403 This is only by

widgets and My Mobile does not count My MMU getFeeEmail 3,506 (i.e. number of students who have requested full details)

Page 17: Cloud Formations for Curriculum Transformation Tech-read “Mashing up Services for Students” Alex Lee & Steve Nisbet, Learning & Research Technology. MMU.

Useful Links

• lrt.mmu.ac.uk/– /w2c = W2C widget developments– /staff-blogs

• LRT on twitter• twitter.com/MMULRT/lrtstaff

Page 18: Cloud Formations for Curriculum Transformation Tech-read “Mashing up Services for Students” Alex Lee & Steve Nisbet, Learning & Research Technology. MMU.

Questions?

Page 19: Cloud Formations for Curriculum Transformation Tech-read “Mashing up Services for Students” Alex Lee & Steve Nisbet, Learning & Research Technology. MMU.

•Create a new project in Visual Studio with WCF Service Application Template• Edit the config.xml file• Delete the <service> and <servicebehavoiur> nodes• Add the following code:

Creating a REST Web Service in VS2008

Page 20: Cloud Formations for Curriculum Transformation Tech-read “Mashing up Services for Students” Alex Lee & Steve Nisbet, Learning & Research Technology. MMU.

<service name="uk.ac.mmu.Service1" behaviorConfiguration="uk.ac.mmu.Service1Behavior"> <endpoint address="" binding="wsHttpBinding" contract="uk.ac.mmu.IService1"> </endpoint> <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>

<endpointBehaviors> <behavior name="webHttp"> <webHttp/> </behavior> </serviceBehaviors></endpointBehaviors>

Page 21: Cloud Formations for Curriculum Transformation Tech-read “Mashing up Services for Students” Alex Lee & Steve Nisbet, Learning & Research Technology. MMU.

Create the InterfaceEdit Iservice.cs

using System.ServiceModel.Web;

[OperationContract, WebGet(UriTemplate = "getResources?person={user}&unit={unit}", ResponseFormat = WebMessageFormat.Xml)]

Rss20FeedFormatter GetResourcesRss( string user, string unit);

Page 22: Cloud Formations for Curriculum Transformation Tech-read “Mashing up Services for Students” Alex Lee & Steve Nisbet, Learning & Research Technology. MMU.

Reading XML – Simple Waystring token = GetMD5Hash(developer + date + sharedsecret);

egXml.Load('Service1.svc/getResources?person=' + person + 'unit=' + unit + 'developer=' + dev + 'dtm=' + date + 'token=' + token);

nsm.AddNamespace("mmu", "http://apis.mmu.ac.uk/");

XmlNodeList xnList = homeAreaXml.SelectNodes("//entry");

foreach (XmlNode xn in xnList){

//do something!}

Page 23: Cloud Formations for Curriculum Transformation Tech-read “Mashing up Services for Students” Alex Lee & Steve Nisbet, Learning & Research Technology. MMU.

Reading XML or RSS – The LINQ Way

var items = from item in feed.Items where true orderby item.LastUpdatedTime.Date descending select item;

foreach (SyndicationItem item in items) {

//do something!}

Page 24: Cloud Formations for Curriculum Transformation Tech-read “Mashing up Services for Students” Alex Lee & Steve Nisbet, Learning & Research Technology. MMU.

Outputting RSS SyndicationFeed resourcesFeed = new SyndicationFeed( "Resources for " + unit, "", null); Collection<SyndicationItem> items = new Collection<SyndicationItem>();

item = new SyndicationItem( title1 , description1, new Uri(buyItemsFeed) ); items.Add(item);item = new SyndicationItem( title2 , description2, new Uri(essentialItemsFeed) ); items.Add(item);resourcesFeed.Items = items;

//choose between outputting as RSS or AtomRss20FeedFormatter rss = new Rss20FeedFormatter(feed);

return rss;