Tuesday, July 20, 2004

Abstracting Us Into an Early Grave

Whenever I read about a new application framework, the list of benefits always looks pretty much the same: separates one person's work from another's, provides the flexibility to swap out <fill in the blank> at will, reduces dependencies on <fill in the blank>, and above all makes developing <buzzword> applications as easy as pie! I know about the Design Patterns. I know loose coupling is a Good Thing. But the more layers you add to your architecture, the harder it is to do something simple. The layers are never truly independent anyway; They usually communicate through configuration files, still another level of indirection. If you coded up a PersonBean with a userName, you'd better not call it firstName in your template, or your blah.xml file, and so on. The independence of roles with these architectures is also a fantasy. You have to throw information back and forth over the wall constantly: "Hey, what did you call the invoice line items data structure? And is it an array or a list?" In short, the connection points between layers in the architecture are actually quite brittle, and the more of them you introduce, the easier it is to introduce an error that will render even a Hello World application useless. I'm noticing an upsurge in meta-languages that you actually embed in the code comments of your regular code. You've got to be kidding me! Javadoc is a marvelous invention, and I hear wonderful things about XDoclets, but it's gotta stop before we define a meta-meta language embedded in XDoclet code comments. The other problem with touting all this flexibility is that you hardly ever need it. How many times have you actually needed to seamlessly swap out a SQL database for a flat file, even though you could? There does seem to be a backlash against this trend of making easy things difficult. One of the mantras of agile software development is "You aren't gonna need it." I'm seeing a wave of books like O'Reilly's Better, Faster, Lighter Java and Wrox Press's Expert One-on-one J2EE Development Without EJB. These are sensible developments, and I hope they set a new trend.