SitePoint Sponsor |
|
User Tag List
Results 1 to 25 of 25
Thread: Php Orm
-
Mar 14, 2005, 20:02 #1
- Join Date
- Jan 2005
- Location
- Sydney
- Posts
- 43
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Php Orm
Just wanted to start a thread to list all the available PHP ORM solutions.
There are a few threads which all almost the same and have links to available solutions, but they're all over the place. Much like the list of templating engines a while back, this will be focusing on PHP (4 and 5) ORM solutions.
No more list here.
ORM at wiki.ccLast edited by dylanegan; Mar 15, 2005 at 22:25.
-
Mar 14, 2005, 20:08 #2
- Join Date
- Jun 2003
- Location
- Iowa, USA
- Posts
- 3,749
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by dylanegan
Jason Sweat ZCE - jsweat_php@yahoo.com
Book: PHP Patterns
Good Stuff: SimpleTest PHPUnit FireFox ADOdb YUI
Detestable (adjective): software that isn't testable.
-
Mar 14, 2005, 20:37 #3
- Join Date
- May 2003
- Location
- Calgary, Alberta, Canada
- Posts
- 275
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by dylanegan
MyObjects
Pear DB_DataObject
Entity
The features vary greatly for each product. There is quite alot of difference.
Ive started working on something aswell. Its in the very early stages and is linked in my sig.
-
Mar 14, 2005, 20:56 #4
- Join Date
- Jan 2005
- Location
- Sydney
- Posts
- 43
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by sweatje
Thanks for the others, will update list.
-
Mar 15, 2005, 01:47 #5
- Join Date
- Aug 2004
- Location
- California
- Posts
- 1,672
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
The features vary greatly for each product. There is quite alot of difference.
Here is what some of the projects list as their features:
Metastorage features
* Easy to write and understand component model definition format in XML
* Automatic generation of (database) schema for the persistence container
* Automatic generation of all classes: data classes, factory class and (database) schema installation class
* All code is generated without the need for the developer to write SQL code manually
* A powerful Object Query language lets the developer specify arbitrary search conditions with the same level of complexity as with SQL.
The object queries are pre-compiled and embedded in the generated code to maximize the query execution performance.
* The generated code is very compact. Metastorage performs extensive analysis to only include code that will be actually used according to the type of operations that the developer wants the generated classes to execute.
* The generated code is self-contained and so it does not depend on MetaL or libraries of code that are not supplied
* Generation of classes to create, validate and process Web forms to manage objects of the data classes.
* Automatic generation of Entity-Relationship graphs in UML of the component class diagram
EZPDO
* Minimum SQL knowledge required
* Requires minimum ORM specification
* No Phing! No need of explicit command line compile
* Works with existing code and database
* Has a small runtime core to guarentee performance
* Handles 1:N, and M:N relationships automatically
* Provides a simple runtime API
* Supports object query (EZOQL)
* Auto generates database tables
* Test-driven with continuous integration
Propel Features
* Easily extensible. Use of XML schemas makes it possible to easily integrate with other components driven by your data model (e.g. a form generation tool could also use the same XML schema) or to extend the schema definition to include attributes for other components (e.g. more validation informat for that form tool).
* Easily customizable. The generated object model is built to be customized. All internal calls are made to empty stub classes which extend the classes with generated logic. You can override behavior in the stub classes or provide your own custom business logic without sacrificing the ability to rebuild your object model at a later time.
* Plays nice. This is a way of saying that Propel doesn't force you to use only Propel tools. For example, while you can use the Criteria objects to construct queries without writing SQL, we recognize that Criteria doesn't do everything and so we've also made it easy to use custom SQL to populate generated objects.
* Truly independent. The use of a build process to create customized SQL and PHP classes means that your database interactions with Propel are truly database-independent -- taking advantage of the strenghts of your RDBMS and providing emulation for things your RDBMS doesn't support (e.g. fkey cascading deletes in MySQL). Tools are also provided to easily move data from one RDBMS to another.
* Intuitive, Predictable. Propel's data model definition is follows very closely the structure of the underlying database. This provides the advantage of making Propel easy to understand and also of behaving predictably with very complex data models.
* Advanced. Propel makes the difficult relational problems easy and efficient. For example, Propel provides the ability to populate related (foreign key) objects from a single query. Propel also supports basic (table per class tree) inheritance and other advanced OO features.
DB_DataObject
* Build SQL and execute statements based on the objects variables.
* Group source code around the data that they relate to.
* Provide a simple consistent API to access and manipulate that data.
* A common simple configuration method (for setting database connections)
* A fast and simple store for database descriptions, so primary keys can be used to locate data quickly
* a debugger that enables you to see what exactly it is doing.
* basic data validation - so the strings and integers can be checked.
* Posibility to build complex joins or get related data by secondary calls (links) .
* Ability to create and update your Table specific classes with the current database table variables (see autobuilding)
* Simple to integrate with other packages, with setFrom() and toArray() methodsChristopher
-
Mar 15, 2005, 04:35 #6
- Join Date
- Apr 2004
- Location
- Melbourne
- Posts
- 362
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I actually got around to making a more concise list for Entity:
* All entities mapped to the same database tables: 1 for storing information about the class, 1 for storing all the properties of the class (this has since been broken down into a database table to map to each property type, which is all handled internally).
* Automatically generated editing interfaces for view, edit and administration actions (easy to customise views)
* Simple API for creating, saving, loading and relating entities (no SQL needed)
$book = ClassManager::createObject('Book');
$book ->name = 'The Gunslinger';
$book ->saveObject();
$author = ClassManager::createObject('Author');
$author->name = 'Stephen King';
$author->saveObject();
$book->linkTo($author->objectId());
// Load the author into a new object
$reloadedAuthor = ClassManager::loadObjectById($author->objectId(), 'rw');
* *nix based permission system allowing for user group and world permissions to be set
* Simple but powerful methods for querying and finding entities
* Tree structure provides recognizable heirachical view of entities
* MySQL and SQLite support
* Predefined entity types.
-
Mar 15, 2005, 06:23 #7
- Join Date
- Jun 2004
- Location
- Copenhagen, Denmark
- Posts
- 6,157
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I got a few :
http://www.phpcr.org/
http://www.phpersistence.org/
-
Mar 15, 2005, 21:07 #8
- Join Date
- Jan 2005
- Location
- Sydney
- Posts
- 43
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thanks for all the info.
Might be a better idea to move this to wiki.cc considering the list is a lot bigger than I first imagined, plus the thread will become enormous if we include feature lists, reviews, etc.
-
Mar 16, 2005, 19:36 #9
- Join Date
- Apr 2003
- Location
- London
- Posts
- 2,423
- Mentioned
- 2 Post(s)
- Tagged
- 0 Thread(s)
Hi...
Originally Posted by dylanegan
yours, MarcusMarcus Baker
Testing: SimpleTest, Cgreen, Fakemail
Other: Phemto dependency injector
Books: PHP in Action, 97 things
-
Mar 16, 2005, 20:41 #10
- Join Date
- Jan 2005
- Location
- Sydney
- Posts
- 43
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Yeah, does make sense.
Well the thread is still open. So if the authors of some of these projects or the users would be able to write up a single post one basic use and overall comfort it would be great. Most likely users should be doing the reviewing to make sure there is no bias.
Just amazed at how many there are. Good way to save time by implementing ideas from each other. And even better that they're spread between PHP4 and PHP5.
-
Mar 19, 2005, 10:24 #11
- Join Date
- Mar 2005
- Posts
- 15
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thanks for initiating the thread and the idea of starting a wiki. That will be really helpful for the users. I would be happy to help out with the EZPDO materials. We have just summarized the latest improvements and plans before the official 1.0 release in the coming month.
-
Mar 19, 2005, 17:05 #12
- Join Date
- Jan 2005
- Location
- Sydney
- Posts
- 43
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by nauhygon
-
Apr 21, 2005, 12:11 #13
- Join Date
- May 2003
- Location
- Laval
- Posts
- 12
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Hi,
I looking for an object persistance product for a project I'm working on. I cheked all of the software mentionned above and Propel seems the more appealing. However, it looks like it does not handle inheritance very well as it requires all the fields of the sub classes to be in the table for the base classe (even if the base class doesn't need them).
Basically, we have a "Server" class which should be mapped to a "servers" table and which has some properties. Then we have a "LinuxServer" class which inherit from the "Server" class. I'm looking for a product that would allow me to have a "servers" table containing all the properties of the "Server" class and a "linux_servers" table which would contain only the properties of "LinuxServer" which are not covered by the "server" table.
Does any of the above mentionned products fullfills this requirement ?
Thanks for your help.
-
Apr 21, 2005, 12:54 #14
- Join Date
- Jun 2004
- Location
- Copenhagen, Denmark
- Posts
- 6,157
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
it seems to be a problem with all the currently available orm-api's for php that they are table-centric, and thus doesn't hande inheritance very well. i'm not sure, but i think that ezpdo may be supporting this kind of mapping. anybody who can verify this ?
-
Apr 21, 2005, 13:16 #15
- Join Date
- May 2003
- Location
- Calgary, Alberta, Canada
- Posts
- 275
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by kyberfabrikken
EDIT:
Actually Perdure (see signature) probably supports this. Perdure on a whole may be too immature to use in a production environment at this time though. The only QA it has had is the tests.
For perdure the mapping file would need to look like:
PHP Code:<persistence>
<class name="Server" table="servers">
<field name="id" type="int" column="server_id" dbtype="INT(10)">
<id/>
</field>
<field name="name" type="string" column="server_name" dbtype="VARCHAR(64)"/>
</class>
<class name="LinuxServer" table="servers">
<field name="id" type="int" column="server_id" dbtype="INT(10)">
<id/>
</field>
<field name="name" type="string" column="server_name" dbtype="VARCHAR(64)"/>
<field name="linuxSpecialColumn" type="string" column="linux_special" dbtype="VARCHAR(64)"/>
</class>
</persistence>
Last edited by Brenden Vickery; Apr 21, 2005 at 13:53.
-
Apr 21, 2005, 14:19 #16
- Join Date
- Mar 2005
- Posts
- 15
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by kyberfabrikken
Code:@orm ... exclude_superclass
-
Apr 21, 2005, 14:26 #17
- Join Date
- May 2003
- Location
- Laval
- Posts
- 12
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thanks all for your replies. Could you please explain a bit how to do it with ezpdo with exclude_superclass ?
Thanks.
-
Apr 21, 2005, 14:38 #18
- Join Date
- Mar 2005
- Posts
- 15
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by illogix
back to your problem. not sure how important it is for you to avoid mapping the superclass. for now, if you use EZPDO, the only cost of not excluding the parent class is some wasted columns in the table. not optimal in terms of storage efficiency, but perhaps it doesn't matter much if you are not dealing with large tables (that have many columns).
hope it helps.
-
Apr 21, 2005, 14:41 #19
- Join Date
- May 2003
- Location
- Laval
- Posts
- 12
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
OK Thanks.
Well that's the problem. We have multiple subclasses and each one has more than 20 fields.
I guess I'll have to do the object mapping by hand.
Thanks for your help.
-
Apr 21, 2005, 14:58 #20
- Join Date
- Mar 2005
- Posts
- 15
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by illogix
wondering the reason of excluding the superclass. if you don't want the data members to be persisted for all the subclasses, you simply don't insert any @orm tags (assuming EZPDO is used).
is it possible that you replace inheritence with composition/association? see if this gives you any useful ideas.Last edited by nauhygon; Apr 22, 2005 at 06:44.
-
Apr 21, 2005, 19:53 #21
- Join Date
- May 2003
- Location
- Calgary, Alberta, Canada
- Posts
- 275
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by Brenden Vickery
Last edited by Brenden Vickery; Apr 21, 2005 at 23:07.
-
Apr 21, 2005, 21:54 #22
- Join Date
- Jan 2005
- Location
- Sydney
- Posts
- 43
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I write PPO and I would be interested in adding this feature. I think it would be very easy to implement, hopefully I can get around to it soon.
-
Sep 24, 2005, 00:02 #23
- Join Date
- Sep 2005
- Posts
- 15
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Propel ORM
Hi everyone, i am a student of information Systems and i would like to know
how to use propel to model many to many relationships.furthermore
i need sample codes to be able to know how to retrieve from propel...
i have a database consits of persons and images table which are all related to each other or some are related to a specific number of people in the table...
i want to retrieve all people even indirectly related to say person x..
and person x is related to P2 and p2 to p3 and so on.so i need to retrieve all
these persons.in the above scenario person p3 is indirectly related to x,the query should also not neglect the other related persons...
can such a complex query be done in propel.....
if so could someone help me out please........
-
Sep 25, 2005, 09:46 #24
- Join Date
- Apr 2002
- Posts
- 330
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by Brenden Vickery
Manuel Lemos
Metastorage - Data object relational mapping layer generator
PHP Classes - Free ready to use OOP components in PHP
-
Oct 9, 2005, 02:24 #25
- Join Date
- Sep 2005
- Posts
- 15
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
help on installing propel under windows
i would like to know how to configure and install propel under windows xp....
am using wamp also to run php scripts....so anyone can help me out please how to merge propel and wamp.....i had a look at bthe guide am a bit lost coz am a newbie in linux....
Bookmarks