This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What to choose, daoFactory or a SpringUtil from ZK?

 
Girish Vasmatkar
Ranch Hand
Posts: 201
  • Mark post as helpful
  • send pies
  • 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
  • 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?
 
Amila Domingo
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • 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)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic