Skip to content
koblass edited this page Jul 16, 2013 · 1 revision

What is Noee ?

Noee (Nested Objects Enhanced Engine) is a new generation of ORM (Object Relational Mapping) that meet the new requirements implied by the Web 2.0 development. In today world AJAX communications rule the way the data are exchanged within web applications. The front end is generally made out of Javascript wich request the data from the backend and display them nicely using a mixture of HTML and CSS. The need of being able to load a set of data and to save it later is born !

What is the difference between Noee and other ORM ?

Traditional ORM like Propel, Doctrine, PHPMyObject are aim to map the database tables to PHP objects and add the capability to grab sub data (like all the invoices of a user), change those data and then save the modified objects. This approach was fine in Web 1.0 world, but doesn't fit well in 2.0 !

Lets use the following example: I need to display a user profile as well as the list of all its invoices as well as all its invoice items.

With existing ORM we would need to query the User table to get the User PHP object, then ask for its invoices and invoice items. All this has to be done manually and once the structure has been populated we need to send it over the network, generally by using json.

With Noee, you load the entire collection with only one line of code, the collection is made of POPO (Plain Old PHP Objects), and a second line of code allows you to encode this collection in json.

$user = Noee_Orm::load('User', 'id = 1');
Noee_Dao::dataToJson($user);

This difference become even bigger when you need to save those data back to the database. With Noee this is only a one line of code as well.

Noee_Orm::save($user);

By using this simple line of code all the changes made to the user, one of its invoice or even the invoice items will be saved to the database.

Clone this wiki locally