Doctrine ORM and Zend Framework, sample project to get you started (with sample database)

Doctrine ORM and Zend Framework, sample project to get you started (with sample database)

I’ve created a sample project for those of you interested in working with Doctrine ORM and Zend Framework (my favorite toys in last few weeks). All you need to get it up n running is a download of Doctrine ORM and Zend Framework.

Project is set for auto loading both Zend and Doctrine Frameworks so all you need to do is to instantiate 🙂 -Also, below you can see few screenshots of the sample code I implemented. Also, I provide you with the .sql dump (doctrinesql) file that goes with this project. Note the use of InnoDB engine in database. Since Doctrine comes with this cool hasOne, hasMany relation mappings, you can use bunch of cool stuff to easily do various actions on database once you get familiar with Doctrine. Although MyISAM engine is somewhat faster than InnoDB, without second thoughts I choose InnoDB due to foreign keys features.

example_user_entry

bootstrap_setup

user_class_autogenerated

article_class_autogenerated

create_new_user

add_new_user_and_new_article

add_article_for_existing_user

Download project files:
doctrinesql
doctrine_example_project (doctrine orm and zend framework)

You made it all the way down here so you must have enjoyed this post! You may also like:

Using Redis cache backend and session storage in Magento Marko Martinovic
Marko Martinovic

Using Redis cache backend and session storage in Magento

Consuming Magento REST service using Zend_OAuth_Consumer Darko Goles
Darko Goles

Consuming Magento REST service using Zend_OAuth_Consumer

Unit testing with Zend framework: Setting up environment for the first test using Netbeans IDE for php Darko Goles
Darko Goles

Unit testing with Zend framework: Setting up environment for the first test using Netbeans IDE for php

Tell us about your project

Drop us a line. We'd love to know more about your project.