This morning I decided to take one of my open-source projects to the next level. -By moving it to the 'web, not only would I add spell checking, but better cross-platform & mobilization options, as well.

The 1-Hour Tech Assessment

At the time of this writing I had been 'giging for a few years on a single set of technologies. Reviewing the web-side implementation options available for a new server-side plunge, as usual we had far too many choices: PHP CRUD, ASP.NET, GWT, Signed Java Applets, Java Server Pages (JSP), Java Server Faces (JSF), etc, etc...

--Such is the dilemma when you know & adore so many technologies!

Full-time Job

In the case of this particular project however, after considering the rate of disruption of everything I knew, I decided to simply use a Servlet.

Why did I select such a basic server-side technology set?

I chose Java because both PHP and .NET seem to ever threaten to leave our code legacies behind. We thereafter decided upon Servlets because - as the foundation of virtually everything on the Java-Web - I likewise tire of the sheer rate of disruption on just about everything built atop of Java Servlet Technology. --Unlike all-things served (Server-ed?) up as Servlet a-la-mode, those good 'ol HTTPRequest & HTTPResponse wrappers have not changed much since their ultimate incarnation.

Lamentations

There are also far too many closed, self-obsoleting standards out there today. -After a few years everyone gets tired of trudging along any cold, hard, forced-march: Those bleak book-biting ascensions along that "upgrade to the latest NOW - that last greatest thing we did was wrong" mountain pass.

Decades after their "me too" début, has anyone ever heard of SNOBOL or RATFOR?

Sabo

Now don't get me wrong: If you have a full-time IT staff, then ASP.NET, JSTL, JSF, (etc, etc) are great. -Yet for 90% of the planet however, our site traffic is well under ~250 visitors per second. In as much as that traffic stream is well within the capability of your typical rented-server, if you don't want to spend days catching up on the latest comparative innovations de-jur, then Servlets will do just fine. (Imagine a Qui-Gon Jinn attempt to use a mind trick on Watto...)

Yes.... Just fine.

Indeed, as an army of one, like most low-budget entrepreneurs I simply want to do things once - then get back to doing other things. We'll do it one better if folks like it?

Simple Templates

So the problem arises: Given that one may frequently want to change the style of any given web site, how to do so without tag libraries, code injectors, faces, adaptors, POJOs, entities, and an eager staff of software developers?

At the end of the day, what is the absolute easiest way to skin a site?

Rube

Inspired by PHP CRUD's "template21", the way that the above class works is easy to understand: By allowing us to specify the name of an external template file, we simply use the "top" and "bottom" of the file as a wrapper around our content. getHtml.

So deign a web page for your entire site, or a subsection thereof. Use graphics, google cookies, style sheets -just the way you want it!

Next, simply put a unique token where you want dynamic content to be inserted then vola! - you will have just what we need to create an "HTML Sandwich Web Site."

Of course, that swap-out could also be for more than a single unique token. -Perhaps a triple, or n-decker, sandwich? Different tokens for different types of content... a 'dagwood? (Yet clearly with a 'tad more bread-foundation, and a allot less baloney (pun intended.))

new BooksRequired == NULL: volatile ReLearningCurve = 0L;

Etc.

Over time, for internationalization, subscription, and / or other reasons our templates might even be generated dynamically, taken from an SQL CLOB, deducted from competitive web pages, (etc.)

Indeed, no matter if we are using Java, PHP, VB.NET, RUBY, C# or even CGI -w- C/C++ any language can take a byte of that same sandwich.