My friend Louis Dargin made some suggestions about technologies that might prove more useful than Java Servlets. His suggestions led me to some web pages that make my head spin. Consider, for example, web application frameworks – programming systems that permit you to write software that runs over the web. There are maybe a hundred different technologies! For a guy who was brought up in a world where you had one or two choices for developing software, this is dizzying. How am I supposed to be able to figure out which way to go?
I also have to ask why there are so many different technologies. I can understand having some differences. Back in the old microcomputer days, there was BASIC for the amateurs and assembler for the pros. It didn’t take long before we had professional high-level languages like C++. But why do we need a hundred different language systems for web development?
Some of this is just the standard truism that every programmer thinks that he can design a better language. I can also appreciate the need to have special languages for special problems. I’ve written some micro-languages to meet special-purpose problems in my game designs. But I knew that my own little creations were not suitable for anybody else.
The situation is exemplified by the six operational frameworks issuing from a single source: the Apache Foundation. Why would one organization support six different solutions? Each one is specialized to a particular task:
Click is designed for “simplicity, ease of use, performance and scalability”.
OFBiz is optimized for business websites
Sling is, well, I don’t know. It seems to be designed for hardcore programmers.
Struts appears to be an extension of Servlets to implement something called the “Model-View-Controller” design strategy
Tapestry is claimed to emphasize simplicity and ease of use.
Wicket is a simplified version of Tapestry. So much for simplicity in Tapestry.
In studying these and many other web application frameworks, I have come across a number of standard terms, which I shall attempt to describe here, as an exercise in my own attempt to understand them.
Model-View-Controller Application Model
This seems to me to be a high-tech term meaning Input-Processing-Output. Controller is the hip new word for ‘input’, model means ‘processing’, and view means ‘output’. The big idea here is that good design doesn’t mix these three things together. Whoop-de-doo.
Convention over Configuration
This appears to me to be a backlash against something called binding. Here you have a great big program with all sorts of elements, some of which are closely associated. For example, suppose that your program has the ability to do various monsters. You’ve got all sorts of different monsters in your program, and you have different algorithms for doing different things to those monsters. You can make them explode, freeze them, burn them, vaporize them, etc. Each monster will have his own image, various animations for him roaring, frothing at the mouth, screaming in pain. It will have various sounds he makes, and it will have separate algorithms detailing the effects of various ploys against him. In high-powered, cutting-edge programming, you build a configuration file (usually in XML) that specifies the connections between all the components. That file establishes the bindings between all those components. This can get really confusing, and easy to mess up. The big idea of this process is that everything is automatically bound. All the monster animations, sounds, images, etc are automatically linked together.
In the good old days, we did this with a two-part file naming convention. So we’d have files like orc_image1.jpg, dragon_roar3.wave, or accountant_kill.vid. But then along came this neat idea called object-oriented programming, which provides a nicely organized way of binding things together. But that’s passé now, and instead we have hot new ways of saying the same thing.
Hot Code Reloading
I think this is the ability to edit the code while it’s in use on a browser, and have the new code replace the old code while everything’s running.
REST (Representational State Transfer)
This appears to be an architecture that is now intrinsic to the web. It specifies some basic rules about how you’re supposed to deal with web pages. For example, no twiddling around with one while the user is actually using it.
There are lots more variations, but I think I’ve got an outline of some of the important factors to consider. But now I’m going to approach the issue from the other end: what do I need? What specifications best describe the kind of system I want to use?
I really don’t want to have to spend months learning how to use new technologies. I want to produce things, not screw around with sexy technology! This applies to the entire technology system that I currently use: Java, Swing, HTML, XML, and Eclipse. I could go back to C++ if I really needed to, but I’ve learned a lot of Java libraries and I really don’t want to have to figure out the C++ libraries. I absolutely refuse to start all over with something completely new. This is especially important with graphics modeling. In the good old days, I drew individual pixels on the screen. Nowadays the world is full of high-level graphics abstractions. I went nuts trying to figure out Java’s Swing model (and I still don’t really get Layouts), so I’m not eager to abandon that knowledge base.
Let’s face it, downloading and running apps is, like, so early 21st century. I don’t want to have to go through the somersaults necessary to make things run on different platforms. The closest thing we have to a universal standard is the Web. Yes, I know, there are still a zillion variations, but there’s a solid core that’s good enough for me to work with.
I have no need for high-speed 3D animation. Basic 2D graphics meets most of my needs. However, there are two exceptions I can think of that will require some low-performance 3D tricks. I doubt that I’ll write this code myself, but I’ll need to be able to bolt it onto my code.
I’ve been using Macs since 1984. I’ve messed with Windows machines on a number of occasions, and I find them distasteful. Whatever development environment I use has to work on the Mac.
In my efforts to learn Servlets, I keep encountering the error message “A required resource could not be accessed”. That’s got to be one of the dumbest error messages I’ve ever seen. They might as well have said “Something went wrong”. Why in the world can’t they say what the resource is?