Back in October last year (2010) a bunch of us fled Berlin and made for Warsaw. Not just for the Vodka you understand, but more specifically for the Front-Trends conference.
One of the talks was discussing the concept of the Middle End, by Kyle Simpson. This really made an impression on me, and I think I probably bored Kyle in the bar afterwards with my drunken enthusing. When we arrived back home, my aim was to start playing around with the idea of a Middle End as soon as possible. Unfortunately, as is life, events took over (such as discovering one is going to become a dad!) and these thoughts were consigned to the back of my mind.
The more I hack around with NodeJS the more I’ve been able to experiment with different aspects of it. Well, today I began hacking around with some Middle End concepts.
The idea of the Middle End is quite simple.
In a web application there is traditionally the Front End and the Back End. The front end handles all of the client side processing (such as rendering some whizzy JQuery plugins or whatever). The back end handles the actual hard crunching, such as retrieving and adding data from the storage engine.
However, there are certain aspects that both the front end and the back end need to handle. Some things that spring to mind are: session managment, input validation and possibly some display logic (Kyle’s post goes into some more depth here).
This is in direct violation of the DRY principal. Quite simply, this is a waste.