5. Target Techno Ecosystem
REST REST JSF
Vaadin
CXF SpringMVC Primefaces
JSF REST Spring configuration
WS
Primefaces Jersey DAO – ORM integration
EJB – CDI – DAO
DAO layer
Layer
Under investigation
JPA2 JPA (2/1) Hibernate iBatis
First Release
OpenXava FitNesse
Mature
JOOQ MinuteProject
Tutorial Rails Roo
Generator
Under development
Grails
Automated
Business Benerator
Logic
Play
Load model
Enrich
Generate
6. Techno Demos
REST REST JSF
Vaadin
CXF SpringMVC Primefaces
JSF REST Spring configuration
WS
Primefaces Jersey DAO – ORM integration
EJB – CDI – DAO
Layer DAO layer
DEMOS
JPA2 JPA2 Hibernate iBatis
OpenXava FitNesse
JOOQ MinuteProject
Tutorial Rails Roo
Generator
Grails
Automated
Business Benerator
Logic
Play
Load model
Enrich
Generate
7. Why MinuteProject?
• Why code generation?
• Do not reinvent the wheel
– i.e. let the others do the framework/specs
• Crystallize your knowledge
• Go fast and customise
• Reverse-Engineering is not a one shot process
8. When to use it?
• Legacy model upgrades to new tech
• Work from scratch:
– Development tool
– Iterative methodology
• Your own model as your technology tutorial
9. MP generated Artifacts
Operating Mechanism
Target
MP engine
Technologies B
Generates
Target
Technologies A
Loads
Uses DB model
structure
Applies
templates
MP main config
Loads metadata Enriches model
Target Technology A/B
Database model Templates
11. Demo 1 - explanations
• Start from scratch
• Generate from the console & command line
• Review artifacts
• Write a unit test
12. Customisation
• Art of enrichment
• Art of reverse-analysis
• Configure model/target
Configuration options
Individual (fine grain)
Global (declarative conventions)
http://minuteproject.wikispaces.com/Convention
14. Demo 2 - explanations
• Start from scratch
• Generate from the console & command line
• Review artifacts
• Write a unit test
• Secure modified code
15. Integration Technics
2 standards
• integration by extension
• integration by overriding
MP adds a new one
• integration by alteration/mutation
• 3 types of alteration
– artifact level (exclude for next generation)
– added section
– updatable section
16. Demo 3 - REST
Architecture blocks
CXF S
P
R
DAO I
N
JPA2 G
http://minuteproject.blogspot.be/2012/05/rigajug-demo-rest-cxf.html
17. Demo 3 - explanations
• Start from scratch
• Artifacts review:
– CXF track
– Spring config
– Backend DAO
– JPA2
– Maven projects
• Deploy and test on Tomcat
• Test URL
18. SDD – Statement Driven Dev.
• Sometimes statements are just enough
• Model is secondary
• You just need:
– Statement ex: query
– I/O
19. SDD example
Start from an SQL query
to deduce function and output
select k.key_name, t.translation,
t.date_finalization, l.code, l.description,
tl.first_name, tl.last_name, tl.email
from translation t, language l, user tl,
translation_key k
where
t.language_id = l.idlanguage
and tl.idUser = t.translator_id
and k.id = t.key_id
order by key_name
20. SDD example
Provide some input
select k.key_name, t.translation,
t.date_finalization, l.code, l.description,
tl.first_name, tl.last_name, tl.email
from translation t, language l, user tl,
translation_key k
where
t.language_id = l.idlanguage
and tl.idUser = t.translator_id
and k.id = t.key_id
and k.key_name like ?
and l.code like ?
order by key_name
limit ?
21. SDD - example
Feed statement into Minuteproject
<query name="get translation info">
<query-body>
<value>
<![CDATA[select
k.key_name, t.translation, t.date_finalization, l.code, l.des
cription, tl.first_name, tl.last_name, tl.email from
translation t, language l, user tl, translation_key k where
t.language_id = l.idlanguage and tl.idUser =
t.translator_id and k.id = t.key_id and k.key_name like ?
and l.code like ? order by key_name limit ?]]>
</value>
</query-body>
23. Demo 4
SDD is WYSIWYG
what you STATE is what you get
http://minuteproject.blogspot.be/2012/05/rigajug-demo-rest-sdd.html
24. Goodies
Why not have a JEE web app instantly
OpenXava app generation
• Is a RAD Open Source JEE framework based on
JPA2
• Has front-end rendering annotation on
entities
• Is AJAX