{"id":626,"date":"2009-05-19T10:04:00","date_gmt":"2009-05-19T14:04:00","guid":{"rendered":"http:\/\/www.dr-chuck.com\/wordpress\/?p=626"},"modified":"2011-12-17T12:30:41","modified_gmt":"2011-12-17T16:30:41","slug":"slingsakai-building-a-widget","status":"publish","type":"post","link":"https:\/\/www.dr-chuck.com\/csev-blog\/2009\/05\/slingsakai-building-a-widget\/","title":{"rendered":"Sling\/Sakai Building a Widget"},"content":{"rendered":"<p>\nFresh off getting my first Sling Application finished last night &#8211; I came in and told Ian that I had nothing to do today.  Of course he said &#8220;no&#8221; &#8211; I needed to build a widget for LTI as well.   I said &#8220;what widget&#8221; and he said that the whole Slikai UI was there under http:\/\/localhost:8080\/dev and I needed to write a Widget.<\/p>\n<p>\nI started work at 10AM &#8211; with a quick tutorial from Nico and his HelloWorld example, I hacked away at it.  After about 2 hours working by myself I had it doing settings and creating the resource.  At that point Nico helped me do the actual launch iframe and a few nice bits like a cancel button and it was done and put some polish on it.<br \/>\n<center><a href=\"http:\/\/www.dr-chuck.com\/images\/2009\/05\/index.php?img=19-05-09_075449_01.jpg\" target=\"_new\"><img decoding=\"async\" src=\"http:\/\/www.dr-chuck.com\/images\/2009\/05\/19-05-09_075449_01.jpg\" width=\"600\" \/><\/a><\/center><\/p>\n<p>\nIt was done three hours after I started &#8211; and this was my first widget since I tried back in July 2008.  I was pretty pleased with the ease of figuring things out &#8211; maybe I just knew more about AJAX, jQuery, JavaScript, and FireBug after writing those chapters in the book.  However and whatever the case &#8211; it came together quickly and the ability to use Sling to handle all my persistence needs instead of writing a service and plugging it into sdata made an amazing difference in ease of building my widget and getting it running.<\/p>\n<p>\nSo now I am done with today&#8217;s task.  All is now checked into my SVN repo in contrib\/csev\/trunk\/sling<\/p>\n<p>\nSo I told Ian that I was done with the widget and still had the whole afternoon free!  So he told me to add Pluto 2.0 (JSR-286) to Sling\/Sakai.  That sounds like a good idea &#8211; but more than a three hour tour.  So we will just draw pictures and call it good.<\/p>\n<p>\nIn summary, I continue to be pleased with the Sling\/Sakai combination and eagerly look forward to its evolution.<\/p>\n<p>\nThe additional README bits are below.  Again many thanks to Ian and Nico for their patient mentoring.<\/p>\n<p><!--more--><\/p>\n<pre>\n==== Making the widget work ====\nRun the script \"dowidget.sh\" - it will upload the widget\nto your Sling instance.\nNote - if you run the script more than once, you will\nget 2 405 errors.  This is OK the folders already exist\nThen edit the file in your Sling repo\n\/Volumes\/localhost\/dev\/_configuration\/widgets.js\nLook for the entry right after helloworld\nand add the widget definition for simplelti\nin content\/devwidgets\/widgets.js\nThen go to\nhttp:\/\/localhost:8080\/dev\/\nlogin as admin\/admin, place an LTI widget\ndo \"Settings\" and set\nurl: http:\/\/wiscrowd.appspot.com\/wiscrowd\nsecret: secret\nand press Save\nViola - you should see LTI in the portal!\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Fresh off getting my first Sling Application finished last night &#8211; I came in and told Ian that I had nothing to do today. Of course he said &#8220;no&#8221; &#8211; I needed to build a widget for LTI as well. I said &#8220;what widget&#8221; and he said that the whole Slikai UI was there under [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-626","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/posts\/626","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/comments?post=626"}],"version-history":[{"count":1,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/posts\/626\/revisions"}],"predecessor-version":[{"id":2747,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/posts\/626\/revisions\/2747"}],"wp:attachment":[{"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/media?parent=626"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/categories?post=626"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/tags?post=626"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}