• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Design question

 
Ranch Hand
Posts: 285
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 1934
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Shreya Menon
Ranch Hand
Posts: 285
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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..
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Please do not shoot the fish in this barrel. But you can shoot at this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic