aspose file tools*
The moose likes OO, Patterns, UML and Refactoring and the fly likes Design question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "Design question" Watch "Design question" New topic
Author

Design question

Shreya Menon
Ranch Hand

Joined: Jul 31, 2001
Posts: 285
All,
We have to develop a J2EE based web site. I was planning to use Struts and J2EE core patterns and entity and facade ejbs in the backend.
But, today I heard about our database. Looks like the database will be drastically changing, like they can add a new table, change a field in an existing table, drop a table/field...
In this case, will using ejbs be a good option ?
All sugegstions welcome!!
Thanks
Kishore Dandu
Ranch Hand

Joined: Jul 10, 2001
Posts: 1934
A combination of EJB and DAO patterns will help in case of a change in database schema.
But, if the changes are drastic(like change in name of tables and some tables completely gone) it may involve some code changes to update/delete/create transactions and queries in the DAO related files.
Take a look at DAO pattern, it will most likely help your approach.
By the way, there is no facade bean, but sure there is a session bean. Just a observation.
Kishore.


Kishore
SCJP, blog
Shreya Menon
Ranch Hand

Joined: Jul 31, 2001
Posts: 285
oh, yeah I mean facade pattern[but a session bean].
THanks for ur suggestion.
In our case there can be some cases where tables can be gone..
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Why do you want to use EJBs at all? In my humble opinion, the complexity of EJBs only pays back if you make use of quite a huge amount of its features...
BTW, you might want to take a look at http://www.agiledata.org/ - especially http://www.agiledata.org/essays/implementationStrategies.html


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Design question
 
Similar Threads
Database design question
Monitoring database table for changes
Can i use value of input hidden field as table
won't create tables with jaws.xml
Bulk updates