[JBoss Seam] - Re: Entity/Session bean coupling
by pete.muir@jboss.org
"parszab" wrote : It seems to me, however, that this way my Sesson beans have to be to closely coupled to the web UI, and won't be available to be called from the Swing UI.
Not really, you just need to separate the concerns of your app properly (this is a case when some layering would be beneficial).
anonymous wrote : Entity beans contain data about the contexts, that's no more that a bit disturging, since the swing clients can simply ignore that.
They certainly don't have to (and I prefer they don't, this was something we experimented with early on and have since swung away from, preferring to manage the entity beans using a Seam manager component like EntityHome and a factory).
anonymous wrote : But the session beans returning FacesMessages, and string values to manage the page flowm in and outjecting etc. -- that is too close coupling for me.
So, keep your business logic in e.g. EJBs, and provide two facades, one for Web apps using Seam and one for Swing using whatever you want. (Btw Seam doesn't really support Swing at all as a front end).
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4117406#4117406
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4117406
18 years, 3 months
[JBoss Seam] - Re: How to create layered Seam application
by pete.muir@jboss.org
"kukeltje" wrote : I'm not an expert (and did not read the document in detail since most was a plain intro to seam), but wasn't (isn't) one of the goals of seam to get rid to this overly layered designs?
+1, this is completely over the top layering. To summarize, this tutorial suggests:
Entities
DAOs
Services
Actions
Presentation Layer
which is totally unnecessary (especially both an action and service layer!). At least it doesn't suggest using DTOs ;)
My approach would be to start with a single layer, and if you find yourself reimplementing functionality, factor out *that functionality* into a separate layer.
anonymous wrote : e web application it's ok to have only model and actions but it's get more complicated with wider application where the business functions a called from many action/controller components or are called outside of the Seam.
So, then factor out what you need to into a agnostic layer, and then call to that from Seam and your other app. Btw Seam supports EJB remote calls and WS calls.
anonymous wrote : What about database access, when you want to get the same data from different places. It's nice to have persistent layer where you get all database function in one place.
Err, the entity manager and named queries? Or, take a look at the Seam Application Framework - none of this layering nonsense and all your CRUD and queries in one place :)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4117397#4117397
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4117397
18 years, 3 months