Thursday, October 3, 2013

minuteproject 4 propel motivations

Propel is based on some forward engineering technics that creates your Php Object Domain and ORM classes for your based on a file describing your model.

Propel ORM also offers reverse-engineering facilities to generate this input file.
Minuteproject meanwhile creates a track for propel. Why? What are the motivations?

Minuteproject 4 propel track will be delivered in version 0.8.5.

Polyglot generator

Minuteproject was essentially generating java framework oriented artifact but the php tracks with propel and soon doctrine offers another perspective.
Whatever your language and your framework, minuteproject can offer you reverse-engineering facilities.

Get Php knowledge

Testing with php was quite easy and interesting.

Propel specifics

As mentionned previously Propel offers reverse-engineering solution.

Interesting points

Their solutions is interesting because for each database Propel support the tool issue database query-specific-data-dictionnary lookup. It is the same philosophy that JOOQ framework with JOOQ meta is following.

Minuteproject 4 propel advantages

Propel reverse-engineering solution propose raw reverse-engineering, while minuteproject offers you the possibility to make a reverse-analysis before.


All the enrichment facilities are available for Propel track. Which means that you can have smart reverse-engineering aspects:
  • Alias for tables (DB table naming convention can differ from you Php classes conventions)
    • In schema.xml 'name' is filled by DB name and phpName by your given name.
  • Alias for columns same principle as above
  • Apply alias (column or view) globally by conventions or individually
    • Ex tables starting with T_ such as T_USER can get User in php.
    • Ex field ending with FK (ex PRODUCT_FK) have the variable $product.
  • Granularity select only tables or views you need
    • No need to reverse-engineer all the entities

Multiple artifacts

Minuteproject 4 propel generate other artifacts such as
  • runtime-conf.xml
  • command line scripts
  • setup.php

Updatable code

Generator tools are often see as generate once and no more...
It is not the case of minuteproject!

The code that you generate is updatable! 
If you do not like it change it! 
If it misses something add it!

Next time you generate YOUR ALTERATIONS WILL BE KEPT!

This is call updatable code feature. And all the minuteproject 4 propel templates have this feature!

Which means that if you do not like what  you have in the schema.xml node you can change them. If your model changes add couples of db object (table/view), change cardinality between objects, the next time you generate, new object and relationship will be added BUT your modification (ex table phpName) will be kept!

No comments:

Post a Comment