New Propel Project


This tutorial shows how simple it is to start a new project using Skipper. We are going to create Propel ORM project with two packages and four entities. Export of the created project to Propel .xml schema definition files is also part of this tutorial.

Hint: See the ORM Model basics for detailed desription of ORM elements (e.g. package, entity).

New project

First step is to create a new project with Propel ORM framework support. Simply select the New ORM Project from File menu and follow the steps shown in the pictures below.

Select New Propel ORM Project in Skipper new project wizard
Select Propel ORM in Skipper new project wizard
Select Symfony framework in Skipper new project wizard

Set Propel project name and directory
New Propel ORM project summary screen
New Propel ORM project with default model in Skipper visual model

Application model design

Now we are going to design a simple application with two packagees and four entities. The first packagele will serve as contact records, the second package as ecommerce logic. Contact package stores data about customers and their addresses, ecommerce package stores data about orders and their items. Ecommerce order also has a relation with contact to store order owner. You can do it this way:

Select Propel entity tool in Skipper visual model
Configure new Propel entity in Skipper visual model</a>
New Propel entity created in Skipper visual model
Select Propel association tool in Skipper visual model
Configure new Propel association in Skipper visual model
New Propel association created in Skipper visual model
Select Skipper comment tool
Configure new Skipper comment
New Skipper comment created
Select Propel package tool in Skipper visual model
Configure new Propel package in Skipper visual model
New Propel package created in Skipper visual model
Create Propel ecommerce entities in Skipper visual model
Create Propel association between order and contact

Export model

Now that you have created the application model, next step is to export it to Propel schema definition files. Before Skipper generates all files for you, it is necessary to configure schema file destinations and export formats.

In Skipper each package represents single exportable element. This means that now we are able to export two schema definition files, one for Contacts and one for Ecommerce package. Each package can have its own export path, which is relative to project root directory and its own export format. For Propel ORM it is XML and YML.

Edit Propel package settings in Skipper file menu
Configure Propel schema definition files export settings in Skipper
Click Export to ORM icon to generate Propel schema definitions
Propel schema definition files export settings window
Propel project schema definitions export results
Exported Propel YML files

And here is an example of the Address entity. As you can see everything is well formatted and exported to Propel XML format.

<database name="Contact">
  <table_ name="Address" description="Contact address">
    <column name="id" type="integer" required="true" autoIncrement="true" primaryKey="true"/>
    <column name="name" type="string"/>
    <column name="street" type="string"/>
    <column name="city" type="string"/>
    <column name="postcode" type="string"/>
    <column name="country" type="string" required="true"/>
    <column name="contact_id" type="integer" required="true"/>
    <unique name="IX_UQ_Address_id">
      <unique-column name="id"/>
    </unique>
    <foreign-key foreignTable="Contact">
      <reference foreign="id" local="contact_id"/>
    </foreign-key>
  </table_>
  ...
</database>

Note: Because of HTML formating problem we used table_ tag instead of table.

Conclusion

This short tutorial shows that to create new project and export it to schema definition files takes no more than five minutes in Skipper (if it is your first try, it may take little longer). Compare it with manual writing of such small project, and the acceleration of work is breathtaking. And in addition, you can concentrate only on the creative part of your work.

Video Tutorials

Create new project

Export project