<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>On the ROA</title>
	<atom:link href="http://depts.washington.edu/ontheroa/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://depts.washington.edu/ontheroa</link>
	<description>The UW blog for all things Resource Oriented Architecture &#38; web services - email appdev@u.washington.edu</description>
	<lastBuildDate>Sat, 21 Nov 2009 00:56:18 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>What should go into the UW Web Services Registry?</title>
		<link>http://depts.washington.edu/ontheroa/?p=305</link>
		<comments>http://depts.washington.edu/ontheroa/?p=305#comments</comments>
		<pubDate>Sat, 21 Nov 2009 00:56:18 +0000</pubDate>
		<dc:creator>ttchang</dc:creator>
				<category><![CDATA[Web Services]]></category>

		<guid isPermaLink="false">http://depts.washington.edu/ontheroa/?p=305</guid>
		<description><![CDATA[In a recent ROA Technical team meeting we discussed as a team what things should and should NOT go into the Registry. The intention is to expand the scope of the Registry to list all useful programmatic web end points including RSS &#38; ATOM feeds vs just focusing on web services designed and built by UW developers. The [...]]]></description>
			<content:encoded><![CDATA[<p>In a recent <a href="https://sig.washington.edu/itsigs/ROA_Tech_Meeting_10-20-09">ROA Technical team meeting </a>we discussed as a team what things should and should NOT go into the Registry. The intention is to expand the scope of the Registry to list all useful programmatic web end points including RSS &amp; ATOM feeds vs just focusing on web services designed and built by UW developers. The goal for the Registry is to be the first stop for developers needing programmatic access to UW data over the web.   Let us know if you think there are other things we should add or remove from the list.</p>
<h3>What should go into the Registry?</h3>
<ul>
<li>Something that is accessible over the web (in other words uses http)</li>
<li>Contains UW data</li>
<li>The content is machine parseable (json,xml,xhtml)</li>
</ul>
<h3>What should NOT go into the Registry?</h3>
<ul>
<li><a href="http://blog.orenblog.org/">Oren&#8217;s Blog</a> (RSS/Atom feed)</li>
<li>A link to an HTML page that is NOT XHTML strict</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://depts.washington.edu/ontheroa/?feed=rss2&amp;p=305</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to request content types (XML, XHTML, JSON, etc.) from RESTful services?</title>
		<link>http://depts.washington.edu/ontheroa/?p=270</link>
		<comments>http://depts.washington.edu/ontheroa/?p=270#comments</comments>
		<pubDate>Fri, 20 Nov 2009 03:46:06 +0000</pubDate>
		<dc:creator>rberk</dc:creator>
				<category><![CDATA[Web Services]]></category>

		<guid isPermaLink="false">http://depts.washington.edu/ontheroa/?p=270</guid>
		<description><![CDATA[How should web services determine the format of a response to a client? Or how does a client ask for XML, XHTML, or JSON?
This question is becoming more pressing as UW web services such as the Student Service, Financial Service, and ID Card Service begin to expand their format offerings. These services began with just [...]]]></description>
			<content:encoded><![CDATA[<p>How should web services determine the format of a response to a client? Or how does a client ask for XML, XHTML, or JSON?</p>
<p>This question is becoming more pressing as UW web services such as the <a href="http://wiki.cac.washington.edu/display/SWS">Student Service</a>, <a href="http://wiki.cac.washington.edu/display/FWS">Financial Service</a>, and <a href="http://wiki.cac.washington.edu/display/idcardws">ID Card Service</a> begin to expand their format offerings. These services began with just XHTML, largely due to how conveniently it renders in a browser, but a <a href="http://ontheroa.uservoice.com/pages/15200-university-of-washington-roa-web-services/suggestions/358831-provide-data-back-in-xml-non-xhtml-format?ref=title">growing number of developers</a> have vocalized their desire for a more terse XML format that works with their libraries and tooling that read XML, but not XHTML.</p>
<p>In our recent discussion of this issue on the <a href="https://sig.washington.edu/itsigs/ROA_Technical_Team">ROA Technical team</a>, we considered several options for how to request content type:</p>
<ol>
<li>URI query string<br />
<code><br />
GET /books/12345?format=xhtml HTTP/1.1</p>
<p></code>
</li>
<li>URI file name extension<br />
<code><br />
GET /books/12345.xhtml HTTP/1.1</p>
<p></code>
</li>
<li>Content negotiation using the Accept header<br />
<code><br />
GET /books/12345 HTTP/1.1<br />
Accept: application/xhtml+xml</p>
<p></code>
</li>
</ol>
<p>There is <a href="http://stackoverflow.com/questions/381568/rest-content-type-should-it-be-based-on-extension-or-accept-header">plenty of debate</a> about which is the better approach. </p>
<p>In their <a href="http://www.amazon.com/RESTful-Web-Services-Leonard-Richardson/dp/0596529260">book</a>, Richardson and Ruby prefer the explicit URI specification over the content negotiation:</p>
<blockquote><p>Unlike humans, computer programs are very bad at dealing with representations they didn&#8217;t expect. I think an automated web client should be as explicit as possible about the representation it wants. This almost always means specifying a representation in the URL (RESTful Web Services, 94).</p></blockquote>
<p>We lean that way, too, and prefer the URI file name extension option. It&#8217;s intuitive from all of our Web browser years; it&#8217;s simple; and it&#8217;s easy to test in a browser (you don&#8217;t have to monkey with headers). </p>
<p>We also think services should expose a default extension-less URI that either redirects to the .xhtml/.xml resource or returns a <em>location </em> header to it.</p>
<p><code><br />
GET /books/12345 HTTP/1.1</p>
<p></code></p>
<p>Even though we think that the URI file name extension option is preferable, we&#8217;re not too religious about it. As long as the contract is made clear, any of these three methods are acceptable. </p>
<p>Let us know what you think.</p>
]]></content:encoded>
			<wfw:commentRss>http://depts.washington.edu/ontheroa/?feed=rss2&amp;p=270</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Repost: &#8220;An invitation to build with the UW&#8217;s Student Web Services&#8221;</title>
		<link>http://depts.washington.edu/ontheroa/?p=263</link>
		<comments>http://depts.washington.edu/ontheroa/?p=263#comments</comments>
		<pubDate>Fri, 13 Nov 2009 20:19:22 +0000</pubDate>
		<dc:creator>Scott Bush</dc:creator>
				<category><![CDATA[Web Services]]></category>

		<guid isPermaLink="false">http://depts.washington.edu/ontheroa/?p=263</guid>
		<description><![CDATA[*Repost from Office of the University Registrar's blog* The term "web services" has been used frequently on this blog when discussing new tools for the University community. With the fourth version of the Student Web Services available for use, it's time that the Office of the University Registrar officially invite interested developers (and their managers!) to dive and start creating new, useful tools for the campus.]]></description>
			<content:encoded><![CDATA[<blockquote><p>The following entry was published on the <a href="http://registrar.washington.edu/blog/">Office of the University Registrar&#8217;s blog</a> earlier this week. It&#8217;s relevant to <em>On the ROA</em> readers, so it&#8217;s reposted here for convenience.</p></blockquote>
<p>The term &#8220;web services&#8221; has been used frequently on this blog when discussing new tools for the University community. Some examples include <a title="Posts about m.UW" href="http://depts.washington.edu/registra/blog/category/web-services/iphone-app/">m.UW</a>, the UW&#8217;s iPhone app; an <a href="http://depts.washington.edu/registra/blog/2009/08/18/course-catalog-search-at-your-web-service/">improved course catalog search</a>; and <a title="Posts about Kuali" href="http://depts.washington.edu/registra/blog/category/web-services/kuali/">Kuali</a>, the next-generation student software initiative. With the fourth version of the Student Web Services (SWS) open and available for use, it&#8217;s time that the Office of the University Registrar officially invite interested developers (and their managers!) to dive and start creating new, useful tools.</p>
<h3>Okay, but how do I start?</h3>
<p>That&#8217;s a good question. Here are the ingredients necessary to get a SWS project off the ground:</p>
<ol>
<li><strong>Join the community</strong> &#8211; The UW&#8217;s web services community is strong, and if you&#8217;re going to develop something using SWS you should get to know it. Read <em><a title="Get it? It's a play on &quot;On the Road&quot; by Keruac." href="http://depts.washington.edu/ontheroa/">On the ROA</a></em>, the UW&#8217;s web services blog; review ideas from other developers at <a href="http://ontheroa.uservoice.com">UserVoice</a>; and stop by at a Web Services Discussion Group meeting. <a href="https://mailman2.u.washington.edu/mailman/listinfo/appdev">Sign up on the &#8220;appdev@u&#8221; mailing list</a> to be notified of meeting dates and locations.</li>
<li><strong>Identify a need</strong> &#8211; Have you wished there was a site that did <em>X</em>? Are your students asking for <em>Y</em>? Want to find a better way to display <em>Z</em>? Once you&#8217;ve identified something to build, fix, or improve upon, you can plan a web site, iPhone application—or something else—to accomplish it using the data available to you (see number 3).</li>
<li><strong>Research the services at your disposal</strong> &#8211; The <a href="http://webservices.washington.edu/">Web Services Registry</a> is a maintained list of UW web services, including a description and links to documentation and a contact person. You can also submit your own UW-centric web service to the registry. But don&#8217;t limit your idea to UW-specific data; maybe there&#8217;s another dataset that you could <a title="ProgrammableWeb.com - APIs, mashups and more" href="http://www.programmableweb.com/">mash up it up with</a>?</li>
<li><strong>Build it</strong> &#8211; Web services really shine when it comes to accessing data. If you&#8217;re using public information you can simply access the service you want and start using the data returned. And it&#8217;s easy to do so regardless of your preferred language: PHP, Python, .NET, Ruby on Rails, etc. There&#8217;s <a title="Learn more about Simple PHP Rest Client" href="http://depts.washington.edu/ontheroa/?p=234">a PHP class already available</a> to simplify things even further; a .NET version is in the works.</li>
</ol>
<h3>What about an example?</h3>
<p>Part of the reason for inviting the community to built tools with SWS is the &#8220;serendipity&#8221; factor. With pubicly-available data and a whole community of smart people, the sky&#8217;s the limit on what sort of useful tools might emerge.</p>
<p>An example is the recent improvements to the University&#8217;s course catalog search. A developer in the <a title="Learn more about Scott Bush" href="http://depts.washington.edu/registra/about/people/personDetail.php?id=2">Office of the University Registrar</a> saw the data available, knew of the issues with the current Google-based search, and built a prototype replacement in just a few days. A presentation of this tool&#8217;s development was recently given at the Office of Information Management&#8217;s Community Forum (the <a href="http://depts.washington.edu/registra/blog/wp-content/uploads/2009/11/Course-Catalog-Search-with-Web-Services.ppt">developer&#8217;s slides are available for download</a>).</p>
<p>So go ahead: wow your students and the University as a whole with your creation. Show us the tool we didn&#8217;t know we couldn&#8217;t live without.</p>
]]></content:encoded>
			<wfw:commentRss>http://depts.washington.edu/ontheroa/?feed=rss2&amp;p=263</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Catalyst GradeBook is now using the IdCard Photo Service</title>
		<link>http://depts.washington.edu/ontheroa/?p=230</link>
		<comments>http://depts.washington.edu/ontheroa/?p=230#comments</comments>
		<pubDate>Mon, 12 Oct 2009 23:55:00 +0000</pubDate>
		<dc:creator>jdr99</dc:creator>
				<category><![CDATA[Web Services]]></category>

		<guid isPermaLink="false">http://depts.washington.edu/ontheroa/?p=230</guid>
		<description><![CDATA[Instructors can now see their students as they assign grades, thanks to the IdCard Photo Service.  Now that Catalyst is consuming this service, we plan on taking advantage of it in many other Catalyst Tools in the near future.
]]></description>
			<content:encoded><![CDATA[<p>Instructors can now see their students as they assign grades, thanks to the IdCard Photo Service.  Now that Catalyst is consuming this service, we plan on taking advantage of it in many other Catalyst Tools in the near future.</p>
]]></content:encoded>
			<wfw:commentRss>http://depts.washington.edu/ontheroa/?feed=rss2&amp;p=230</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Use UserVoice to prioritize campus Web services</title>
		<link>http://depts.washington.edu/ontheroa/?p=97</link>
		<comments>http://depts.washington.edu/ontheroa/?p=97#comments</comments>
		<pubDate>Fri, 09 Oct 2009 18:22:28 +0000</pubDate>
		<dc:creator>ttchang</dc:creator>
				<category><![CDATA[Web Services]]></category>

		<guid isPermaLink="false">http://depts.washington.edu/ontheroa/?p=97</guid>
		<description><![CDATA[UserVoice is our catch basin for Web service ideas, and if it ain&#8217;t there it&#8217;s probably not going to happen. At UserVoice you can share your Web service ideas, vote for ideas submitted by your UW colleagues, and join the discussion.
These ideas submitted to UserVoice have become a reality or are underway:
* Course description available [...]]]></description>
			<content:encoded><![CDATA[<p>UserVoice is our catch basin for Web service ideas, and if it ain&#8217;t there it&#8217;s probably not going to happen. At UserVoice you can share your Web service ideas, vote for ideas submitted by your UW colleagues, and join the discussion.</p>
<p>These ideas submitted to UserVoice have become a reality or are underway:</p>
<p>* Course description available in SWS</p>
<p>* Course url available in SWS</p>
<p>* Publicly available student Web services</p>
<p>* Person Web service</p>
<p>* Publicly available IdCard Web service</p>
<p>* Student transcript data</p>
<p>* Classroom scheduling Web service using R25 data</p>
<p> <strong>Make your voice heard at: </strong><a href="http://ontheroa.uservoice.com/"><strong>http://ontheroa.uservoice.com/</strong></a></p>
]]></content:encoded>
			<wfw:commentRss>http://depts.washington.edu/ontheroa/?feed=rss2&amp;p=97</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web Services Registry now in the Cloud</title>
		<link>http://depts.washington.edu/ontheroa/?p=250</link>
		<comments>http://depts.washington.edu/ontheroa/?p=250#comments</comments>
		<pubDate>Fri, 09 Oct 2009 17:36:37 +0000</pubDate>
		<dc:creator>cheiland</dc:creator>
				<category><![CDATA[Web Services]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[registry]]></category>
		<category><![CDATA[update]]></category>

		<guid isPermaLink="false">http://depts.washington.edu/ontheroa/?p=250</guid>
		<description><![CDATA[Yes, it finally happened.  We moved the registry over to the mystical, magical cloud. There were a few bumps in the road but nothing so tragic or unique that it took much time to solve. Most of the issues were not specific to the cloud but more to the migration itself.
Amazon EC2 was chosen for [...]]]></description>
			<content:encoded><![CDATA[<p>Yes, it finally happened.  We moved the <a href="http://webservices.washington.edu">registry</a> over to the mystical, magical cloud. There were a few bumps in the road but nothing so tragic or unique that it took much time to solve. Most of the issues were not specific to the cloud but more to the migration itself.</p>
<p><a title="Amazon EC2" href="http://aws.amazon.com/ec2/">Amazon EC2</a> was chosen for hosting the project for its infinite scalability and general developer friendliness. Tony had some prior experience with the environment which certainly helped smooth many of the potential pitfalls. The control panel is really a breeze to use and the whole migration was really straightforward.</p>
<p>There certainly was a process as it was more involved than other hosting environments, but once done is really a set and forget operation. We mapped out the backup strategy to make sure we had a path forward just in case by using some of the built-in tools. We used a really basic Ubuntu image and then installed the environment for the application.</p>
<p>The application switch occurred several weeks ago and we&#8217;ve had no major problems. We look forward to continually improve the application and now we have a stable platform for some really great changes. Until then <a title="Submit a Web Service" href="http://webservices.washington.edu/service/add">please submit some services to the registry</a>, you&#8217;ll be glad you did.</p>
]]></content:encoded>
			<wfw:commentRss>http://depts.washington.edu/ontheroa/?feed=rss2&amp;p=250</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Financial Web Service (FWS)</title>
		<link>http://depts.washington.edu/ontheroa/?p=245</link>
		<comments>http://depts.washington.edu/ontheroa/?p=245#comments</comments>
		<pubDate>Tue, 06 Oct 2009 21:37:01 +0000</pubDate>
		<dc:creator>ssteph</dc:creator>
				<category><![CDATA[Web Services]]></category>

		<guid isPermaLink="false">http://depts.washington.edu/ontheroa/?p=245</guid>
		<description><![CDATA[Version 1 of the Financial Web Service (FWS) is now in production. It provides access to UW budgets, vendors and organizations, including search capabilities, from a near-real-time data source. Several developers are already developing or modifying existing applications to use it. More information can be found in the documentation.
]]></description>
			<content:encoded><![CDATA[<p>Version 1 of the Financial Web Service (FWS) is now in production. It provides access to UW budgets, vendors and organizations, including search capabilities, from a near-real-time data source. Several developers are already developing or modifying existing applications to use it. More information can be found in the <a href="https://wiki.cac.washington.edu/display/FWS/Financial+Web+Service+Client+Home+Page">documentation</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://depts.washington.edu/ontheroa/?feed=rss2&amp;p=245</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using the photo resource of the IdCard service</title>
		<link>http://depts.washington.edu/ontheroa/?p=241</link>
		<comments>http://depts.washington.edu/ontheroa/?p=241#comments</comments>
		<pubDate>Fri, 02 Oct 2009 23:52:15 +0000</pubDate>
		<dc:creator>boren</dc:creator>
				<category><![CDATA[Web Services]]></category>

		<guid isPermaLink="false">http://depts.washington.edu/ontheroa/?p=241</guid>
		<description><![CDATA[The IdCard webservice lets a developer retrieve student photos in a flexible way.  Computer Science is using this webservice to enhance an existing business process without breaking exisiting tools.]]></description>
			<content:encoded><![CDATA[<p>Since 2001, the Computer Science department has maintained its own collection of photos of CSE faculty, staff, and students.  We have a number of web apps such as photo directories or class lists that display these images.  We long ago settled on a standard size for the images and developed a procedure for adding a person&#8217;s name to the image.  But with Autumn quarter bringing in close to 200 new students, the process of capturing and processing these images is a lengthy one.</p>
<p>With the release of the IdCard web service this quarter, the work involved has dropped to near zero.  We can now automatically retrieve a student&#8217;s photo from the IdCard service rather than taking our own (note that by policy, we can only retrieve student photos, not those of staff or faculty).  Our undergrad program alone admitted 105 new students this quarter, and if we assume 10 minutes per photo, it would take over 17 staff-hours to collect all photos.  I was able to modify our existing infrastructure to take advantage of the IdCard service in one afternoon. This quarter alone, the time savings is huge.</p>
<p>The process was simplified because access to our local store of photos all went through a single PHP web app.  Students have the right to opt-out of having their photos displayed to the public or their peers, and one of the main jobs of this application was to control access to the photos depending on the person making the request.  My strategy is first to look in our local store of photos, and if one is not found then to try the IdCard service.  If found there, the photo is retrieved, normalized to our standards, and then stored locally.  The next time the photo is requested, it is found in local &#8220;cache&#8221; and no request to the web service is needed.</p>
<p>The design of the IdCard service makes this task quite easy.  The photo resource lets you retrieve the photo in the size that&#8217;s most convenient to you.  I request the photos in our standard dimensions and then use the PHP interface to the GD image processing functions to add a student&#8217;s name to the image.  That image is then stored locally along with all the others, and all of our existing infrastructure now takes full advantage of the IdCard&#8217;s photo resource.  If we wish to &#8220;override&#8221; one of the ID card photos, we simply take and upload a person&#8217;s photograph as before, and the new one is served preferentially.</p>
<p>One side-note is that, as with most web resources concerning students, the native identifier for a person is his regid.  We had never before used regids, keeping instead system_key and uwnetid for each user.  In order to collect regids, we use the person resource of the SWS to do a system_key to regid translation, and then save the regid locally so that this translation only happens once per person.</p>
<p>The listing of the IdCard service in the <a title="UW Web Services Registry" href="http://webservices.washington.edu/" target="_blank">registry</a> is awaiting some polishing of the <a title="photo resource documentation" href="https://wiki.cac.washington.edu/display/idcardws/Photo+Resource" target="_blank">documentation</a> (restricted) but expected soon.  For access, contact Tony Chang or Paul Schurr.  To use this service, you will need to obtain a test and a development client certificate for your application which you will use to authenticate to the IdCard service.   Permission to use the resource is granted by the registrar, and before getting the final OK, you and they will do a short security review of your application.  It&#8217;s all easier than it sounds, and if you get stuck you can contact roa-technical@u.washington.edu and they&#8217;ll hook you up with someone who can answer your questions.</p>
]]></content:encoded>
			<wfw:commentRss>http://depts.washington.edu/ontheroa/?feed=rss2&amp;p=241</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple PHP Rest Client</title>
		<link>http://depts.washington.edu/ontheroa/?p=234</link>
		<comments>http://depts.washington.edu/ontheroa/?p=234#comments</comments>
		<pubDate>Tue, 29 Sep 2009 17:59:27 +0000</pubDate>
		<dc:creator>ttchang</dc:creator>
				<category><![CDATA[Web Services]]></category>

		<guid isPermaLink="false">http://depts.washington.edu/ontheroa/?p=234</guid>
		<description><![CDATA[A couple folks here at the UW Seattle campus and I created a  SimpleRestClient class to help PHP devs programmatically consume RESTFul X.509 protected web services using PHP cURL. We feel that there is a small hurdle in developing against X.509 certificate protected web service resources so quickly created something to help PHP devs jump [...]]]></description>
			<content:encoded><![CDATA[<p>A couple folks here at the UW Seattle campus and I created a  SimpleRestClient class to help PHP devs programmatically consume RESTFul X.509 protected web services using PHP cURL. We feel that there is a small hurdle in developing against X.509 certificate protected web service resources so quickly created something to help PHP devs jump over that hurdle in addition to other challenges.</p>
<p>You can <a href="http://github.com/tonychang/PhpRestClient">download</a> the PhpRestClient and associated SampleApp from <a href="http://github.com">GitHub</a>. BTW Github is the source control repository that we are using to host our UW Web Services Registry code.</p>
<p>http://github.com/tonychang/PhpRestClient (click on the download button)</p>
<p>You can simply untar the files into the same directory and run the sample app from any webserver with a current version of PHP on it.</p>
<p>Since this code was contributed by developers at multiple UW departments we consider this an UW Community Source project. Yea I just made up the term right now but think it has a nice ring to it. If you want to help contribute to the project just let me know and I can get you added as a GIT contributor.</p>
<p>This is just a first iteration of it and its possible that someone will add additional features like supporting all the HTTP methods (vs just GET and POST) and allowing for Basic/Digest HTTP authentication.  Stay tuned for something similar to help .NET devs.</p>
<p>The code is not officially supported but we are happy to answer any questions you may have.</p>
<p><strong>Developers:</strong></p>
<p>Dan Boren &#8211; Computer Science and Engineering</p>
<p>Tony Chang &#8211; Office of Information Management</p>
<p>Paul Hanisko &#8211; College of Education</p>
]]></content:encoded>
			<wfw:commentRss>http://depts.washington.edu/ontheroa/?feed=rss2&amp;p=234</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>One developer&#8217;s perspective on the SWS&#8217;s course search resource</title>
		<link>http://depts.washington.edu/ontheroa/?p=225</link>
		<comments>http://depts.washington.edu/ontheroa/?p=225#comments</comments>
		<pubDate>Thu, 10 Sep 2009 20:28:09 +0000</pubDate>
		<dc:creator>Scott Bush</dc:creator>
				<category><![CDATA[Web Services]]></category>
		<category><![CDATA[Course Catalog search]]></category>
		<category><![CDATA[course search resource]]></category>

		<guid isPermaLink="false">http://depts.washington.edu/ontheroa/?p=225</guid>
		<description><![CDATA[The Office of the University Registrar recently posted on its blog about an improvement to the course catalog search, aptly titled "Course catalog search, at your (web) service." That entry discusses the improvements in the catalog search in terms of features and usefulness to students. It mentions the UW's Student Web Services, but doesn't go into detail, as that blog's audience likely isn't interested. You, dear On the ROA reader, are. Let's dive in.]]></description>
			<content:encoded><![CDATA[<p>The Office of the University Registrar (OUR) recently <a href="http://depts.washington.edu/registra/blog/2009/08/18/course-catalog-search-at-your-web-service/">posted an entry on its blog</a> about an improvement to the course catalog search, aptly titled &#8220;Course catalog search, at your (web) service.&#8221; That entry discusses the improvements in the catalog search in terms of features and usefulness to students. It mentions the UW&#8217;s Student Web Services (SWS), but doesn&#8217;t go into detail, as that blog&#8217;s audience likely isn&#8217;t interested.</p>
<p>You, dear <em>On the ROA</em> reader, are. Let&#8217;s dive in.</p>
<h3><span id="more-225"></span>Background</h3>
<p>First, a little background: The OUR has wanted a better, data-driven interface to the course catalog (CC) for years. Though the usefulness of moving away from dozens upon dozens of static HTML files was clear, the complexity of establishing such a system—not to mention the time and cost—stymied attempts to set something up. Enter the then-unnamed <a title="Visit the official UW website for mobile devices" href="http://www.washington.edu/mobile/">UW iPhone app</a>. Given that it needed to consume course data from somewhere and the app had support from the President, the <a title="Read the announcement on this very blog." href="http://depts.washington.edu/ontheroa/?p=217">&#8220;course search&#8221; resource was implemented in SWS v4</a>. That Herculean effort by the Office of Information Management (OIM), UW Tech, and the OUR cannot be understated. Thank you everyone!</p>
<h3>Getting data from the SWS</h3>
<p>The <a href="https://ws.admin.washington.edu/student/v4/public/course">course resource itself</a> presents a simple search form. Interacting with it as a human is a simple (albeit plain) task: enter a search term(s) and constraints, hit search, and revel in the resulting list of matching courses. Neat. But how can a <em>system</em> interact with it?</p>
<p>Answering that question fully is beyond the scope of this article (besides, there are already <a title="ProgrammableWeb.com - APIs, mashups and more" href="http://www.programmableweb.com/">good resources </a>available on <a title="Wikipedia" href="http://en.wikipedia.org/wiki/Web_service">that topic</a>). However, I can outline how the CC search works:</p>
<ul>
<li>I&#8217;m a PHP developer, so I chose PHP&#8217;s <a href="http://us.php.net/curl">cURL library</a> to consume data from the SWS. (Thanks to Paul Hanisko in the College of Education for sharing his web service code with me early on.)</li>
<li><a href="http://us2.php.net/manual/en/book.simplexml.php">SimpleXML</a> is an extension to PHP that allows for easy manipulation of XML data as a PHP object.</li>
<li>With these tools set up, I was able to write a PHP class, Http_SwsCourse, that extended cURL&#8217;s HTTP class. I fed the class the base URL for the public course resource and wrote some helper functions (such as getting the count of the returned results) and I was all set to build the interface.</li>
<li>The interface is explained in more detail below, but at its heart is just an HTML form. When submitted (via GET), the interface creates a new instance of the Http_SwsCourse class and sends the sanitized user input to the SWS. In essence, the class builds a query string just like the one visible in the browser&#8217;s address bar when using the course resource directly.</li>
<li>The resulting XML payload from the webservice is then manipulated—using SimpleXML functions—by the class&#8217;s functions. Really, only two are of consequence. One retrieves all matching courses, the other &#8220;dives deeper&#8221; and retrieves course details using the specific course syntax: /course/<em>year</em>,<em>qtr</em>,<em>curriculm</em>,<em>course-number</em></li>
</ul>
<h3>Building the search interface</h3>
<p>Though it&#8217;s not directly related to the course resource or the SWS itself, a brief discussion of the creation of the interface for the CC search is warranted. The overall goal for the improved search was simplicity.</p>
<ul>
<li><strong>Streamlined inputs</strong> &#8211; A single text-input box for the user&#8217;s query dominates the page; advanced options are hidden away. Even the advanced options are presented in a streamlined fashion. For example, I added a &#8220;search from start&#8221; checkbox rather than a second input field, and the year input is a drop-down menu listing only the current and upcoming years.</li>
<li><strong>Validation and sanitation</strong> &#8211; <a href="http://www.jquery.com">jQuery</a> enforces some sophisticated field validation to match the SWS&#8217;s needs. For instance, a search term is required unless a curriculum is entered; and a year is required if a quarter is selected (and vice-versa). All variables are &#8220;sanitized&#8221; (whitespace trimmed, slashes and other undesirable characters converted, etc.) before being submitted. This is already done by the SWS but it never hurts to ensure user input won&#8217;t do any harm!</li>
<li><strong>Ajax</strong> &#8211; Mirroring the course resource&#8217;s structure, the resulting list of matching courses offer links to a given course&#8217;s details.  Rather than send the user to another page to view those details, I implemented an <acronym title="Asynchronous Javascript">ajax</acronym> call (again using jQuery) to retrieve and display that information. After years of static HTML pages, I thought the UW&#8217;s students and faculty deserved a little eye-candy along with their information.</li>
<li><strong>Feedback</strong> &#8211; The free version of a user-feedback service, <a href="http://www.kampyle.com/">Kampyle</a>, provided an opportunity for users to point out any issues or offer suggestions. It&#8217;s a wise idea with any application or website, but especially so when it&#8217;s new and admittedly a beta.</li>
<li><strong>Accessibility</strong> &#8211; As noted in the beta disclaimer, the beta CC search is does not yet fully meet accessibility standards. It can—and will—when it is ready to replace the primary (Google-based) CC search. It should be relatively easy to do so, as the markup is clean and all ajax content is accessible with regular anchors and URLs.</li>
</ul>
<h3>Thoughts on the SWS course resource</h3>
<p>Given the time constraints the OIM was under it&#8217;s amazing there aren&#8217;t dozens of problems with the web service. In my experience with it, there are none. The minor discrepancies noted by users of the CC search were related to the data or the interface I created, not the webservice. I experienced no issues with the production version and found my first foray into programming that consumes from a webservice very smooth. Again, congratulations are due to those who made this possible.</p>
<p>That said, there are features that I—and many, many users—would like to see in the course resource:</p>
<ol>
<li><strong>Description search</strong> &#8211; The most requested feature. Currently it only searches long- and short titles.</li>
<li><strong>Attribute search</strong> &#8211; Searching by various course attributes was the runner-up in terms of volume of requests. For example, &#8220;show me courses that satisfy I&amp;S or NW&#8221; or &#8220;I only want to see 3-credit courses.&#8221;</li>
<li><strong>Sorting and paging</strong> &#8211; In building the search interface, I found that sorting options other than the default were not available. I was able to pseudo-sort results once they were in an array. This method, however, is dependent on the page-size variable in the SWS. I&#8217;d like to see more robust sort options: by number of credits; alphabetically by course or curriculum code; by course number; etc.<br />
As a workaround, the option to retrieve <em>all</em> results in one request would allow proper sorting and alternatives to paging (like an &#8220;<a title="Ajax-based &quot;scrolling&quot; that appends results as a user moves down the page." href="http://ajaxian.com/archives/endless-pageless-keep-scrolling-for-more-content">endless scroll</a>&#8220;). It might, however, be a heavy burden on the webservice, as <a title="A search for simply &quot;intro&quot; returns over 700 courses!" href="http://www.washington.edu/students/crscat/search/index.php?course_title_contains=intro&amp;quarter=&amp;year=&amp;curriculum_abbreviation=&amp;course_number=&amp;page_size=10&amp;search=Search+the+Course+Catalog">some searches</a> return many hundreds of results.</li>
<li><strong>Instructor Course Descriptions</strong> &#8211; If these could be linked to or otherwise added to the course resource, the webservice would be sufficient to replace the static HTML version of the course catalog.</li>
</ol>
<h3>Conclusion</h3>
<p>The beta CC search is really just the tip of the iceberg. Webservices are &#8220;game changers,&#8221; and I&#8217;m happy to have had the opportunity to build one of the early tools on campus that consumes them. The process was easy, flexible, and can only get better from here. Again, I&#8217;d like to thank the OIM, UW Tech, and the OUR for making the SWS a reality on this campus.</p>
<p>And I&#8217;d like to thank Tony Chang for inviting me to write a guest entry for the <em>On the ROA</em> blog. I enjoyed writing it; I hope you enjoyed reading it.</p>
<p>PS &#8211; If anyone would like to see the PHP code I wrote, let me know. I&#8217;m happy to share.</p>
]]></content:encoded>
			<wfw:commentRss>http://depts.washington.edu/ontheroa/?feed=rss2&amp;p=225</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
