Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tier question

 
Alexander Petrov
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hei If I have a setup with CDI beans and EJBs that are holding the business logic. And the CDI beans are more or less handling the presentation state and also serving the data model. Are the CDI beans part of the Presentation Tier , or are they part of the Business Tier.

According to oracle I am quoting:Managed components that may provide the business logic of an application, but do not require the transactional or security features of enterprise beans are part of the Business Tier.

But on the other hand I am planning that most of my logic will go to the EJBs, and the CDI beans will work only as thin wrappers between the JSF pages and the Business logic and of course provide some state management for the presentation layer.

Any hints on that? If I follow the Oracle statement I should place them in the Bussiness Tier, but on the other hand if they are handling mostly the presentation state isn't it logical for them to be part of the Presentation tier ?
 
K. Tsang
Bartender
Posts: 3585
16
Android Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since you are using JSF, do you also have the managed beans? Or the CDI beans are somewhat managed beans?

If the latter then I personally will put them in presentation tier. If you have both then the CDI beans in business tier.

That's how I see it
 
Alexander Petrov
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yep the CDI beans are lets say a little bit more flexible Managed beans and the CDI provides better dependency injection and the use of interceptors and named factories. If I remember correctly CDI a lot of the features that the SEAM framework presented http://www.andygibson.net/blog/article/comparing-jsf-beans-cdi-beans-and-ejbs/

Thanks I was thinking the same that it should go under the presentation tier, but a reality check is always a good thing.

Alexander
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic