Results 1 to 7 of 7

Thread: Nested services

  1. #1
    Join Date
    Jan 2007
    Location
    Kuala Lumpur, Malaysia
    Posts
    138

    Default Nested services

    i think i read somewhere, most probably from one of the previous posts,
    that using nested DAOs are bad.
    but what about nested services?

  2. #2
    Join Date
    Aug 2006
    Location
    Arequipa-Peru / South America
    Posts
    2,796

    Default

    that using nested DAOs are bad.
    but what about nested services?
    yes i am agree about fo DAO area,

    i think that the answer is nested BO

    each entity should has a DAO object and this a BO, some requerimentes make you to create a special BO that call or use 2..N BO (nested services)

    HTH
    - Manuel Jordan

    Kill Your Pride, Share Your Knowledge With All
    The Fear Of The LORD Is The Beginning Of Knowledge, But Fools Despise Wisdom And Discipline. Proverbs 1:7

    Blog


    Technical Reviewer of Apress

    • Pro SpringSource dm Server
    • Spring Enterprise Recipes: A Problem-Solution Approach
    • Spring Recipes: A Problem-Solution Approach, 2nd Edition
    • Pro Spring Integration
    • Pro Spring Batch
    • Pro Spring 3
    • Pro Spring MVC: With Web Flow
    • Pro Spring Security

  3. #3
    Join Date
    Jan 2007
    Location
    Kuala Lumpur, Malaysia
    Posts
    138

    Default

    BO?
    Bussniess Object?
    i have entities (tables), each entity has a dao,
    a services uses multiple dao.
    the @Transactional attribute is in the services

    BO = services?

    i have some logic that exists in more than one service.
    using a nested service looks like the easiest way..

  4. #4
    Join Date
    Sep 2006
    Location
    UK
    Posts
    8,424

    Default

    Services have to collaborate with other services otherwise you are going to have to copy and paste code. Where else would the common code live?
    Last edited by karldmoore; Aug 27th, 2007 at 02:53 PM.
    Barracuda Networks SSL VPN Lead Developer
    http://pramatr.wordpress.com
    http://twitter.com/karldmoore
    http://www.linkedin.com/in/karldmoore
    Any postings are my own opinion, and should not be attributed to my employer or clients.

  5. #5
    Join Date
    Jan 2007
    Location
    Kuala Lumpur, Malaysia
    Posts
    138

    Default

    simply put,
    nested dao = bad.
    nested services = common practice?
    ok. thank you for clearing that up.

  6. #6
    Join Date
    Sep 2006
    Location
    UK
    Posts
    8,424

    Default

    Quote Originally Posted by titiwangsa View Post
    nested dao = bad.
    Yeah this doesn't sit quite right with me, sounds like some refactoring might be in order.

    Quote Originally Posted by titiwangsa View Post
    nested services = common practice?
    Hopefully, otherwise I'm doing it all wrong .
    Last edited by karldmoore; Aug 27th, 2007 at 02:53 PM.
    Barracuda Networks SSL VPN Lead Developer
    http://pramatr.wordpress.com
    http://twitter.com/karldmoore
    http://www.linkedin.com/in/karldmoore
    Any postings are my own opinion, and should not be attributed to my employer or clients.

  7. #7
    Join Date
    Aug 2006
    Location
    Arequipa-Peru / South America
    Posts
    2,796

    Default

    i did almost the same question long time ago

    here the link
    http://forum.springframework.org/showthread.php?t=29702
    i guess can be useful
    regards

    Hopefully, otherwise I'm doing it all wrong
    and burn all own projects

    regards
    - Manuel Jordan

    Kill Your Pride, Share Your Knowledge With All
    The Fear Of The LORD Is The Beginning Of Knowledge, But Fools Despise Wisdom And Discipline. Proverbs 1:7

    Blog


    Technical Reviewer of Apress

    • Pro SpringSource dm Server
    • Spring Enterprise Recipes: A Problem-Solution Approach
    • Spring Recipes: A Problem-Solution Approach, 2nd Edition
    • Pro Spring Integration
    • Pro Spring Batch
    • Pro Spring 3
    • Pro Spring MVC: With Web Flow
    • Pro Spring Security

Posting Permissions

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