0

I am starting with a project where i need to replace a legacy system written in c with a new one.It will be a simple read/update app, no processing for now. Technology requirements are to use JSF and oracle's WebLogic server. So the only thing i am keeping is the existing relational database (oracle). My goal is to create an OO design and implement it. I am a junior programmer. After some research i decided to carry on with the following design:

Browser <-------> JSF pages<--->JSF beans<--> EJBs <--> JPA <--->DB

the idea is to implement the GUI using JSF (PrimeFaces) pages and beans, and the back end using EJBs. I will use JPA (EclipseLink) as my Database Util. The OO approach will be based on the JPA entities design. It will use Weblogic's JTA to handle the DB interaction.

Due to my limited experience i have the following questions:

1) Is my design a good idea? Is there a simpler and more efficient way to do this?

2) As far as i know JPA entities are mapped to DB tables. This could ruin the OO approach because i have to create entities that include columns from multiple tables. My thought is to create parent entities using @MappedSuperclass annotation. Unfortunately i cannot change the DB design, it must be kept as it is.

I would appreciate some experienced opinions,

Thank you

Bonzay
  • 740
  • 2
  • 10
  • 29
  • We are working exactly the same way right now. But your question is opinion based... – Milkmaid Aug 23 '17 at 08:54
  • Seems like a proper design. Nowadays I'd rather go with a request based framework like Spring MVC and a client-side powered framework like AngularJS or similar, but JSF still plays well. I'm using the `@MappedSuperclass` approach in all my Hibernate-JPA powered applications and have no problem. – Aritz Aug 23 '17 at 09:03
  • With a request based framework, I find myself still writing more boilerplate code than needed or needing more frameworks. Especially considering client-side vs serverside validation, csrf and more... – Kukeltje Aug 23 '17 at 11:30
  • Say EJB has very wide meaning, to be true has no meaning, like marketing words. Modern Java / JEE is going far beyond "old EJB" – Jacek Cz Aug 24 '17 at 19:47

0 Answers0