My very best advice is to have a look at the iBATIS DAO framework <http://ibatis.com>. For the time being, it's bundled with the iBATIS SqlMap package, but you don't need to use them together. It uses the same general pattern you see in the current Struts MailReader example, but raises the DAO pattern to a reusable framework.

While DAO is an acromym for Data Access Object, the current trend is toward a data access API (all action no data) coupled with a data transfer object (all properties, no actions). This is the strategy that the Struts Mailreader uses, to good effect.

HTH, Ted.

Rajat Pandit wrote:
Hello all,
I am new to servlets development as such. And have this design issue. I
want to ensure that the applications that I build can be used with other
databases, which might have different tables or column names or
different structures on the whole.

I mean the basic buisness logic remains the same and other things around
it might change. This is what I am doing right now.

My Action - extended - Struts Action  -> the execute / perform method
calls the buisness logic bean.

The buisness logic bean is passed the connection resource (orginally
created in the action bean itself).


This connection resource is used by the methods inside the bean for
getting their data.

I am not sure, but is there a possibility that I have buisness beans in
such a way that they don't have anytihng to do with the database
connection and all they need is data as arguments and return data back
_AND_ I am also don't need to clutter up my (extended) action class with
SQL fetches!.

This essentially means that there will be A. a buisness logic bean. Which contains the buisness logic to do
datamanipulation.
B. a database <put ur technical name here> bean which does the work of
fetching and returning back data to the db.
C. an extended action class which manages both of these.



All this might sound rather silly, but there are times when I really drive my self nuts about keeping all the tiers clean and independent of each other.

Can someone shed some light on this. (other alternatives being, turn on
the floodlights ;) )

Also any pointers on design patterns...

Rajat Pandit | [EMAIL PROTECTED]
+91 612 3117606
[ Developer and Part Time Human Being]


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



-- Ted Husted, Junit in Action - <http://www.manning.com/massol/>, Struts in Action - <http://husted.com/struts/book.html>, JSP Site Design - <http://www.amazon.com/exec/obidos/ISBN=1861005512>.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to