The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

EJB to display contents in a dropdown

We have an existing framework which uses EJBs for all data access.  We have a change for a relatively unused portion of an application that will require the dropdown content to be filtered. 

I would have wanted to avoid EJB.  I'm fine using hibernate DAOs directly.  I know it gets cached.  But for a dropdown to use an EJB?  I don't know if I am alone on this but WTF?

Oh and by the way our senior architect wants it to be this way.
amhed zando Send private email
Wednesday, February 20, 2008
Things like this are caused by reading too many books and becoming addicted to specific technology.

You see similar things in the hoopla over Rails, for example.

People become comfortable in their One True Way, even when a 50 line servlet with some inline data access would be faster, easier to understand, more testable and more reliable.

That being said, part of it also comes from "we have a problem, here's the skillset I have, I will apply it to solve the problem".  Sometimes this is valid.  Ask web developers what language to implement a dynamic site in. Most will tell you "use whatever language you currently know." -- don't bother learning PHP if you know JSPs, for example.

So you may be seeing EJBs applied where you don't expect them, because that's what the team thinks is fastest way to solve a problem -- if a team understands and uses them, has frameworks around them, etc.

Sometimes such decisions are correct, and sometimes they need to be shown the error of their ways, that there are indeed faster ways, at least for specific problems.
Dan Fleet Send private email
Thursday, February 21, 2008
Even Sun recommend against using EJBs in this situation. See the "fast lane reader" pattern.
dabbler Send private email
Friday, February 29, 2008
I could easily consider some scenarios where this would have been useful on some former projects, e.g. inter-dependent dropdown boxes that dynamically filter their values based on the other dropdowns in the same group. Putting the logic for this kind of thing in an EJB seems reasonable enough to me in that situation. We weren't using EJB though, so the logic ended up elsewhere.
Wednesday, March 12, 2008

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
Powered by FogBugz