(Untitled)

<bigwig> is a really interesting new design for web services. A month or 2 ago, I was thinking about web app languages, like perl/CGI, PHP, servlets, HTML::Mason, etc., and I realised that the big problem was the requirement imposed by the web environment itself; most “interesting” operations often have a UI that needs to take place over several pages, and each page has to

  • unmarshal the user’s CGI params, decode them, check them for insecurity, validity etc.;

  • open the database;

  • perform actions;

  • fill out the HTML template (I’m assuming nobody’s insane enough to still use embedded HTML-in-code!);

  • insert “next step” form data in that template;

  • send that back to the user;

  • save a little state to the database;

  • then exit, and forget all in-memory state.

When compared to most interactive programs now, it’s clear that this is a totally different, and much more laborious, way to write code. The nearest thing in trad apps is the “callback” way to deal with non-blocking I/O, ie. what we used before we could (a) use threads (b) use processes or (c) wrap it up in a more friendly library to do that. It just screams complexity.

<bigwig> fixes that:

Rather than producing a single HTML page and then terminating as CGI scripts or Servlets, each session thread may involve multiple client interactions while maintaining data that is local to that thread.

They call it The Session-Centered Approach.

It gets better. They also include built-in support for input validation, HTML output validation, compilation and compile-time code checking, and it’s GPLed free software. This is really good stuff. Next time I have to write a web app, I’ll be using this.

Found via sweetcode.

This entry was posted in Uncategorized. Bookmark the permalink. Both comments and trackbacks are currently closed.