[jboss-user] [JBoss Seam] - Re: Component Architecture instead of traditional Layers

pete.muir@jboss.org do-not-reply at jboss.com
Sat Jan 19 17:06:09 EST 2008


"brachie" wrote : In my opinion injecting one SFSB into another should be avoided, but maybe I am wrong..

Why?


The following questions are in my mind:

anonymous wrote : Should there be one SFSB for every persistent class of your domain model which acts as a manager and manages the actions connected with the (injected) entity (e.g. SFSB PersonMgr for creating, deleting persons in DB etc)?

This seems reasonable, and is the approach we take with seam-gen (using EntityHome for scaffolding).

anonymous wrote : Or would it be better to have one SFSB component for each page you have in your application, which manages the actions connected to the specific page?

This strikes me as a bad idea and hangover from older design patterns.

anonymous wrote : Or would it be good to have one SFSB per use case of your application?

This is, IMO, another very valid approach. It could easily be combined with your first suggestion (an EntityHome for each entity, a component for a use case can call the EntityHome as necessary).

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4121544#4121544

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4121544



More information about the jboss-user mailing list