Zend with existing Propel ORM

I am working on converting a fairly large (but rather simple) application from Symfony to Zend, large due to DB. This is also my first Zend project, but so far everything is going well. The application is simple, the database is quite complicated (I foresee many hours of working with data, if done manually).

I have the source code that was executed using Symfony FW. The original uses propel and works (and has over 200 models displaying a database, 272 with a quick look).

My DB tables have a dependent row after row, I also reuse the original DB structure ... direct import of tables / schemas, so I assume that the original engine will still work in this regard.

My question is / is, would it be well worth the time to reuse the propel section of the old application with my new version of the Zend based application? Should this be a direct venture?

If this can work, it can remove many sleepless nights from my life :)

+3
source share
3 answers

I think you can reuse the Propel sections of the old application, since Propel 1.5 (current stable) and the next 1.6 are backward compatible with Propel 1.3 (using Symfony 1.0, if I remember well) and its original "criteria".

Then you will get benefits for the Propel 1.5 enhancements (among them the good Query syntax) without losing the existing code.

Cm:

+4

Symfony, sfMixer. Propel Symfony. sfMixer, , Zend, .

, Propel ( Zend Symfony ), .

Propel Zend, Symfony, ( Base, , ). Propel Zend , , protected , .

+3

, , ...

Propel (1.5). () , ( SF), . "" /.

, , , . phpDoc , Propel, , , . "" , phpDoc , "" " db api", Propel... ! , ENUM... v1.6 Propel. , Propel . , "" .

v1.5 of Propel API ( Frosty Z), ( ) "" "" . - ( MVC) , , , API Propels .

, Propel "" -, , , Propel. , API . Propel, . "" , "" Propel .

, :

                    $Users = UsersQuery::create()
                  ->filterByLastName($LastName)
                  ->find(); // $Users is a PropelCollection object
                 return $Users;

"", Frosty Z, Zend_Db PHP/MySQL , "", "". Propel Docs , , , . , ACL.

My answer explains why I do not reuse the original models; lack of new methods and fear of residual code that can cause bugs or headaches, and why I am stuck with Propel (besides the fact that it seems really nice); I have an example of how ORM works. Indeed, I can say that both answers above are what I went with. Thanks guys!

0
source

All Articles