DAOs Considered a PITA

Okay, last post for the evening since it's like 3:00 a.m.

Dave and Jason are both blogging about DAOs. I won't analyze this too much, all I will say is that I spent all day today creating a pair of DAOs with probably eight or so methods in them apiece. These were all called from Session beans from the controller to populate pull downs in JSP using Struts. This is the first time I've actually gone and implemented all this myself from scratch as opposed to just adding a bit here and there of someone else's code. My GOD what a PITA. SOOO much duplicate coding.

There's got to be a better way. I've bitched about this before, and even though I understand quite well that this structure can scale and accomodate different servers for just about every step in the process, in practice it's just a bunch of duplicate code sitting on the same machine. Tools and automation are NOT the answer - they never are. We need a better pattern or something to speed up this type of development because this level of effort for something so common is ridiculous.


P.S. Something David said in his comments confused me. Why use a POJO instead of a Bean (i.e. a class without get/sets as opposed to one with). And is there a difference between a Bean and a ValueObject? I'm getting my terms messed up...

< Previous         Next >