• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

What to choose, daoFactory or a SpringUtil from ZK?

 
Ranch Hand
Posts: 201
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Guys,

I'm using Spting along with ZK for Presentation layer. I have got a lot of DAOs, 44 to be precise to deal with.

My question is whether to use the daofactory patter as more or less all the Spring developers use or to go with a utility class called SpringUtil provided by ZK. ZK integrates with Spring and provides this class.

You can get any bean from this class in this form



So, basically it is a design issue that I must deal with.

Thanks!!!
 
Girish Vasmatkar
Ranch Hand
Posts: 201
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Okay, I was wondering what is left other than daoFactory pattern if you were not using ZK ?

Why not just inject the dao's themselves(which are gonna be used) in the classes rather than first injecting all the daos in the daofactory and injecting daofactory in the required class?
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Girish Vasmatkar wrote:Okay, I was wondering what is left other than daoFactory pattern if you were not using ZK ?

Why not just inject the dao's themselves(which are gonna be used) in the classes rather than first injecting all the daos in the daofactory and injecting daofactory in the required class?



Hi All,

i have a similar problem (whether to inject daos to required classes or use a dao factory). i have two questions,

1. isn't injecting daos add unnecessary code (setters)
2. what is the main advantage we get from using dao factory pattern with spring ioc (other than not having reference variables for daos and setters)
 
He got surgery to replace his foot with a pig. He said it was because of this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic