In an application that uses a database it is very common that you have lots of SQL-queries, that only differ in very small parts, and boring to write. By using a persistency framework you can avoid having to write most of these queries and save a lot of time. Once you discover the power of a persistency framework such as Hibernate, you'll probably never want to work again without such a library.
After having used Hibernate and NHibernate in some projects, i wanted to have a similar framework for PHP. While there are several solutions, i didn't really found what i was looking for. Either they were just too simple, they required you to adapt some design, like inheriting from a specific class, or they were very heavy, such as Propel.
I wanted an easy to use and small framework, which doesn't require you to adapt special design patterns. These are the key feature i keep in mind for SiPPF.
After configuration, which is rather straigthforward and comparable to Hibernate configuration, storing and loading an entity from your database is as simple as:
1 2 3 4 56 7 8 9 1011 12
//get the sippf instance and connect $sippf = SiPPF_SiPPF::getInstance(); $sippf->connect("dbbms://user:pwd@host/dbname"); //create a new person, which will be stored in the database$person = new Person("name", 22); //store the entity $sippf->persistObject($person); //load the person with ID 1 $anotherPerson = $sippf->loadObject(1, 'Person');