The Andrew Drane Blog

March 20, 2009

SSORM Pushed to Github

Filed under: Uncategorized — admin @ 10:01 am

So I’ve started an open source project called SSORM. It is a “Super Simple Object Relational Mapper” in PHP.

Why? This is easy to use. So easy that it hurts. You can use the framework as an editor and then put your little objects all over your website. There are very few boundaries. SSORM gives you a bunch of tools that you can modify too. This is not meant to be the most complete, it will never be as robust as Cake PHP. I want this to be very very easy to use. I hope to eventually cut the number of steps in half.

Example situation: Let’s say you have a client who wants to make a website for wines from different vineyards. It’s a basic 1->many database relationship, as in a vineyard has many wines.

Step 1 - download the SSORM package from github.
git:// for your Git users

Step 2 - enter the database info. Remove ‘.tmp’ from the name of the file config/db_config.php.tmp. Open it up and enter your db information.

Step 3 - generate some models. This is coming either today (3-20-09) or tomorrow
sh Vineyard vineyards description:text
sh Wine wines name:string description:text vineyard_id:int
It's not yet smart enough to recognize plurals, so that's why you are enter both Wine and vineyards. Why is wine capitalized? It's the class name, which is capitalized by PHP convention.

Step 4 - edit the Wine and Vineyards classes to establish the relationship
(instructions coming soon!)

Step 5 - run the migrations (you may need to upload your files to the server)
point browser to /config/db_tables.php

You are all set up!

By default, the index pages for wines and vineyards are

More here:

I will come up with some better examples soon! I am trying to do a push a day. I welcome any comments, criticizms etc.

No Comments

No comments yet.

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Powered by WordPress