Simple is Hard

Three passes at building as simple of a system as we could to allow for a dynamic JSP based on a 2-dimensional menu matrix… Tabs across the top, selecting one and you get various left nav tabs. Select a left nav and you get a list of those objects and the data for the first one in the list. The idea was to maintain the menu system in a database table to allow ease of change. First implementation was very bulky and expensive — too many files!

Many late nights… 103 deg fever for Lee. After second failed attempt, Lee says “I’m out of ideas.”

That scared me… Lee out of ideas? He’s one of the best we have! He’s one of “our guys.” You know the kind. Ask him anything, and he can offer help or a solution or just get it done!

I kept trying to bring the solution back to simplesville. So the next morning I set out with pen and paper and went back to the drawing board. We have a two-pronged object model, with a 1..* between the two top core objects. Then simply other “stuff” hanging off of those root objects via associations. The menu system is merely a way to ease the navigation through the various parts of the system.

Turns out Lee was also mulling it over during the day. At about 4 o’clock, we chatted on the phone. “You go first,” he said. So I explained my approach. We were on the same wavelength. At about 8 o’clock, we meet in IRC chat a bit. I go off to do some other parts of the app, Lee starts in on the ideas we had discussed.

A few hours later, he’s got it working! One small slice, mind you… But Lee cracked the puzzle! We’re using older EJB and struts 1.0, so we were not able to iterate over the bean to automate the JSPs.

Got it down to a pattern for {1 EJB, 1 form bean, one JSP, and one action} per class. And all CRUD functionality is possible.

Third time’s a charm, as they say (whoever they are — let me know if you know).