That's pretty cool. I like the method chaining.<p>There's definitely a need for a 'great' PHP ORM. I've been rolling my own for a couple of years since I've never been satisfied with what's out there. Here's the kind of syntax/style I use on mine (that class definition is the entire code I need to write to get working abstraction).<p>class Person extends Model {<p>const TABLE_NAME = 'people';<p>const TABLE_KEY = 'id';<p>}<p>$person = Model::find("Person", 1234);<p>$person->name = "James";<p>$person->save();<p>$persons_named_james = Model::find("Person", array("name" => "James"));<p>foreach($persons_named_james as $person) {<p>print $person->age;<p>}<p>$person = new Person();<p>$person->age = 26;<p>$person->save();<p>I should really upgrade to 5.3 so I could write Person::find(1234); instead.
Looks alright. I'll try it out sometime.<p>I've been using Idiorm - <a href="http://github.com/j4mie/idiorm" rel="nofollow">http://github.com/j4mie/idiorm</a> (used it on Weekis - <a href="http://weekis.com" rel="nofollow">http://weekis.com</a>). It works really well for small-medium scale apps.<p>I can't be bothered with the bloat of some of the PHP Frameworks out there.
it looks very nice, really!<p>* do you write all your code without comments, or do you strip them out afterwards to get to save locs? imho you should forget the 200 loc constraint and make your code pretty instead - it looks anorectic. seesh, yes i know the 200 loc promise is your main selling point to make the project stand out ;)<p>* a namespace would be a good idea here. "Builder", "Db" and "ResultSet" aren't that uncommon.<p>* defining the connection credentials as a class with consts smells <i>funny</i>.
Nice but is there any mention in the article about support for just writing plain old SQL? I love the ideas of ORMs (my app now currently uses SQLAlchemy) but I find myself dropping back to SQL when things get a little complex. I think new age ORMs should leave support for dropping back to SQL. Cool project nonetheless.
I checked the site, I checked Github, but I still have no idea what "ORM" means.<p>Wikipedia suggests several different meanings which seem to fit: Object-relational mapping, Object role modeling, Online Reputation Management, Online research methods, Outsourcing Relationship Management
I like it very much. Now I want to build something just to play with it.<p>It's awesome how much cool stuff can be accomplished when not supporting PHP4. I'd like to see more libraries taking advantage of 5.3<p>Have you thought of using pearhub.org for distribution?