News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

DZone.com:
PHP objects in MongoDB with Doctrine
March 21, 2012 @ 10:03:59

On DZone.com today Giorgio Sironi has a new post showing how you can use Doctrine with MongoDB to work with Document objects from the database.

In the PHP world, probably the Doctrine ODM for MongoDB is the most successful. This followes to the opularity of Mongo, which is a transitional product between SQL and NoSQL, still based on some relational concepts like queries. [...] The case for an ODM over a plain Mongo connection object is easy to make: you will still be able to use objects with proper encapsulation (like private fields and associations) and behavior (many methods) instead of extracting just a JSON package from your database.

He briefly mentions that the PECL extension for Mongo needs to be installed prior to trying out any of the examples. His first example shows how to create a DocumentManager (similar to the normal EntityManager for those familiar with Doctrine). He also shows an integration with the ORM and shares some of the findings he's made when it comes to versioning the resources (hint: annotations are your friend).

0 comments voice your opinion now!
mongodb doctrine object orm tutorial versioning


blog comments powered by Disqus

Similar Posts

ITNewb.com: PHP Encryption / Decryption Using the MCrypt Library (libmcrypt)

Lullabot.com: Single Sign-on across Sub-Domains in Drupal with No Extra Modules

PHP-Tools Blog: Der Zauberlehrling - Sorcerer's Apprentice

Matthew Leverton\'s Blog: How to add a custom CAPTCHA to phpBB2

PHPClasses.org Blog: Developing scalable PHP applications using MongoDB


Community Events

Don't see your event here?
Let us know!


interview symfony language php7 application example community framework list conference introduction project composer api podcast part2 opinion yii2 laravel series

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework