This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
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

SCEA and EJB 3.0

 
D. Rose
Ranch Hand
Posts: 215
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
DTO pattern which is used in EJB 2.0 is branded as antipattern in EJB 3.0
so should it be used in assignment at all?
 
Ramon Gill
Ranch Hand
Posts: 344
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi D,
Haven't read much about EJB 3.0, but won't we still need DTO's to transfer data to the Web Tier?

Also, does anti-pattern mean its supposed to be a bad thing?

Ray
 
Damian FRACH
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
IMO:

1) EJB 3.0 is not still finished, so it can not be required by anybody

2) DTP is usefull for remote calls to reduce traffic and so on ...
if it is not required you should not use remote calls between web and business tiers

if you need to cluster you still should use web and business tier in the same JVM and cluster horizontally with sticky sessions and web server load balancer
 
Damian FRACH
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
IMO:

anti-pattern means that the idea was promoted as a good thing, but lately was found that it is an evil ... ))
 
Billy Tsai
Ranch Hand
Posts: 1304
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
its like antiproton and antimatter
 
Francis Shillitoe
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A pattern is a description of a GOOD practice which has been used in several scenarios.

An anti-pattern is description of a BAD practice which has been used in several scenarios
 
Ramon Gill
Ranch Hand
Posts: 344
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
Why is DTO an anti-pattern in EJB 3.0 ?
Ray
 
Paul Mukherjee
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ramon Gill:
Hi all,
Why is DTO an anti-pattern in EJB 3.0 ?
Ray

EJB 3.0 proposes a transparent approach to persistence. That is, entity beans are plain old Java objects supplemented with annotations that a persistence manager will use to persist the bean. Since the entity bean itself is a plain old Java object, there is no need to use a data transfer object.

I guess that in EJB 3.0 they have tried to remove the need for DTOs. Therefore use of them would be an anti-pattern.

Paul
 
Ramon Gill
Ranch Hand
Posts: 344
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Paul,
I get it about persistence and POJO's. I still don't understand how you can do away with DTO's though. How do you transfer data between tiers? Are they proposing local interfaces for everything?

Still confused.

Ray
 
Paul Mukherjee
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ramon Gill:
Hi Paul,
I get it about persistence and POJO's. I still don't understand how you can do away with DTO's though. How do you transfer data between tiers? Are they proposing local interfaces for everything?

Still confused.

Ray


You just pass the POJOs around as serializable objects.

Paul
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic