<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Techniques :: OAT Developer Documentation</title>
    <link>https://cs.uwaterloo.ca/~cs-oat/devdoc/dev/techniques/index.html</link>
    <description>Techniques strongly tied to OAT.&#xA;Shorter stuff can go here. Longer or more important stuff may get their own page.&#xA;Delivering data to the browser When a web page has dynamic data to display, there are several general approaches:&#xA;Render it all on the server. Ask the server for an updated page when anything changes (Web1.0).&#xA;Deliver an HTML shell of the page and some ScalaJS. Fetch the data needed from a web service and render it on the browser.</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <atom:link href="https://cs.uwaterloo.ca/~cs-oat/devdoc/dev/techniques/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Adding a Web Service</title>
      <link>https://cs.uwaterloo.ca/~cs-oat/devdoc/dev/techniques/ws/index.html</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://cs.uwaterloo.ca/~cs-oat/devdoc/dev/techniques/ws/index.html</guid>
      <description>Steps to add a new web service. This is working through a specific example.&#xA;Add a new route to _wsvc/conf/wsvc.routes:&#xA;GET /api/v2/course/:termidFrom-:termidTo/:userid/offerings oat.wsvc.controllers.CourseCtrl.offeringsByInstructor(termidFrom:TermId, termidTo:TermId, userid:Userid) Add the corresponding function(offeringsByInstructor) to the relevant controller (CourseCtrl). Note that there may be identically named controller classes in both _wapp and _wsvc. Get the right one!&#xA;Register the call in the controller’s companion object. This is where required permissions are set and the source of brief documentation that appears at https://oat.uwaterloo.ca/api/v2/.</description>
    </item>
    <item>
      <title>Model-View-Controller</title>
      <link>https://cs.uwaterloo.ca/~cs-oat/devdoc/dev/techniques/mvc/index.html</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://cs.uwaterloo.ca/~cs-oat/devdoc/dev/techniques/mvc/index.html</guid>
      <description>The Model-View-Controller design pattern is incredibly helpful. There are many variations. It’s also true that I (Byron) thought coop students were implementing it but it turns out they almost always took shortcuts or didn’t use it at all – often resulting in code that’s hard to read, understand, and maintain. More than once I’ve started a debugging session by refactoring the code to have a proper MVC architecture.&#xA;New developers should read this chapter from a Java textbook I wrote a long time ago. It’s aimed at first year students but is really all we need from MVC. Skip the part on laying out the view; it’s different for the web.</description>
    </item>
  </channel>
</rss>