Quantcast

ZF 2.0 when and what?

classic Classic list List threaded Threaded
21 messages Options
12
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ZF 2.0 when and what?

weierophinney
Administrator
-- Nick Daugherty <[hidden email]> wrote
(on Tuesday, 16 November 2010, 09:58 AM -0700):
> I'm seeing a lot of talk about Doctrine 2 and ZF lately. Is the general
> consensus that Doctrine is going to be used for object persistence, rather
> than a new Zend component?
>
> Yes Doctrine is great, but it has some limitations, some of which are
> non-trivial in complex applications and the maintainers have shown no
> interest in working on these issues.

Yes and no.

Doctrine is an ORM, plain and simple. While the project also
incorporates a DB abstraction layer, the DBAL was written with regard to
its primary use case: the Doctrine ORM.

As such, we will continue to offer Zend\Db, as well as Zend\Db\Table.
ZF's DB abstraction layer is much more generic in purpose than the
Doctrine DBAL, and offers more flexibility for those cases when you do
not need a full-blown ORM. Ralph has been working on a "version 2" of
Zend\Db on his github tree, and I think  you'll be happy to see the
features and breadth he's attempting to address.

    * http://framework.zend.com/wiki/display/ZFDEV2/Zend+Db+2.0+Requirements
    * https://github.com/ralphschindler/zf2-db

> I would much prefer a ZF component that has many of Doctrine's features, but
> uses ZF's db adapters and other components (caches, etc). I think not having
> ORM in ZF is a major hole and keeping if from being THE KILLER framework for
> the web. My vote is for a new ZF ORM that tightly couples with the rest of
> the framework.

The problem is that there are only so many sane approaches to creating
an ORM, and the endeavor requires folks with a great degree of expertise
in RDBMS systems of all flavors. Benjamin Eberlei started work on
Zend_Entity late last year, and discovered several months in that he was
basically duplicating work that Doctrine 2 was already doing -- and, in
fact, was far in advance of what he was doing. The only logical approach
was for him to drop Zend_Entity in favor of helping advance the Doctrine
2 project.

I completely back him in this decision. There's no need for us to
duplicate these efforts, particularly when the two can play well
together. Doctrine 2 makes heavy use of interfaces, which allows us to
wrap our cache component and inject it into Doctrine, or to share
Zend\Db connections with Doctrine (and vice versa). It makes much more
sense for us to leverage the many, many man-months of work the Doctrine
team has already performed so that we can focus on making the rest of ZF
as solid as possible for our own 2.0 release.

> On Sun, Nov 14, 2010 at 6:28 AM, David Muir
> <[hidden email]<davidkmuir%[hidden email]>
> > wrote:
>
> >
> >
> > monk.e.boy wrote:
> > >
> > >
> > > weierophinney wrote:
> > >>
> > >>
> > >>> (APC http://php.net/manual/en/book.apc.php will help your speed
> > issues)
> > >>
> > >> APC is one solution -- and that applies to ZF1 as well. However, the
> > >> better solution is to profile the code and re-architect pain points to
> > >> make them more performant. The autoloading/plugin loading milestone was
> > >> highly focussed on this, and the outcome has been very rewarding --
> > >> 7-20x speed increases!
> > >>
> > >>
> > >
> > > Agreed! The work you guys have done is amazing.
> > >
> > > But Doctrine2 is almost insisting [1] that you use
> > > APC/Memcache/XcacheCache so it looks like a lot of us will be going down
> > > that route. Is this something you are going to recomend with ZF2? Is it
> > > something you think about when writing/testing v2.0?
> > >
> > > [1] ref:
> > >
> > http://www.doctrine-project.org/projects/orm/2.0/docs/reference/configuration/en
> > >
> > > monk.e.boy
> > >
> >
> >
> > The cache they're talking about is metadata caching. ZF1 already recommends
> > this for Zend_Db_Table's metadata[1].
> >
> > What Matthew was referring to was opcode caching [2], not data caching,
> > although some opcode caches offer general purpose caching functionality,
> > ie.
> > APC and Xcache
> >
> > [1] ref:
> >
> > http://framework.zend.com/manual/en/zend.db.table.html#zend.db.table.metadata.caching
> > [2] ref: http://en.wikipedia.org/wiki/List_of_PHP_accelerators
> >
> > Cheers,
> > David
> > --
> > View this message in context:
> > http://zend-framework-community.634137.n4.nabble.com/ZF-2-0-when-and-what-tp3031964p3041719.html
> > Sent from the Zend Framework mailing list archive at Nabble.com.
> >

--
Matthew Weier O'Phinney
Project Lead            | [hidden email]
Zend Framework          | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc
12
Loading...