• Post Reply Bookmark Topic Watch Topic
  • New Topic

Process Object --- Design Pattern ???

 
Augg Stine
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all
Is there any design pattern called 'Process Object'??
The framework in which i was working some time back, had it this way.
Swing app. --> Flow Contoller (Stateless session) --> Event --> Session Facade --> Process Obj --> DAO / Entity Bean
In this, I have got the Process Object which is a java class which would have no. of methods being called for a single method in the Session Facade Business methods.
believe that you could understand what the PO exactly does???
But i really don't understand what is the use of this??
And also, it is not listed out in the sun site under the J2EE design Patterns.
love to hear any thing on this.
thank u in advance

regards,
Augg
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sounds like your process object is a Domain Object or Business Object. Take a look at Eric Evan's book on Domain Driven Design. You'll see dozens of examples of this kind of thing...
Kyle
 
Augg Stine
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Kyle,
I would write some thing abt this process object.
I have got a business method in Session Facade. This mehod has to do many validation before actually inserting some thing to DB.
This validation has got some to & fro kind of between my application server & the DB.
What i do here is that i will all these validation over a no. of methods in some thing called ProcessObject. When all the validation & the required insertions are over, this PO will return the requireed value to the Business Method.
People say that If i do n't use this PO, & if i do all these on the session bean itself, it will be costly in terms of performance.
is that right??? I don't think so ...
regards/ Augg
 
Leandro Melo
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Would it be a value object (VO or DTO)?
 
Augg Stine
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No it is not a value object.
This Process Object class might use value Object
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Augg Stine:
Hi Kyle,
I would write some thing abt this process object.
I have got a business method in Session Facade. This mehod has to do many validation before actually inserting some thing to DB.
This validation has got some to & fro kind of between my application server & the DB.
What i do here is that i will all these validation over a no. of methods in some thing called ProcessObject. When all the validation & the required insertions are over, this PO will return the requireed value to the Business Method.
People say that If i do n't use this PO, & if i do all these on the session bean itself, it will be costly in terms of performance.
is that right??? I don't think so ...
regards/ Augg

Look, the kind of thing you're doing is perfectly valid and reasonable. I've got several examples of things like this in my book, and Eric's book (recommended above) contains lots of good information on domain modeling. But no, it won't change the performance if you do everything in a session bean, it just renders the code very difficult to reuse from another session bean in a slightly different circumstance.
Kyle
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!