Is the whole thing really just the one file (110 lines)? <a href="http://github.com/alandipert/step/blob/42cee9ecd360205def359ce2719f34120edee499/src/main/scala/Step.scala" rel="nofollow">http://github.com/alandipert/step/blob/42cee9ecd360205def359...</a>
I know it describes itself as "tiny", and sinatra is also tiny, but that seems... small. (I don't know anything about Scala - is it especially concise?)<p>I like how the HTML seems to be a first-class datatype in the example (is that a Scala thing? I'd better do some research):<p><pre><code> get("/date/:year/:month/:day") {
<ul>
<li>Year: {params("year")}</li>
<li>Month: {params("month")}</li>
<li>Day: {params("day")}</li>
</ul>
}</code></pre>
Awesome. I actually fired up Sinatra on JRuby for a micro-app that needs to talk to some Java stuff last week. All of the existing stuff in Scala was way too heavy for the purpose. (Clojure/compojure has comparable overhead to Sinatra assuming you're familiar with Clojure, but it was untenable in this particular circumstance.)<p>At least half the magic of Sinatra is that you can write a single Ruby script, exec it and not have to fool around with build/generate/scaffold script or web server configuration to get something useful. It seems like you're pretty close, given that Java has no standard dependency retrieval system.
Amazing conciseness.
Don't forget to check out lift web framework <a href="http://liftweb.net/" rel="nofollow">http://liftweb.net/</a>. It's written in Scala too and uses similar techniques.
Very cool. I notice that you're using sbt to build. I'm using maven to build a scala project. I'd be very interested to know how sbt compares to maven if you have experience with both build systems.