It's been a while since I've talked about technical stuff and I need to rant, so
here goes:
I got started in web development sometime around the middle of 2001... I
think... Anyhow, it was a pretty garbled mess for me, as I picked up a couple of
existing products and tried to make modifications to them to suit my needs.
Frustrated, I ended up starting my own projects, and I have learned a lot even
though not a single one is fully complete.
Along the way, I've played with all different technologies. I've used template
engines, I've used frameworks, and I've even gotten my feet wet with some Ajax
(without bleach :P). I've learned a lot from these, but there's one thing that
holds true in all cases: Keep it simple, stupid.
Let's start from the top with template engines. It's kind of a good idea at
first, because you may have your project broken out into groups of designers,
developers, and managers. The designers may not know much about the core of your
application -- the PHP that does all the heavy lifting -- but they may be quite
skilled with XHTML and know how to do the needful. The problem with most
template engines, though, is they introduce either a new markup language
specific to the template system, or they use rather awkward methods using some
sort of implementation of PHP.
For a long while I was a fan of
Smarty. In fact, several of my sites still use Smarty. I
thought it was a good idea because it helped me keep my presentation layer
separate from my processing layer, and it allowed for me to make different
themes for my sites. The downfall though was that I had to learn a new language
that didn't really afford me the flexibility I needed, manipulating the data to
suit the needs of the layout. Other developers pushed that I needed to not use a
template engine and use straight PHP to build my layout. I didn't believe them,
and when I first tried it after using Smarty, it was painful. But now that I've
been working without any template engine for over a year, I can honestly say
that PHP is beneficial from not only that standpoint, but also from a resource
usage standpoint. No longer am I passing around arrays and classes up to 1MB in
size. No, I'm now passing just the data I need, and using includes to load the
different sections of my layout while maintaining my presentation layer
separation.
The next problem is down to frameworks. Who in their right mind would consider
building a simple list management system from a framework like
symfony or
Code Igniter? These
frameworks are big, bulky, and are much too restrictive (unless you're new to
the concept of project development entirely). It's possible to build a project
from a very simplistic framework (which I'll be sharing my version of sometime
in the next few months), and if you're diligent enough you can maintain a clean
and organized project without sacrificing your power and ability as a developer.
In short, frameworks like those mentioned are a horrible idea.
Ajax. Not the stuff I (don't) clean my kitchen sink with. No, the
implementation of asynchronous JavaScript and XML. What's the problem with it?
It's generally overdone (see
Dojo
Toolkit Demo: Contributor Listing), and pointless. Probably the only
reasonable implementations I've seen so far are applications like
Meebo and
GMail. Generally speaking
though, there's no point in using Ajax. It just over-complicates things and
leaves you curled up in the corner of your office, sucking your thumb, and
chanting obscenities against the technology of Ajax.
I guess in summary, I just want to say that I'm old-fashioned and I despise
anyone who tries to get all fancy-schmancy with their code. You have a links
database; you don't need a full MVC framework with an Ajax fisheye-flipper!