Pretty framework, same old code

» Posted by on Aug 22, 2009 in Blog, Coding, Technology thoughts | 0 comments

Are you a fad-follower?  Do you always use the latest new development environment simply because it’s this year’s model?  Here’s my axiom:

Application architecture is less than optimum if it dogmatically conforms to a trendy framework at the cost of following good design/implementation practices.

For example, is it correct to be inflexible and use private fields and getters/setters for a simple data structure (e.g. a DTO)? If a field is transparently readable and writable why not simply make the field public? In most languages you can do that. Granted, in some you can’t. For example, traditionally in Smalltalk all fields are private and all methods are public.In general it’s a good thing whenever you can throw out, or avoid writing, some code. Using a heavy framework generally requires that you must write a significant amount of code that has no business value.

There are a variety of lightweight frameworks for Java that are a response to the heavyweight frameworks (e.g. EJB) that have become matters of dogma lately. O’Reilly has a new book out on this topic, coauthored by Bruce Tate.

When making framework decisions, consider if a lighter framework will do the required job. Using something like Hibernate, Prevayler, Spring, PicoContainer, NakedObjects, etc. can be a real win in many situations. Never blindly adopt a heavy framework just because it’s the current bandwagon. Likewise, don’t blindly adopt a lightweight framework in defiance. For that matter, don’t even use some pre-designed framework if the job doesn’t require such mechanisms.  Sometimes–many times–you can get the job done with PERL, awk, and sed.  If that’s the case, you don’t really need the Microsoft Developer’s Network license.

Always give due consideration to your choices.

Submit a Comment

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>