Jump to content
The Uniform Server Community

Propel Integration Bundle


Hannes
 Share

Recommended Posts

FIRST:

Propel is an object relational mapper for Databases. A ORM makes Objects from your tables and you don't have to write any SQL. For example:

"INSERT INTO books (author_id, title, isbn) VALUES (1, 'Title', '1234')"

will become:

$book = new Book();

$book->setAuthorId(1);

$book->setTitle('Title');

$book->setIsbn('1234');

$book->save();

 

And now the Story:

 

Hello Uniform Server Team,

 

i use Uniform Server now for a few years. And developing with it is so genial. One day, i tried to install Propel without PEAR, because PEAR is sometimes not available on WebSpace (and PHP4) and it took me lots of time to make it work - even it is so practical.

 

So I decided to make a package for Uniform Server 3.5.

 

Well, let me explain what's in there. It consists of two parts the core and a small example - so you can easily check if it works or not. It's still beta and I want some people to use it to find some Bugs - there is one bug I already know -

 

IT DOES NOT WORK IF ANY PATH CONTAINS SPACES LIKE IN "UNIFORM SERVER" SO YOU HAVE TO RENAME THE SERVER MAYBE IN "UNISERVER" - this is caused by the DOS-Batch Files.

 

I've bundled also a DBDesignerXML 2 PropelXML Tool, which I found on the Propel-Sites (http://propel.phpdb.org/trac/).

 

To use this package do the following:

Download a fresh Version of Uniform Server 3.5. - even it should not harm existing Systems, i wouldn't bet on it. Extract the packages over Uniform Server and rename afterwards the "Uniform Server" directory to a name without spaces. I recommend to extract both packages.

 

There are three directorys in /www:

 

1st DBDesigner2Propel:

If u use http://www.fabforce.net/dbdesigner4 you can create Propel-XML-Files from the Databasesheets created by DBDesigner - therefor copy the DBDesigner Databasescheme into /www/DBDesigner2Propel and hit build.bat. The Output should be a new Directory with a schema.xml file which can be used with Propel.

 

2nd Example (if Example Package is extracted):

Example is a simple Implemantation of a running Propel System with SQLite Database as Backend. And the bookstore sample from the propel website.

 

3rd Propel:

This contains the core components of propel. But it also contains the Directorys where u have to create your Object Relational Mapper Classes. Therefor go to /propel/protected/model and place your files, afterwards hit build.bat and a new directory with all required classes should appear.

 

If you have extracted the example package you will find 2 samples. One with MySQL the other one with SQLite - this is the package behind the running Application in /www/Example (see 2nd).

 

After you created your ORClasses you haven't finished. To run your propel system you have to make something like in /www/Example - it doesn't run on it's own.

 

So please try it and tell me what hasn't work.

 

Greetings from Germany

Hannes

Propel_Core_for_UniServer.zip

Propel_Example_for_UniServer.zip

Link to comment
Share on other sites

  • 8 months later...

There are some news about Propel. A few days ago they released 1.3.0RC1. The bundled version in the package above is - i didn't know exactly - something around 1.3.0 beta 2.

 

Another interesting thing is that you can build Propel schemes with the new MySQL Workbench by adding a plugin (see more information on http://www.diloc.de/blog/2008/05/27/mysql-...export-plugin/). The MySQL workbench is located at http://dev.mysql.com/workbench/ .

 

I also want to mention a fork of DBDesigner, that is more comfortable than DBDesigner (which makes sometimes a little trouble) but acts the same way ( http://sourceforge.net/projects/dbdesigner-fork ).

Link to comment
Share on other sites

  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...