Herding Code 115: RESTravaganza with Darrel Miller, Glenn Block, and John Sheehan

This episode of Herding Code the guys talk REST with Glenn Block (who’s driving the WCF Web APIs), Darrel Miller (a REST expert with a lot of real world production experience), and John Sheehan (author of RestSharp) about what REST really is and what practical value it really offers in real world, production applications.

  • Jon asks Glenn for a quick overview of how WCF Web API fits in with REST.
  • Darrel talks about how he got into REST in support of desktop systems.
  • John asks Darrel about how HttpListener is working for him.
  • K. Scott asks Darrel why he’s doing all the work to plumb RESTful services rather than just going with something like SOAP.
  • Glenn asks Darrel how his RESTful services are more "evolvable" than previous technologies he’s used.
  • Jon asks Darrel what REST means to him. Darrel says it means that there are just two things that the client and server couple on: media types and link relations.
  • John says that very few people he interviews describe REST as how Darrel just did. Glenn talks about how his understanding of REST evolved when he more closely studied Roy Fielding’s original dissertation.
  • Question from Twitter (@stevenproctor – Steven Proctor): "Do nice http paths really make an architecture RESTful? Wasn’t there something about next available commands too?" Glenn and Darrel talk about how this is the fundamental concept of hypermedia.
  • Jon ignites a firestorm by asking why people who care about REST dislike how OData is implemented. Chaos ensues.
  • Darrel explains how OData’s format doesn’t match with some important RESTful principles like link relations and metadata discoverability.
  • Glenn points out that OData is an API that takes a constrained view of of HTTP, which offers a tradeoff which many developers find beneficial.
  • Scott K asks the guests how many non-demo OData feeds are actually available.
  • Scott K asks why not just use JSON instead of OData, and Glenn explains how the important difference is around metadata – JSON is just untyped data.
  • Darrel talks about the concept of serendipitous reuse, and how common media types offer better reuse than untyped JSON data.
  • John asks if anyone is actually putting the client re-use case into practice in the real world, and Darrel plugs the REST Fest. Glenn points out that just having multiple versions of a client working against a spec is a significant advantage, talking about HTTP 1.0 and HTTP 1.1 as an example.
  • Jon asks  if a microformat approach could work, and eventually an RDF discussion breaks out.
  • Glenn talks about how many people view REST by mapping HTTP verbs to CRUD (create, read, update, delete) operations, and they’re missing the importance of linking and hypermedia.
  • Kevin asks where people "lose the path" with REST, and what are the most important concepts to stick with. Darrel comes back to the hypermedia constraint as the most important concept that’s commonly missed.
  • Glenn points out that your architecture is up to you, and you don’t have to follow RESTful principles, but there’s a problem if you don’t and claim your API is RESTful when it isn’t.
  • John points out that there are few examples of RESTful systems really paying off in practice. Glenn and Darrel point to Jon Moore’s Oredev talk about real business value to Comcast, and Jon mentions Glenn Block’s MIX presentation about device support based on content negotiation.
  • Glenn explains that opportunities are emerging as we’re moving beyond the browser, and he sees a lot of opportunity for WCF Web API’s to shine here.
  • Darrel describes another example of how a RESTful API could guide a common user experience across platforms, using Twitter as an example.
  • Kevin asks for public examples of good RESTful API’s. Darrel mentions Sun’s cloud API and SteamCannon; Glenn says that ATOM PUB is the best public example.
  • K. Scott asks about building RESTful clients.
  • Kevin asks about the practicalities of clients navigating hypermedia.
  • Question from Twitter (@kellabyte – Kelly Sommers): "I’m curious how REST might fit with an application that is wanting to store events and event sourcing. Is REST common for this?"
  • Question from Twitter (@gsogol – Jeff Sogolov): "How about Rest in the enterprise? Securing Rest services with Saml or oAuth? Also impersonation."
  • Jon mentions how WS-* defined methods for securing portions of message for different access and asks if REST handles that kind of scenario. Scott K, Glenn, and Darrel discuss.
  • The show wraps up with a discussion selecting architectural styles based on concrete benefits.
  • Darrel pimps REST Fest 2011, August 18 – 20.
  • John mentions his upcoming talk at DevLink on August 17, and Monospace July 23-25.
  • Glenn mentions the Portland Code Camp and //build/.

Show Links:

Download / Listen:

Herding Code 115: RESTravaganza with Darrel Miller, Glenn Block, and John Sheehan

