compared with
Current by Benjamin Eberlei
on Nov 08, 2009 11:24.

(show comment)
Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (59)

View Page History
<p>This is a page for planning Doctrine integration.</p>

h1. Doctrine 1
<h1>Doctrine 1</h1>


h2. Questions
<h2>Questions</h2>

<ul>
* What <li>What minor version number of Doctrine 1.x should we support? (kpope)</li>
* What <li>What namespace should we use?
** Right now I think about something like Zend_(orm\|model)_Doctrine, to make it possible for future orm's (juozas)
<ul>
<li>Right now I think about something like Zend_(orm|model)_Doctrine, to make it possible for future orm's (juozas)</li>
</ul>
</li>
* How <li>How should we modify Record/Table generation tasks in the light of ZF Modular Structures
** Configurable via Metadata?
<ul>
<li>Configurable via Metadata?</li>
** How <li>How can we autoload this correctly given <Record>Base &lt;Record&gt;Base instances (side by side or in Subdirectory?)
<ul>
*** Models <li>Models can be generated to Model_Class, Model_Base_Class and Model_ClassTable so autoloading shoudln't be a problem (juozas)
<ul>
**** How <li>How does would this look like for ModuleA_Model_Class, ModuleB_Model_Class? How could one configure which class is for which module? (beberlei)</li>
** I'm not aware of any way to generate modular models using Doctrine 1.1, This may be possible with 1.2. See [http://www.doctrine-project.org/upgrade/1_2#PEAR%20Style%20Model%20Loading%20and%20Generation], [http://groups.google.com/group/doctrine-user/browse_thread/thread/a6f4751b9a8e47dc#] and [http://groups.google.com/group/doctrine-user/browse_thread/thread/3fe6f7745d472a46] (mlurz71)
</ul>
</li>
</ul>
</li>
<li>I'm not aware of any way to generate modular models using Doctrine 1.1, This may be possible with 1.2. See <a href="http://www.doctrine-project.org/upgrade/1_2#PEAR%20Style%20Model%20Loading%20and%20Generation">http://www.doctrine-project.org/upgrade/1_2#PEAR%20Style%20Model%20Loading%20and%20Generation</a>, <a href="http://groups.google.com/group/doctrine-user/browse_thread/thread/a6f4751b9a8e47dc#">http://groups.google.com/group/doctrine-user/browse_thread/thread/a6f4751b9a8e47dc#</a> and <a href="http://groups.google.com/group/doctrine-user/browse_thread/thread/3fe6f7745d472a46">http://groups.google.com/group/doctrine-user/browse_thread/thread/3fe6f7745d472a46</a> (mlurz71)</li>
</ul>
</li>
</ul>

h2. Todo

