Wednesday, January 19, 2011

Back to the Future

Come with me on a short trip through space and time, taking a look at the history of building (web sites).

The Stone Age, circa 1995

Although it involved a lot of manual labor, mighty Stonehenge and the pyramids were built with very simple tools (or by aliens, but let's deal with that topic another day).

Web development was pretty basic back then, but conceptually simple enough.

The Dark Ages, circa 1998

Some pretty amazing castles were built during this age, and they still stand today.

The basic tools had improved a lot, but they were still recognizable. Even an Neanderthal from the previous age could probably be effective with these tools.

The Age of Enlightenment, circa 2002

The gothic cathedrals from around this time look awesome, but were (and still are) inhabited by unpleasant religious fanatics.

At this point, great thinkers with lots of free time combined art and science to build magnificent works of beauty and elegance.

The Age of the Astronauts and the Race for Space (via the Clouds), circa 2008

A lot of very expensive spaceships were built during this age.

The great empires fought a cold, mostly ideological, war to see who could be the first to reach the moon.

Of course this all ended with a ka-boom and the eventual retirement of the space shuttle program.

A New Hope, 2011

Realizing that space tourism and new houses on Mars might be out of reach for most people in the foreseeable future, there is a renewed interest in more lightweight approaches to building and transportation. You might even call it eco-friendly.

Even the otherwise lethargic Microsoft jumps on the bandwagon, to the acclaim of professional developers.

"WebMatrix is full 180 from the highly abstracted cathedral that is ASP.NET. (...) WebMatrix is focused on simplicity and the "Get It Done" developer. Which, to me, is a massive undersell as we're all "Get it Done" developers."
"... you have to use raw SQL to query the database. This is going to turn off the Ivory Tower crowd who prefer to wade through XML Soup and tedious designers - but that's to their detriment. As I've always said - the best DSL I've ever seen for working with data is SQL."

That's cool. This is what web development looks like with WebMatrix:

Looks strangely familiar, doesn't it? A mix of HTML markup and code, and direct data access without any of that ORM stuff? Yes, that's right. For comparison, let's bring up that screenshot from the Dark Ages (1998) again:

Conclusions & Take-Aways

(Because there always needs to be a take-away.)

I am (definitely) not saying that "Frameworks are evil", or that "Progress is uncool". I'm just as lazy as any programmer, but I prefer the simplest thing that could possibly work.

I prefer frameworks that don't try to obscure that what we (most of us) are trying to do (most of the time) is to generate some HTML based on data from an SQL database.

Do we really need something like this

If something like this can do the job?

The golden path is probably somewhere in-between those two extremes. But keep in mind: Stonehenge has lasted for 5,000 years, while the space shuttle is being retired after less than 50 years.


Anonymous said...

Well yes, but nobody knows what stonehenge meant or contributed.

Gary Myers said...

I've worked with code where nobody knows what it means, who contributed it and why.

I like the KISS principle

Håvard Kristiansen said...

Very nice Morten!

dmcghan said...


Very nice indeed!


Greg said...

Great post. I worked with ASP and later ASP.NET and while there were some great parts to the framework, the event model for generating a page was total overkill. Sometimes it helps to remember that the end result of most code for the web is just some formatted text.

Artur Herczeg said...

It's a good overview, but the comparison of ASP and WebMatrix (Razor) is - I think - a bad idea. The Razor screenshot demonstrates data binding and a fully generated HTML list with bound data. The ASP screenshot just writes out some custom text. The Razor engine is much more powerful, just the rendering is similar.

Moreover the Razor engine and the whole ASP.NET MVC is built on top of the ASP.NET core, so they didn't throw out the framework, just changed the UI framework (layer). So the framework lives, just it's much more lightweight.