Results 1 to 2 of 2

Thread: A design question

  1. #1

    Default A design question

    While using spring MVC, we always try to maintain the (controller - > service -> dao) hierarchy. In spring webflow for an action state we can call method of any POJO. My question is, say I have a scenario where I need a boolean result from a dao method and nothing more than that. In this case, should I need to maintain the service -> dao hierarchy (where actually nothing is done in service method rather than calling the appropriate dao method and returning it's result) or it it OK to call the dao method directly?

  2. #2
    Join Date
    Sep 2004
    Location
    Leuven, Belgium
    Posts
    1,853

    Default

    In this case, should I need to maintain the service -> dao hierarchy (where actually nothing is done in service method rather than calling the appropriate dao method and returning it's result) or it it OK to call the dao method directly
    I would suggest you keep the service method. Keep in mind that it also serves as a transaction demarcation point!

    Erwin

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •