1

I found a few Zend sample applications but all of them use Zend_DbTable. Does anyone know of a full Zend example application built with Propel to learn from?

sarimoto
  • 79
  • 2
  • 3
  • 1
    I couldn't find an application but there are a couple of tutorials you can have a look: http://www.brandonsavage.net/the-adventures-of-merging-propel-with-zend-framework/ http://devzone.zend.com/article/184 – Alex Rashkov Oct 26 '10 at 11:13

1 Answers1

0

I don't know of any complete applications, though there are quite a few articles on how to set it up. Just make sure you initialize Propel in your bootstrap, and then use your Propel classes as per usual. There's nothing special about it...

How to Zend Framework with Propel ORM could be handy.

Community
  • 1
  • 1
wimvds
  • 12,790
  • 2
  • 41
  • 42
  • I once worked on a Zend application with Propel in the backend. We wrapped all objects with a custom layer so no Propel objects would leave the Model layer "naked". The design was so good that the guy who maintains it now has heaps of time left to spend on Stack Overflow. – Jan Fabry Oct 26 '10 at 18:56
  • @Jan Fabry, Any plans to open source it or part of it as a live example. 2. What do you mean by no Propel objects would leave the Model layer "naked"? – sarimoto Oct 26 '10 at 23:59
  • I'm looking for a full Propel & Zend example application, one that has been open sourced as a full example. Would be very nice to see. – sarimoto Oct 27 '10 at 00:03
  • @sarimoto: I can't open source it, I don't work there anymore. But [the answer Wim linked to](http://stackoverflow.com/questions/3796093/how-to-zend-framework-with-propel-orm/3796405#3796405) contains everything you need: just execute `Propel::init()' somewhere near the startup of your code and you're ready to go. Just make sure you configure Propel to build the files somewhere near your other application files, that leaves the include path simple. – Jan Fabry Oct 27 '10 at 07:21
  • @sarimoto: We introduced Propel when part of the application was already written, and it used `Mappers` that returned `Entities` in the Model layer. To preserve backwards compatibility, we let our controllers only talk to these mappers, which would only return entities. Over time, the mappers would be (thin) layers over Propel peer classes, and the entities were (even thinner) layers over Propel object classes. I don't know whether I would add that layer of abstraction again if I would restart today. They added some useful features, but most of them are included in the new versions of Propel. – Jan Fabry Oct 27 '10 at 07:27