Hi,

After reading much about the Service Manager implementation in ZF2 and
trying out a few things, I think I finally get the concept and the idea
behind it.

But please help me understand one thing.

Imagine I have a medium size database with 10 entities. Along them are
10 form definition.

The input filter is described in the entity.

in the service_manager I have a factory for each entity. (as the code is
mostly the same the factories extend from an base entityFactory).
then I have a factory for each Form (again extended by a base
formFactory) which along other things inject the input filter from the
entity.

Is this really the right way?

It seems extremly redundant to do this for each entity/form.
There are abstract_factories which can work around this, but after what
I have read, this is more of a fallback. Is this so? Can't I not just
have a formFactory and a entityFactory? I would just have to implemnt
the canCreateServiceWithName method to only target form respectively
entity classes.

Is there a downside to have multiple abstract factory classes?

What is the best practice ?

TIA
Ludwig

-- 
Ludwig Ruderstaller
http://www.cwd.at

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com


Reply via email to