-- dbenjamin <[email protected]> wrote
(on Friday, 13 August 2010, 09:13 AM -0700):
> I was expecting that ZF 2 would be re-oriented around the domain model, but
> i'm not sure that's a matter that the ZF's team is really considering and i
> would like to know (maybe it's too early) the extent of the ZF 2's
> refactoring (?).
Too early. :)
The first development snapshot released last week is quite literally a
mapping of ZF1 to namespaces (plus some minor refactoring, stripping of
require_once calls, etc.).
What you describe below is very much in the direction we are aiming. If
you read the document on goals for Zend\Form, you'll see that we want to
strip validation and filtering out into separate objects, which should
make it trivial to create these objects for use foremost with your
domain objects, and then detach them and attach them to forms. Instead
of rendering elements, you would pass them to a decorator chain. The
usage will be a little more verbose as a result, but the explicitness
will make understanding how it works easier, as well as make the usage
more flexible.
This is just one area where refactoring will occur. The end result
should be that you will just write PHP, and consume ZF components as you
need to. In certain cases like the MVC, you'll be simply using PHP
within a defined structure (which is really not far different than what
happens today) -- and some of that PHP will of course be utilization of
ZF components, but primarily usage of the code _you_ write -- i.e.,
consuming your models.
If you are curious about the direction of ZF2, I encourage you to read
up on the ZF2 development wiki:
http://framework.zend.com/wiki/display/ZFDEV2/Home
as well as to join the [email protected] mailing list, and
the #zftalk.dev IRC channel on Freenode.
> I was hoping a better and more cohesive core for the framework (not only
> MVC) which simplifies common processes of web applications through all the
> layers. Like data filtering/validating, i18n, user session and was hoping a
> re-orientation around a powerful inversion of controls system.
>
> The domain model is the core of an application and all processes should
> operate around it. I think for example to an automatic form mapping to
> domain objects, a better and faster way to validate objects directly (with
> support of nested objects or collections) through mapping and dedicated
> classes for validation (for example).
>
> Today, it takes too much time to handle a form and to detach front from core
> functionnalities in a layered architecture, because we have to derive the
> native behaviour of ZF's classes to get by. And there is always a particular
> case we are stucked with.
>
> For now, architecting web applications is a bit complicated with ZF because
> we constantly have to extend the framework components and i think some
> components have too much responsabilities (like Zend_Form for example) and
> need to be exploded for better flexibility and better scalability. Many
> developers are more focused about understanding how ZF works rather than
> about the real problem, i mean the domain model and the final client
> expectations.
>
> Until now, i think the best thing that was done with ZF is Zend_Application
> :)
>
> Aside Zend Framework, i stay tuned on what symfony 2 is promising and i have
> to admit i'm excited by the choice that are made to consolidate et clarify
> the processes around the developpers object model.
>
> All this message has to be considered as a personnal feeling but articulated
> around very popular (and efficient) concepts. All the work from ZF team and
> contributors are amazing, and i hope some fantastic ideas will be unified to
> give birth to a new robust framework, taking into consideration some proven
> concepts that can not be ignored :)
>
> br,
> Benjamin.
> --
> View this message in context:
> http://zend-framework-community.634137.n4.nabble.com/Questionning-about-ZF-2-orientation-tp2324443p2324443.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
>
--
Matthew Weier O'Phinney
Project Lead | [email protected]
Zend Framework | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc