Page under construction
MinuteProject is for You!

As a user you can use the tracks and templates that are provided. But sometimes you can also decide to extend them and to create your own templates on top of a Database (or a WSDL in release 0.7).
This page describes how to extend minuteproject in order to generate your own set of artifacts.
You will learn how-to:
  • Create a template
  • Package template
  • Create a track
It is useful for any developer/contributer that what to create a reverse-engineering solutions for any target technologies (PHP, C#... java, ...).

Operating Principle

Minuteproject operates with a main configuration that does 5 main things:
- load models (structured data information)
- enrich it (a pk when missing, apply conventions etc..., aliasing)
- apply conventions
- load target template
- generate accordingly.

mp-operating-principle.jpg

Defintion

A track defines a target technology/framework.
A track contains one or multiple target.
A target defines a bundle of template that acts together.
A target contains multiple template-target (logical bunch of artifacts that are generally generated for the same specified directory)
A target contains also the plugins that you will use for your templates.
A template-target contains the set of template.
A template element describe the metadata a template needs for the generation (file type, name composition, directory structure, to which type of generation it belongs, restrictions, the velocity template to use)

Create Template : Relational Database context

Template scope

Minuteproject can generate Database Artifacts different level or scope
- application level (ex: pom.xml)
- model level (ex: spring configuration, Connection pool...)
- package level (entities are gather into package) (ex: menu, java package ...)
- entities (tables, views) (ex: JPA2, RESTResources ...)
- stored-procedures (ex: DTO)
- field (ex: enumerations, check constraint, drop down list...)

Create Template

To create a template you need two things:
  • The template itself. Minuteproject template are done in velocity.
  • The template metadata defining the directory path, name, extension of the resulting template. For more detail go to template metadata.

Default Objects

By default the template populate by a set of object (java) from which you call methods

Entity-scope template

By default the template is populate with the object variable 'table' that you can call via $table.xxx
TODO sample template

TODO associated metadata
...

Field-scope template

By default the template is populate with the object variable 'column' that you can call via $column.xxx
TODO sample template

TODO associated metadata

Package-scope template

By default the template is populate with the object variable 'package' that you can call via $package.xxx
TODO sample template

TODO associated metadata

Model-scope template

TODO sample template

TODO associated metadata

Application-scope template

TODO sample template

TODO associated metadata

Template misc snippets

Add updatable portion TODO

Add plugin TODO

Add library TODO

Reference other template location TODO

Add properties to template TODO

Define Template metadata

Template Metadata provides information used by the generator to write the artefact.
Metadata contains:
  • file name composition
  • file extension
  • file directory path composition
  • logical name
  • template scope
  • has updatable nature

Package templates

The templates are packaged into target-template.
Define plugins
//TODO

Use track

//TODO