Garbage Burrito

A Case for Architectural Simplicity

A Case for Architectural Simplicity
Ben Kittrell - 04 17, 2007 @ 03:24PM
Comments: 1

I would like to share an experience that is all too typical at my day job, in hopes that it may stop someone from saying, "Just one more framework isn't gonna hurt".

I'm working on a sales leading tracking system which has been handed down to unsuspecting developers for around 3 years.  The architecture consists of Java, Portal, Struts, Tiles, Spring, Hibernate, EJB's, and probably some other stuff I'm forgetting.  I mainly work on the front end Portal/Struts stuff.

Today I was working on the new phase, and I needed to find a JSP to make some simple formatting changes.  I could navigate to the page through Portal, but actually finding the JSP wasn't so easy.  I thought I knew what file it was, because a portion of the html matched, but there was a large piece missing.  So I started digging.

The first problem is that Portal has it's own completely unreadable URL mumbo jumbo.  So there's know easy way to say, "this page, is using this action/JSP/whatever".  So I had to look at the form from whence it came.  The form pointed to a struts action, which I proceeded to look for in the eleven struts configuration files contained in this project.  It wasn't in the first two files that actually made since, so I had to do a file search for it.  I found the configuration, however it just pointed to another struts action, which luckily was in the same file.

That Struts action pointed to a Tiles (Templating Framework) configuration, which I had to find amongst thirteen config files.  Of course one configuration points to another, which finally points to a JSP! However, it's totally not what I was looking for.  Frustration!  I have no idea how this happened, but I needed a new tactic.

I took a blurb of copy from the rendered HTML and searched for that.  I figured it would be in the ApplicationResources.properties file, which for those unfamiliar is a place where you store text labels with unique identifiers, used for i18n.  I got the key for this text and searched for that in JSP's.  The JSP I find is the one I thought it might be in the first place.  I double check, and this is definitely not it. Anger!

At this point feel like I'm getting very lost, and I'm struggling to remember what I was looking for in the first place.  This time I take the name of a text field from the rendered HTML and search for it.  I find a JSP, and it actually looks like the right one this time.  However there's another problem, there are two jsp files, batch_categorize.jsp and batchCategorize.jsp.  %$%#^&@*!  MADNESS!  What the crap, man?!  To make a long story longer, I traced the file back through two tiles configs, and a struts action, and confirm that it's the underscored version I'm looking for, even though every other JSP in the project is camel cased.

Of course by this time I've totally forgotten what the heck I was trying to do in the first place.

Don't let this happen to you.

Comments: 1

Comments

1. Heath Huffman - 04 19, 2007 @ 09:37PM

This is why I quit the Java Development world. Great example Ben! Such convoluted-ness! I could talk all day about this subject… I know it makes you miss coding in RoR, eh?

I used to love coding until the open source community decided that every aspect of development had to be object oriented, decoupled, highly adaptable, and XML file configurable. Somewhere along the line, developers started thinking that writing thousands of classes and interfaces, implementing as many layers of separation as possible, and updating hundreds of XML configuration files made more sense than just getting a simple project done.

Most of this is in vain anyway. After a developer codes all of this to make it as divers and as adaptable as possible, they bring in a consultant a year later (after the original developer moves on to a better job) to make some changes and they never use or hook into any of these ‘Highly Adaptable” framework or code. They just completely redo it from scratch, their way. I know, because this is what I did! Nobody has the time to dissect your libraries and frameworks when they need to make a quick change… they just do it the fastest way they know how!

Nope… can’t say I miss Java at all! Long live RoR!

Post a Comment




powered by : Doodlekit Online Free Website Builder : developed by : Doodlebit™ Website Company