I pulled my head out of MLKSHK the last two months and had a bit of a revelation about the future of web apps—at least, any web app I work on in my future. I present to you my new starting markup:

<html> <body> </body> </html>

Well, throw a <head> tag in there pointing to some JavaScript (generated by CoffeeScript of course) and perhaps a DIV with an id of “app” and that’s about it. I just don‘t see a need to manage “page” markup when so much of my markup is now in jQuery templates/snippets I can swap out very easily.

I resisted hash-bang paths and client-side apps for so long until I started working on a project where it made perfect sense. Since then I’ve just gotten more comfortable with the idea because:

  1. It’s easier for me to think about the server-side app as an API with your browser-view one type of client. Side-effect: your mobile app just got easier to make.
  2. This divides testing into server side and client side. Working on the UI doesn’t mean you have to flip over to the server-side tests to ensure it’s working.
  3. I think I love CoffeeScript.
  4. Marshalling data for a specific view is tedious.

I feel like separating these clients from the back-end means less time tinkering with data as it moves from your db out to your views. There is so much traversing code when you build a site and I now think if you can cut your trips into smaller loops you‘ll spend less time wrestling with data, markup, and CSS (boring) and more time writing useful functionality (fun!).