I have this arquitecture
View: JSPs, JavaScripts
Controller: Struts (Actions, ActionsForms)
Model: I read in many places that is not good use Entity Beans, so I use the pattern DAO (DAO Factory y DAOs), that is on the java page (java.sun.com). What I need to know is an example code of how implement the Session Facade pattern for this DAOs, I need to implement the Data Access Object Strategy:
"Data Access Object Strategy
The Session Facade can directly use one or more DAOs to represent the business data. This is done when the application is so simple that it requires no entity beans, or when the application's architecture is based only on session beans and does not use entity beans. Using DAOs inside session beans partially simulates the persistent nature of entity beans."
Some can give a simple sample code of this, I not use session Bean but I can do it, what I don´t want to use is entity beans.
Regards Daniel
-
Data Access Object Strategy (3 messages)
- Posted by: Daniel c
- Posted on: June 07 2004 15:49 EDT
Threaded Messages (3)
- Data Access Object Strategy by Sean Sullivan on June 07 2004 17:31 EDT
- Data Access Object Strategy by Daniel c on June 07 2004 18:27 EDT
- Data Access Object Strategy by Andy Grove on July 05 2004 03:53 EDT
- Data Access Object Strategy by Daniel c on June 07 2004 18:27 EDT
-
Data Access Object Strategy[ Go to top ]
- Posted by: Sean Sullivan
- Posted on: June 07 2004 17:31 EDT
- in response to Daniel c
This is done when the application is so simple that it requires no entity beans, or when the application's architecture is based only on session beans and does not use entity beans. Using DAOs inside session beans partially simulates the persistent nature of entity beans."Some can give a simple sample code of this, I not use session Bean but I can do it, what I don´t want to use is entity beans.Regards Daniel
Hee is some example code:
http://daoexamples.sourceforge.net/ -
Data Access Object Strategy[ Go to top ]
- Posted by: Daniel c
- Posted on: June 07 2004 18:27 EDT
- in response to Sean Sullivan
Ok thanks for your answer I saw the code but it only implements a DAO, I alredy do that, what I want is to create a Seccion Facade for that DAOs without use a Entity bean, could be a Session Bean, thanks -
Data Access Object Strategy[ Go to top ]
- Posted by: Andy Grove
- Posted on: July 05 2004 15:53 EDT
- in response to Daniel c
Ok thanks for your answer I saw the code but it only implements a DAO, I alredy do that, what I want is to create a Seccion Facade for that DAOs without use a Entity bean, could be a Session Bean, thanks
Hi Duncan,
If you download FireStorm/DAO you can use it to generate complete DAO source code based on JDBC (or Entity Beans if you so wish) and it also generates a complete Session Facade along with Business Delegates for each of your DAOs.
I believe this will give you exactly what you are looking for. It ships with a sample project that you can generate DAO code for.
You can download a 30 day eval from:
http://www.codefutures.com/products/firestorm/dao/
Cheers,
Andy.