Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-03-2007, 05:47 PM
Junior Member
 
Join Date: Sep 2007
Posts: 3
Default Zend and ORM

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 09-05-2007, 10:17 AM
Member
 
Join Date: Aug 2007
Location: Sweden
Posts: 52
Send a message via MSN to Leif.Högberg
Default

As far as I know there are no ORM in ZF. Personally I use propel 1.3 (propel.phpdb.org) and it works just fine together with ZF.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 09-08-2007, 07:24 PM
Junior Member
 
Join Date: Sep 2007
Posts: 3
Default

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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 10-24-2007, 03:01 PM
Junior Member
 
Join Date: Oct 2007
Posts: 3
Default

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 03-13-2008, 01:01 PM
mgordon's Avatar
Junior Member
 
Join Date: Sep 2007
Location: Stockholm, Sweden
Posts: 16
Send a message via Skype™ to mgordon
Default My ORM-hack

I've created an ORM, it's not beautiful but it serves my purposes: Any1 got a quick and dirty ORM for 1.5?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 03-13-2008, 06:40 PM
xentek's Avatar
Senior Member
 
Join Date: Feb 2008
Posts: 112
Default

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 05-13-2008, 10:45 PM
Junior Member
 
Join Date: May 2008
Posts: 2
Default Quick & Dirty ORM

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 05-26-2008, 11:22 AM
Junior Member
 
Join Date: May 2008
Posts: 1
Default

Maybe you'll be interested by this proposal : Zend_Generator_Orm
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 05:51 AM.