• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Part II - Entity Bean or DAO?

 
Luciano Queiroz
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi folks!

I would like to know your opinion about using entity beans or DAO in part II.
Do you think it's acceptable to use only DAO in part II?
So far I realized the relationships between the model objects are complex. And I'm not sure whether CMP will supply all performance requirements.
SCEA exam encourages people to use J2EE features, but I'm afraid to use only entity beans. In real life projects, entity beans has shwon itself very problematic regarding performance issues.
 
Ajith Kallambella
Sheriff
Posts: 5782
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Clearly, you are thinking in the right direction

Although most people apply stereotypical J2EE solutions( session bean, entity bean, MVC yada-yada-yada) while solving the SCEA assignment, in real life hadly one can pick an off-the-shelf J2EE architecture and use it as is. This is your chance to view the J2EE tool with a critical perspective and draw your architecture to support the requirements. Although Sun would gladly accept a conventional J2EE design as your solution, you should be in a position to justify the choices you made for every single technology/approach that you selected and ones you did not. When you are an architect in real life, this is what you do most of the times, so think beyond the certification!

Having said this, I must point out that you should try to stay away from non-J2EE solutions( such as Hibernate, JDO etc.). Although some of these evolving technologies are certainly superior( and more popular) than pure J2EE solutions, this exam is all about standard J2EE technologies. Sun may not like it very much if you threw away entity beans and used JDOs instead .... at least in your paper-based solution!

Cheers,
 
Luciano Queiroz
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, I decided to adopt BMP + DAO.
CMP is not a good choice. The query code generated by containers may not be the best regarding performance.
Using BMP I have the option to write the query code by myself.
And DAO will abstract and isolate query code from BMP. If someday FBN decides to change the database, all I'll have to do is rewrite the DAO. Using DAO lets your BMPs untouchable.
Finishing, writing the query code by myself I'll have the opportunity to take advantage of some kind of funcionality specific of Oracle that may improve performance, for inatance: stored procedures.
I worry so much about the response time required by FBN, so my architectural decision must reflect this concern too.
 
Gerald Davis
Ranch Hand
Posts: 872
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have been away for a while , so I have forgotten much about EJB but I believe the best solution is the quickest and the most high-level. EJB technology is constantly improving so any performance issues are likely to be fixed in the future. To my knowledge Entity Beans are DAO with services and stuff added. In future EJB could give you the option of a lighter weight version of Entity Beans, if it has not already been implemented already.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic