[jboss-user] [JBoss Seam] - Re: Basic Seam questions

SmokingAPipe do-not-reply at jboss.com
Fri Dec 15 02:32:03 EST 2006


anonymous wrote : What are best practices or suggestions regarding what to bind fields in the webpage to - session beans or entities? 

Bind them to what they should be bound to!  If you're manipulating an object like a "Car", that has color, price, model name, etc, those should be bound directly to the car.  The cool thing about Seam is that it gets rid of the whole "data transfer objects" (DTOs) thing.  You certainly can use session beans as DTOs in cases where you really need to, but if you don't need to, don't!  I started using Seam because I don't want to use any more DTOs.  JSF backing beans are DTOs.

Why are DTOs so bad?  Because they don't correspond to any part of your business.  Working on stuff that's not part of your business means wasting time, effectively.

I'm a Seam newbie so I hope someone will correct me if I'm wrong on this.


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

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



More information about the jboss-user mailing list