[audio://herdingcode.com/wp-content/uploads/HerdingCode-0115-RESTravaganza-with-Darrel-Miller–Glenn-Block–John-Sheehan.mp3]

Herding Code 114: Trevor Burnham on CoffeeScript

This episode of Herding Code the guys talk to Trevor Burnham about Coffeescript, “a little language that compiles into JavaScript.”

  • Kevin asks Trevor to explain what CoffeeScript is. Trevor explains how CoffeeScript helps you to write the same code you would have in JavaScript, but more quickly and with less effort.
  • Kevin ask if people like CoffeeScript because they hate Javascript. Trevor talks about the strong reactions people had to the addition of CoffeeScript support for Rails, and how CoffeeScript is not a dumbed down Javascript, it’s really just a cleaner syntax for exposing the functional power in the that underlies Javascript.
  • Scott K talks about the time and political pressures that shaped Javascript, in some ways hiding a powerful language behind a mandated Java-like syntax.
  • Kevin asks about the language inspirations behind CoffeeScript. Trevor talks about how it’s drawn inspiration from Ruby, Python, Haskell, and Erlang.
  • Jon asks about how CoffeeScript support is technically added to Rails – where is the compilation happening? Trevor explains  how the coffee-script and execjs gems select the Javascript runtime.
  • Jon asks a question from Twitter by @darrencauthon about using CoffeeScript on Windows and .NET.
  • Scott K asks about other languages that compile down to Javascript, and what will happen when Javascript as a language. Trevor talks about Objective-J and Traceur.
  • Kevin asks about how you can debug CoffeeScript code.
  • Jon talks about the Try CoffeeScript interactive compiler on the CoffeeScript.org site and asks resources for learning more about CoffeeScript.
  • Scott K asks if CoffeeScript leverages more advanced Javascript features if they’re available, and if there are language facilities for extending the language. Trevor talks about how CoffeeScript is just Javascript, so you can leverage the extensibility features that are already available in Javascript.
  • Kevin drops back to asking some basics: why is CoffeeScript so special? What’s with the new function syntax?
  • Jon talks about how nice it is to just delete parentheses, braces, and semicolons. Trevor talks about how in general CoffeeScript code is 2/3 as verbose as the equivalent Javascript code.
  • K Scott asks about how CoffeeScript simplifies scope issues, and Trevor talks about how CoffeeScript is very opinionated about scoping.
  • Scott K asks about type coercion. Trevor mentions the wtfjs.com site, talking about how Javascript’s type coercion can be surprising at times.
  • Scott K asks about how DOM manipulation is handled. Trever explains that CoffeeScript works great with jQuery, and any other Javascript library available.
  • Jon asks if it’s possible to do CoffeeScript compilation in the browser, and asks if that’s possible / practical for standard applications.
  • Jon mentions the SassAndCoffee project for .NET.
  • Jon asks if there are any Javascript to CoffeeScript converters. Trevor says he doubts there will ever be a good one, but after the show sent Jon a link to js2coffee (link below).
  • Scott K asks about JSLint support. Trevor talks about how CoffeeScript works with JavaScript Lint.
  • Kevin asks if CoffeeScript has been used as a DSL, and Trevor mentions CoffeeKup.
  • Jon asks what happens if CoffeeScript hits a compiler error.
  • Kevin asks about split between front-end vs. back-end use for CoffeeScript.
  • Jon some a question from Christopher Deutsch (@cdeutsch) about how to sell CoffeeScript to a team – is this today’s flavor, tomorrow’s legacy headache?
  • Kevin talks about how he likes the => function, and Jon mentions how he likes the @ operator as well.
  • Kevin asks about the object orientation features in CoffeeScript, and Trevor mentions how the class keyword is used.
  • Jon says the he sees a lot of similarity between CoffeeScript and SASS. Trevor talks about how both reduce repetitions.
  • Jon asks if jQuery could take advantage of CoffeeScript.
  • Trevor mentions how you can buy his book and mentions a recent article he published in PragPub.
  • Trevor’s upcoming talks: O’Reilly Web 2.0 Expo in NYC in October and Oredev in Sweden in November.

Show Links:

Download / Listen:

Herding Code 114: Trevor Burnham on CoffeeScript

[audio://herdingcode.com/wp-content/uploads/HerdingCode-0114-Trevor-Burnham-on-CoffeeScript.mp3]