* Create a Doctrine 1 Zend Application resource (mlurz71)
** [http://framework.zend.com/wiki/display/ZFPROP/Zend_Application_Resource_Doctrine+-+Matthew+Lurz] already exists
** I have code for this, though it should make use of application.ini config to set it's properties (juozas)
* Create a Doctrine1 paginator adapter
** Juozas could contribute his.
*** current code [http://pastebin.com/f39a326dd] (juozas)
** [http://framework.zend.com/wiki/display/ZFPROP/Zend_Paginator_Adapter_Doctrine+-+Jason+Eisenmenger] already exists (mlurz71)
* Create a Doctrine1 auth adapter
** [http://www.framework.zend.com/svn/framework/extras/incubator/library/ZendX/Doctrine/Auth/Adapter.php] exists already, only docs and tests missing.
* Create Zend_Tool providers for Doctrine 1
** Should be zfproject.xml aware and use the Doctrine 1 resource to "bootstrap" the ZF + Doctrine enviroment
** Should implement all the tasks that the Doctrine CLI has.
*** Import Task should be extended to allow for modularity and PEAR Style class generation, a potential Schema would be <Module>_Model_<Name>, <Module>_Model_<Name>Table and <Module>_Model_Base_<Name>.
* -Create Zend_Db_Adapters support gateway-** Why? I think the performance overhead is considerable, wouldn't it be better to contribute new adapters for Doctrine then? (beberlei)
*** What do you mean by performance overhead? I haven't tried it, but the fact that Doctrine now is very much PDO oriented (correct my if I'm wrong) makes me believe that it would be easier to make some sort of bridge than to recode drivers for Doctrine. I should play with this (juozas)
**** I think the problem is rather that Doctrine requires much more than the PDO/PDOStatement like API but also the Export/Import Requirements for DDL SQL Statements, which might not be correct for the currently unsupported/semi-supported platforms.
***** I guess I've missed this point, you are right (juozas)
* Create a Log Writer component (mlurz71)
** [http://framework.zend.com/wiki/display/ZFPROP/Zend_Log_Writer_Doctrine+-+Matthew+Lurz] already exists
* Create a Session SaveHandler component (mlurz71)
** [http://framework.zend.com/wiki/display/ZFPROP/Zend_Session_SaveHandler_Doctrine+-+Matthew+Lurz] already exists
<h2>Todo</h2>

h1. Doctrine 2
<ul>
<li>Create a Doctrine 1 Zend Application resource (mlurz71)
<ul>
<li><a href="http://framework.zend.com/wiki/display/ZFPROP/Zend_Application_Resource_Doctrine+-+Matthew+Lurz">http://framework.zend.com/wiki/display/ZFPROP/Zend_Application_Resource_Doctrine+-+Matthew+Lurz</a> already exists</li>
<li>I have code for this, though it should make use of application.ini config to set it's properties (juozas)</li>
</ul>
</li>
<li>Create a Doctrine1 paginator adapter
<ul>
<li>Juozas could contribute his.
<ul>
<li>current code <a href="http://pastebin.com/f39a326dd">http://pastebin.com/f39a326dd</a> (juozas)</li>
</ul>
</li>
<li><a href="http://framework.zend.com/wiki/display/ZFPROP/Zend_Paginator_Adapter_Doctrine+-+Jason+Eisenmenger">http://framework.zend.com/wiki/display/ZFPROP/Zend_Paginator_Adapter_Doctrine+-+Jason+Eisenmenger</a> already exists (mlurz71)</li>
</ul>
</li>
<li>Create a Doctrine1 auth adapter
<ul>
<li><a href="http://www.framework.zend.com/svn/framework/extras/incubator/library/ZendX/Doctrine/Auth/Adapter.php">http://www.framework.zend.com/svn/framework/extras/incubator/library/ZendX/Doctrine/Auth/Adapter.php</a> exists already, only docs and tests missing.</li>
</ul>
</li>
<li>Create Zend_Tool providers for Doctrine 1
<ul>
<li>Should be zfproject.xml aware and use the Doctrine 1 resource to &quot;bootstrap&quot; the ZF + Doctrine enviroment</li>
<li>Should implement all the tasks that the Doctrine CLI has.
<ul>
<li>Import Task should be extended to allow for modularity and PEAR Style class generation, a potential Schema would be &lt;Module&gt;<em>Model</em>&lt;Name&gt;, &lt;Module&gt;<em>Model</em>&lt;Name&gt;Table and &lt;Module&gt;<em>Model_Base</em>&lt;Name&gt;.</li>
</ul>
</li>
</ul>
</li>
<li><span style="text-decoration: line-through;">Create Zend_Db_Adapters support gateway</span>** Why? I think the performance overhead is considerable, wouldn't it be better to contribute new adapters for Doctrine then? (beberlei)
<ul>
<li>
<ul>
<li>What do you mean by performance overhead? I haven't tried it, but the fact that Doctrine now is very much PDO oriented (correct my if I'm wrong) makes me believe that it would be easier to make some sort of bridge than to recode drivers for Doctrine. I should play with this (juozas)
<ul>
<li>I think the problem is rather that Doctrine requires much more than the PDO/PDOStatement like API but also the Export/Import Requirements for DDL SQL Statements, which might not be correct for the currently unsupported/semi-supported platforms.
<ul>
<li>I guess I've missed this point, you are right (juozas)</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>Create a Log Writer component (mlurz71)
<ul>
<li><a href="http://framework.zend.com/wiki/display/ZFPROP/Zend_Log_Writer_Doctrine+-+Matthew+Lurz">http://framework.zend.com/wiki/display/ZFPROP/Zend_Log_Writer_Doctrine+-+Matthew+Lurz</a> already exists</li>
</ul>
</li>
<li>Create a Session SaveHandler component (mlurz71)
<ul>
<li><a href="http://framework.zend.com/wiki/display/ZFPROP/Zend_Session_SaveHandler_Doctrine+-+Matthew+Lurz">http://framework.zend.com/wiki/display/ZFPROP/Zend_Session_SaveHandler_Doctrine+-+Matthew+Lurz</a> already exists</li>
</ul>
</li>
</ul>


h2. Questions
<h1>Doctrine 2</h1>

* What namespace should we use?

* Would the doctrine2 classes use 5.3?
** Doctrine 2 requires 5.3+. See [http://www.doctrine-project.org/documentation/manual/2_0/en/introduction] (mlurz71)
** Just to clarify I meant do we use 5.3 or 5.2 to create the ZF doctrine 2 components. (kpope)
* Replication support? Probably need to ask the Doctrine team about this.
** What is replication support? Mysql Proxy is the way to go here imho. (beberlei)
*** I agree with beberlei, there are also ways to make use of multiple connections using Doctrine plugins (juozas)
*** Ok, maybe at the end of the process we can provide an example in the docs for this. (kpope)
<h2>Questions</h2>

h2. Todo
<ul>
<li>What namespace should we use?</li>
</ul>


<ul>
<li>Would the doctrine2 classes use 5.3?
<ul>
<li>Doctrine 2 requires 5.3+. See <a href="http://www.doctrine-project.org/documentation/manual/2_0/en/introduction">http://www.doctrine-project.org/documentation/manual/2_0/en/introduction</a> (mlurz71)</li>
<li>Just to clarify I meant do we use 5.3 or 5.2 to create the ZF doctrine 2 components. (kpope)</li>
</ul>
</li>
<li>Replication support? Probably need to ask the Doctrine team about this.
<ul>
<li>What is replication support? Mysql Proxy is the way to go here imho. (beberlei)
<ul>
<li>I agree with beberlei, there are also ways to make use of multiple connections using Doctrine plugins (juozas)</li>
<li>Ok, maybe at the end of the process we can provide an example in the docs for this. (kpope)</li>
</ul>
</li>
</ul>
</li>
</ul>


<h2>Todo</h2>

<ul>
* Update <li>Update the main Zend_Loader_Autoloader to support both 5.2 and 5.3 style class loading.</li>
* Update the Zend_Loader_Autoloader_Resource to support namespaces
<li>Update the Zend_Loader_Autoloader_Resource to support namespaces</li>
* Create <li>Create a Doctrine 2 Zend Application resource
<ul>
** I <li>I have a prototype on this, which is quite complete already. I will create a proposal for it.</li>
* Create a Doctrine2 paginator adapter
* Create a Doctrine2 auth adapter
</ul>
</li>
<li>Create a Doctrine2 paginator adapter</li>
<li>Create a Doctrine2 auth adapter</li>
* Create <li>Create a zend server cache adapter for the \Doctrine\Common\Cache (submit to Doctrine codebase) or support Zend_Cache?
<ul>
** Why <li>Why share a cache instance? I don't see the point, since there are no global methods on caches that require a "singleton" &quot;singleton&quot; of a cache. (beberlei)</li>
** Sorry <li>Sorry I mean we need a Zend Server adapter for the common lib (kpope)</li>
* Zend Profiler support?
</ul>
</li>
<li>Zend Profiler support?
<ul>
** This <li>This is a good idea, because it would allow using DC2 with Zend_Wildfire / FirePHP. However the current DC2 Logger only has a subset of features of the Db Profiler. However i might propose to pair this up.</li>
</ul>
</li>
* Look <li>Look at the ZF directory structure, do we need to add any folders etc for metadata for instance?
<ul>
** This <li>This question is also relevant for DC1 regarding the yaml fixture and metadata files.</li>
</ul>
</li>
* Create <li>Create Zend_Tool providers for Doctrine2
<ul>
** I <li>I have a prototype for those already, they are zfproject.xml aware and use the Zend_Application instance and Doctrine2 Resource.</li>
</ul>
</li>
* -Create <li><span style="text-decoration: line-through;">Create Zend_Db_Adapters support gateway-** gateway</span>** Again Why? I think the performance overhead is considerable, wouldn't it be better to contribute new adapters for Doctrine then? (beberlei)</li>
</ul>