Announcement Announcement Module
No announcement yet.
What is a commandObject Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • What is a commandObject

    Hello all

    I know that Command Object can be a object such as Product or Order so that a jsp page can display a Product or an Order details. Command object can also be ProductForm (with a Product in its properties) that can have some more information such as date...

    My question is that can a Command Object (e.g ProductForm) can have (in its properties) some bussiness (logic) classes such as ProductManager (this class is used for manipulating "products") and OrderManager (this class is used for manipulating "orders") .

    The reason is that I need to have a class to get information from both ProductManager and OrderManager.

    Thank yoiu very much for any help

  • #2
    Hi sho

    It seems that you are using your model abjects directly as command objects. Good choice. If you are using an "exposed domain model" then it's a direct consequence. But having business logic in your model objects is a matter of religion. But if you choose to have object references in your commandObjects then you have to make sure they are serializable.

    Otherwise I see no problems in doing as you suggest