|
|||
|
Hi all,
I'm fairly new to the Zend framework (not to PHP though). After reading and coding a lot experimenting with Zend_Translate and the MVC capabilitiet and wanted to start with the DB oportunities. But I can't seem to find some examples to go for an ORM approach using DB's. I could be totally wrong, but as I said, I'm fairly new to the Zend framwork and at the same time, I'm learning Ruby On Rails so I thought things like ORM and Active Record would be the same in both framworks. So, hopefully a good soul can help my troubled mind ![]() Thx in advance |
|
|||
|
Thats to bad I think. ORM functionality would be top of the bill and would give more web developers a push in the back to use PHP for their dynamic web apps.
Becouse I have seen a change in this matter. A lot of companies prefere .NET and even ruby on rails above PHP. So Zend still has a long way to go with the framework. |
|
|||
|
Actually ZF has ann ORM - Zend_Db_Table, but this is not an implementation of Active record as it is with rails, but Table/Row data gateway design pattern.
Also, because ZF is a component framework using some of the existing solutions is very easy. Just stick doctrine or propel in you lib directory and you have an ActiveRecord based ORM solution. (not 100% sure, but about 99% )Regards |
|
||||
|
I've created an ORM, it's not beautiful but it serves my purposes: Any1 got a quick and dirty ORM for 1.5?
|
|
||||
|
Vladev beat me too it, but here's some further reading in case you want to be able tell your design patterns apart:
P of EAA: Table Data Gateway P of EAA: Row Data Gateway P of EAA: Active Record Object-relational mapping - Wikipedia, the free encyclopedia There has been some talk about adding an active record implementaiton in the framework, but I don't see how the lack of active record should keep anyone from not building a robust application with ZF. And for all the praise rails has recieved lately, many of its design pattern implementations are not ideal, or even an example of best practice. Its a great framework, don't get me wrong, but Zend is not going to be swayed by what the cool kids are doing. The vision they have for ZF - and the approach they are taking with coding to that vision - is quite deliberate. This means that once ZF finally matures, it will be one hell of a force to be reckoned with - in my opinion. If you want a rails like experience, try CakePHP (which I also like).
__________________
- xentek |
|
|||
|
Here is a tutorial/write up I did on a very simple ORM I wrote for 1.5
Zend_Db_Table with Normalized Tables Joshteam’s Weblog |
|
|||
|
Maybe you'll be interested by this proposal : Zend_Generator_Orm
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|