SlideShare a Scribd company logo
1 of 19
Download to read offline
JL-1




                        Roma <Meta>
                         Framework
            Introduction and main concepts

      Luca Garulli
   CTO@AssetData.it             CTO at AssetData, Technical Manager
                                 at Romulus consortium, Author of
http://zion-city.blogspot.com   Roma Framework and OrientDB Open
 http://twitter.com/lgarulli              Source projects
Development Scenario I
     Choose the right framework between hundreds

Each framework is proprietary,
so migration is too much
difficult, or sometimes
impossible


  Learning curve often is steep
   and requires a lot of time to
learn before to understand if it's
       the right one for us
                             2
Development Scenario II
           What happens if you
         discover that the tool or
       the framework you choose
          doesn’t support some
        features we need or that
           the best choice was
              another one?

        Changing it’s too costly,
        sometime “impossible”
         3
Do you need a <meta> framework?

   Set of behavior interfaces instead of
          framework APIs directly.

The aim is to cover the 80-90% of the most
common use cases. For the uncovered 10-
      20% you can use the framework
         implementation directly

Migration to another supported framework
        without change the code

                     4
Domain centric view
                                Echo2     Janiculum                                 Modules can
                                                                                      implement
           JDO                                                     Java
                                                                 Resource           aspects of the
      JPA                               View                      Bundle           meta-framework
                                                    Internatio
                 Persistence
                 (repository)                       nalization
                                                      (I18N)                             CRUD
                                   Domain
                                    model                                                 Login
Custom,                                                                     Http
            Authentication            and             Session
 LDAP                              business
                                                                       Portlet        User & Profile
                                     logic
                                                                                          Jetty
                   Workflow                         Others

                                   Monitoring
          Tevere                                          Aspects define the
                                                              interfaces
                                        JMX               (behaviour) of the
                                                           meta-framework
                                                5
Aspects
 Authentication •Scheduler
       •Flow                   •Security
   •Enterprise                •Semantic
       •Hook                •Serialization
•I18n (internationalization) •Service
     •Logging                   •Session
   •Monitoring               •Validation
  •Persistence                   •View
     •Registry                •Workflow
    •Reporting
            6
POJO is the answer for all



•POJO       •
            •
•(Plain Old Java Object)


            7
Everything is a POJO
  •The application model is composed by
                  POJOs
                    •
•The domain entities synchronized with the
          database are POJOs

 The Business Logic is written in POJOs
                   •
     •The Web Services are POJOs
                   •
        •Guess the Web pages?
                    8
Enriched Meta Model I
•Roma auto discovers all the model
              of your
    •application and generate:
            •
         •Forms,
     •Database tables
 •OR-mapping configuration,
      •Web services,
     •and much more!
                9
Enriched Meta Model II
    •But Java as language is not enough to
 express a complete model. What means this?
                      •
•private List<Contact> contacts;
                         •
  •Is it a relationship? 1-N or N-M? If yes it's
                 embedded or not?
                         •
•How can I render it in my Web Page?

       •A List, a Table or a Select field?
                        10
Enriched Meta Model III
     •We need a way to enrich the meta-model using
       Java5+ Annotations or Xml Annotations
•ContactInstance.java:
•
•public class ContactInstance{
• @ViewField(render = ViewConstants.RENDER_TABLE) Java5+ Annotations pro:
• private List<Contact> contacts;                      All in one file,
•}                                                     faster to write

                                 •ContactInstance.xml:
                                 •
                                 •<?xml version="1.0"?>
    Xml Annotations pro:         •<class>
                                 • <fields>
  Use of separate files so the   •    <field name="contacts">
  Java sources remain clean      •      <aspects>
                                 •        <view render="table"/>
                                 •      </aspects>
                                 •    </field>
                                 • </fields>
                                 •</class> 11
Auto rendering: POJO instead
                  of GUI components
•public class User {
• private String name;
• private String surname;
• private City   city;
• private String web;
•
• @ViewField(render=”textarea”)
• private String notes;
•
• public void ok(){...}
• public void cancel(){...}
• public void print(){...}
•}
                     12
Auto rendering: POJO → Form




          13
Binding POJO ↔ Form




   14
Composite Forms
      •To build complex forms you need to composite
                   POJOs all together
•ContactInstance.java:
•
•public class ContactForm {
• @ViewField(render = “objectembedded”, label=”Personal Information”)
• private Contact me;
•
• @ViewField(render = “tab”)
• private Contact[] colleagues = new Contact[]{
•                                  new Contact(“Joy”,“Miner”),
•                                  new Contact(“Tim”, “King”) };
•
• @ViewField(style = “{width: 400px;}”)
• private String description;
•
• public void sendEmail(){
•   ...
• }
•}
                                   15
Extension by composition I
     Classic Inheritance                Extension by Composition

                                         ComposedEntityInstance
           Employee
                                             <Employee>




        EmployeeFilter                          EmployeeFilter


Doesn't work very well with some        All Employee fields and actions
frameworks such as JDO and              are merged with Employee ones.
Hibernate: you need to use the          You can override fields, actions
class declared in the ORMapping         and events just redefine it in the
tool and not its extension.             EmployeeFilter class. The object
                                        contained is in the field called
                                        “entity”.
                                   16
Extension by composition II




           17
Getting started!
Connect to http://www.romaframework.org

         Download latest version

         Download the Handbook

         Start with the first tutorial

   Ask to the forum or the online support

                   Enjoy!
                        18
Demo pleeeease!




 19

More Related Content

What's hot

C# .NET Developer Portfolio
C# .NET Developer PortfolioC# .NET Developer Portfolio
C# .NET Developer Portfolio
cummings49
 
Jdbc Lecture5
Jdbc Lecture5Jdbc Lecture5
Jdbc Lecture5
phanleson
 

What's hot (19)

EJB3 Advance Features
EJB3 Advance FeaturesEJB3 Advance Features
EJB3 Advance Features
 
Ejb3 Presentation
Ejb3 PresentationEjb3 Presentation
Ejb3 Presentation
 
C# .NET Developer Portfolio
C# .NET Developer PortfolioC# .NET Developer Portfolio
C# .NET Developer Portfolio
 
Jdbc Lecture5
Jdbc Lecture5Jdbc Lecture5
Jdbc Lecture5
 
Spring Framework-II
Spring Framework-IISpring Framework-II
Spring Framework-II
 
Enterprise Java Beans 3 - Business Logic
Enterprise Java Beans 3 - Business LogicEnterprise Java Beans 3 - Business Logic
Enterprise Java Beans 3 - Business Logic
 
Spring & hibernate
Spring & hibernateSpring & hibernate
Spring & hibernate
 
Hibernate 18052012
Hibernate 18052012Hibernate 18052012
Hibernate 18052012
 
Mike Taulty MIX10 Silverlight 4 Patterns Frameworks
Mike Taulty MIX10 Silverlight 4 Patterns FrameworksMike Taulty MIX10 Silverlight 4 Patterns Frameworks
Mike Taulty MIX10 Silverlight 4 Patterns Frameworks
 
Hibernate II
Hibernate IIHibernate II
Hibernate II
 
Skillwise EJB3.0 training
Skillwise EJB3.0 trainingSkillwise EJB3.0 training
Skillwise EJB3.0 training
 
Unit 06: The Web Application Extension for UML
Unit 06: The Web Application Extension for UMLUnit 06: The Web Application Extension for UML
Unit 06: The Web Application Extension for UML
 
Spring 2
Spring 2Spring 2
Spring 2
 
Java bean
Java beanJava bean
Java bean
 
TY.BSc.IT Java QB U5&6
TY.BSc.IT Java QB U5&6TY.BSc.IT Java QB U5&6
TY.BSc.IT Java QB U5&6
 
Enterprise Java Beans - EJB
Enterprise Java Beans - EJBEnterprise Java Beans - EJB
Enterprise Java Beans - EJB
 
Java EE and Glassfish
Java EE and GlassfishJava EE and Glassfish
Java EE and Glassfish
 
Jsf Framework
Jsf FrameworkJsf Framework
Jsf Framework
 
Struts 2 - Introduction
Struts 2 - Introduction Struts 2 - Introduction
Struts 2 - Introduction
 

Similar to Roma introduction and concepts

Model Driven Architecture (MDA): Motivations, Status & Future
Model Driven Architecture (MDA): Motivations, Status & FutureModel Driven Architecture (MDA): Motivations, Status & Future
Model Driven Architecture (MDA): Motivations, Status & Future
elliando dias
 
Hibernate Interview Questions
Hibernate Interview QuestionsHibernate Interview Questions
Hibernate Interview Questions
Syed Shahul
 
Hibernate reference1
Hibernate reference1Hibernate reference1
Hibernate reference1
chandra mouli
 
Session 1 Tp1
Session 1 Tp1Session 1 Tp1
Session 1 Tp1
phanleson
 
The Java Content Repository
The Java Content RepositoryThe Java Content Repository
The Java Content Repository
nobby
 
Accessing Your Existing SAP NetWeaver Portal on Mobile Device
Accessing Your Existing SAP NetWeaver Portal on Mobile DeviceAccessing Your Existing SAP NetWeaver Portal on Mobile Device
Accessing Your Existing SAP NetWeaver Portal on Mobile Device
SAP Portal
 
Client Object Model - SharePoint Extreme 2012
Client Object Model - SharePoint Extreme 2012Client Object Model - SharePoint Extreme 2012
Client Object Model - SharePoint Extreme 2012
daniel plocker
 

Similar to Roma introduction and concepts (20)

Django è pronto per l'Enterprise
Django è pronto per l'EnterpriseDjango è pronto per l'Enterprise
Django è pronto per l'Enterprise
 
.Net template solution architecture
.Net template solution architecture.Net template solution architecture
.Net template solution architecture
 
IT Governance Portals
IT Governance   PortalsIT Governance   Portals
IT Governance Portals
 
Hibernate interview questions
Hibernate interview questionsHibernate interview questions
Hibernate interview questions
 
Hibernate basics
Hibernate basicsHibernate basics
Hibernate basics
 
Java Hibernate Basics
Java Hibernate BasicsJava Hibernate Basics
Java Hibernate Basics
 
Framework Engineering
Framework EngineeringFramework Engineering
Framework Engineering
 
Model Driven Architecture (MDA): Motivations, Status & Future
Model Driven Architecture (MDA): Motivations, Status & FutureModel Driven Architecture (MDA): Motivations, Status & Future
Model Driven Architecture (MDA): Motivations, Status & Future
 
Spring
SpringSpring
Spring
 
SnapLogic corporate presentation
SnapLogic corporate presentationSnapLogic corporate presentation
SnapLogic corporate presentation
 
Hibernate Interview Questions
Hibernate Interview QuestionsHibernate Interview Questions
Hibernate Interview Questions
 
Hibernate reference1
Hibernate reference1Hibernate reference1
Hibernate reference1
 
Session 1 Tp1
Session 1 Tp1Session 1 Tp1
Session 1 Tp1
 
04.egovFrame Runtime Environment Workshop
04.egovFrame Runtime Environment Workshop04.egovFrame Runtime Environment Workshop
04.egovFrame Runtime Environment Workshop
 
The Java Content Repository
The Java Content RepositoryThe Java Content Repository
The Java Content Repository
 
40020
4002040020
40020
 
40020
4002040020
40020
 
Tu1 1 5l
Tu1 1 5lTu1 1 5l
Tu1 1 5l
 
Accessing Your Existing SAP NetWeaver Portal on Mobile Device
Accessing Your Existing SAP NetWeaver Portal on Mobile DeviceAccessing Your Existing SAP NetWeaver Portal on Mobile Device
Accessing Your Existing SAP NetWeaver Portal on Mobile Device
 
Client Object Model - SharePoint Extreme 2012
Client Object Model - SharePoint Extreme 2012Client Object Model - SharePoint Extreme 2012
Client Object Model - SharePoint Extreme 2012
 

More from Luca Garulli

Why relationships are cool but join sucks - Big Data & Graphs in Rome
Why relationships are cool but join sucks - Big Data & Graphs in RomeWhy relationships are cool but join sucks - Big Data & Graphs in Rome
Why relationships are cool but join sucks - Big Data & Graphs in Rome
Luca Garulli
 
Switching from Relational 2 Graph - CloudConf.it
Switching from Relational 2 Graph - CloudConf.itSwitching from Relational 2 Graph - CloudConf.it
Switching from Relational 2 Graph - CloudConf.it
Luca Garulli
 
Internet Apps powered by NoSQL and JavaScript
Internet Apps powered by NoSQL and JavaScriptInternet Apps powered by NoSQL and JavaScript
Internet Apps powered by NoSQL and JavaScript
Luca Garulli
 
Design your application using Persistent Graphs and OrientDB
Design your application using Persistent Graphs and OrientDBDesign your application using Persistent Graphs and OrientDB
Design your application using Persistent Graphs and OrientDB
Luca Garulli
 

More from Luca Garulli (20)

Scale Out Your Graph Across Servers and Clouds with OrientDB
Scale Out Your Graph Across Servers and Clouds  with OrientDBScale Out Your Graph Across Servers and Clouds  with OrientDB
Scale Out Your Graph Across Servers and Clouds with OrientDB
 
Polyglot Persistence vs Multi-Model Databases
Polyglot Persistence vs Multi-Model DatabasesPolyglot Persistence vs Multi-Model Databases
Polyglot Persistence vs Multi-Model Databases
 
How Graph Databases started the Multi Model revolution
How Graph Databases started the Multi Model revolutionHow Graph Databases started the Multi Model revolution
How Graph Databases started the Multi Model revolution
 
OrientDB and Hazelcast
OrientDB and HazelcastOrientDB and Hazelcast
OrientDB and Hazelcast
 
Why relationships are cool but join sucks - Big Data & Graphs in Rome
Why relationships are cool but join sucks - Big Data & Graphs in RomeWhy relationships are cool but join sucks - Big Data & Graphs in Rome
Why relationships are cool but join sucks - Big Data & Graphs in Rome
 
Why relationships are cool but "join" sucks
Why relationships are cool but "join" sucksWhy relationships are cool but "join" sucks
Why relationships are cool but "join" sucks
 
Soffri di patologie da "domini complessi con tante relazioni"? C'è una nuova ...
Soffri di patologie da "domini complessi con tante relazioni"? C'è una nuova ...Soffri di patologie da "domini complessi con tante relazioni"? C'è una nuova ...
Soffri di patologie da "domini complessi con tante relazioni"? C'è una nuova ...
 
Switching from Relational 2 Graph - CloudConf.it
Switching from Relational 2 Graph - CloudConf.itSwitching from Relational 2 Graph - CloudConf.it
Switching from Relational 2 Graph - CloudConf.it
 
Switching from Relational to the Graph model v1.3
Switching from Relational to the Graph model v1.3Switching from Relational to the Graph model v1.3
Switching from Relational to the Graph model v1.3
 
Switching from relational to the graph model
Switching from relational to the graph modelSwitching from relational to the graph model
Switching from relational to the graph model
 
Internet Apps powered by NoSQL and JavaScript
Internet Apps powered by NoSQL and JavaScriptInternet Apps powered by NoSQL and JavaScript
Internet Apps powered by NoSQL and JavaScript
 
Switching from the Relational to the Graph model
Switching from the Relational to the Graph modelSwitching from the Relational to the Graph model
Switching from the Relational to the Graph model
 
OrientDB document or graph? Select the right model (old presentation)
OrientDB document or graph? Select the right model (old presentation)OrientDB document or graph? Select the right model (old presentation)
OrientDB document or graph? Select the right model (old presentation)
 
Design your application using Persistent Graphs and OrientDB
Design your application using Persistent Graphs and OrientDBDesign your application using Persistent Graphs and OrientDB
Design your application using Persistent Graphs and OrientDB
 
No sql matters_2012_keynote
No sql matters_2012_keynoteNo sql matters_2012_keynote
No sql matters_2012_keynote
 
OrientDB distributed architecture 1.1
OrientDB distributed architecture 1.1OrientDB distributed architecture 1.1
OrientDB distributed architecture 1.1
 
OrientDB for real & Web App development
OrientDB for real & Web App developmentOrientDB for real & Web App development
OrientDB for real & Web App development
 
OrientDB the database for the web 1.1
OrientDB the database for the web 1.1OrientDB the database for the web 1.1
OrientDB the database for the web 1.1
 
OrientDB introduction - NoSQL
OrientDB introduction - NoSQLOrientDB introduction - NoSQL
OrientDB introduction - NoSQL
 
RomaFramework Tutorial Basics
RomaFramework Tutorial BasicsRomaFramework Tutorial Basics
RomaFramework Tutorial Basics
 

Recently uploaded

TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc
 

Recently uploaded (20)

Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!
 
How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdf
 
Introduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptxIntroduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptx
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
 
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
 
Generative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdfGenerative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdf
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджера
 
2024 May Patch Tuesday
2024 May Patch Tuesday2024 May Patch Tuesday
2024 May Patch Tuesday
 
Intro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxIntro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptx
 
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
 
UiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overviewUiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overview
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM Performance
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
 
Design Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxDesign Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptx
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
 
Top 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development CompaniesTop 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development Companies
 
ADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptxADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptx
 

Roma introduction and concepts

  • 1. JL-1 Roma <Meta> Framework Introduction and main concepts Luca Garulli CTO@AssetData.it CTO at AssetData, Technical Manager at Romulus consortium, Author of http://zion-city.blogspot.com Roma Framework and OrientDB Open http://twitter.com/lgarulli Source projects
  • 2. Development Scenario I Choose the right framework between hundreds Each framework is proprietary, so migration is too much difficult, or sometimes impossible Learning curve often is steep and requires a lot of time to learn before to understand if it's the right one for us 2
  • 3. Development Scenario II What happens if you discover that the tool or the framework you choose doesn’t support some features we need or that the best choice was another one? Changing it’s too costly, sometime “impossible” 3
  • 4. Do you need a <meta> framework? Set of behavior interfaces instead of framework APIs directly. The aim is to cover the 80-90% of the most common use cases. For the uncovered 10- 20% you can use the framework implementation directly Migration to another supported framework without change the code 4
  • 5. Domain centric view Echo2 Janiculum Modules can implement JDO Java Resource aspects of the JPA View Bundle meta-framework Internatio Persistence (repository) nalization (I18N) CRUD Domain model Login Custom, Http Authentication and Session LDAP business Portlet User & Profile logic Jetty Workflow Others Monitoring Tevere Aspects define the interfaces JMX (behaviour) of the meta-framework 5
  • 6. Aspects Authentication •Scheduler •Flow •Security •Enterprise •Semantic •Hook •Serialization •I18n (internationalization) •Service •Logging •Session •Monitoring •Validation •Persistence •View •Registry •Workflow •Reporting 6
  • 7. POJO is the answer for all •POJO • • •(Plain Old Java Object) 7
  • 8. Everything is a POJO •The application model is composed by POJOs • •The domain entities synchronized with the database are POJOs The Business Logic is written in POJOs • •The Web Services are POJOs • •Guess the Web pages? 8
  • 9. Enriched Meta Model I •Roma auto discovers all the model of your •application and generate: • •Forms, •Database tables •OR-mapping configuration, •Web services, •and much more! 9
  • 10. Enriched Meta Model II •But Java as language is not enough to express a complete model. What means this? • •private List<Contact> contacts; • •Is it a relationship? 1-N or N-M? If yes it's embedded or not? • •How can I render it in my Web Page? •A List, a Table or a Select field? 10
  • 11. Enriched Meta Model III •We need a way to enrich the meta-model using Java5+ Annotations or Xml Annotations •ContactInstance.java: • •public class ContactInstance{ • @ViewField(render = ViewConstants.RENDER_TABLE) Java5+ Annotations pro: • private List<Contact> contacts; All in one file, •} faster to write •ContactInstance.xml: • •<?xml version="1.0"?> Xml Annotations pro: •<class> • <fields> Use of separate files so the • <field name="contacts"> Java sources remain clean • <aspects> • <view render="table"/> • </aspects> • </field> • </fields> •</class> 11
  • 12. Auto rendering: POJO instead of GUI components •public class User { • private String name; • private String surname; • private City city; • private String web; • • @ViewField(render=”textarea”) • private String notes; • • public void ok(){...} • public void cancel(){...} • public void print(){...} •} 12
  • 13. Auto rendering: POJO → Form 13
  • 14. Binding POJO ↔ Form 14
  • 15. Composite Forms •To build complex forms you need to composite POJOs all together •ContactInstance.java: • •public class ContactForm { • @ViewField(render = “objectembedded”, label=”Personal Information”) • private Contact me; • • @ViewField(render = “tab”) • private Contact[] colleagues = new Contact[]{ • new Contact(“Joy”,“Miner”), • new Contact(“Tim”, “King”) }; • • @ViewField(style = “{width: 400px;}”) • private String description; • • public void sendEmail(){ • ... • } •} 15
  • 16. Extension by composition I Classic Inheritance Extension by Composition ComposedEntityInstance Employee <Employee> EmployeeFilter EmployeeFilter Doesn't work very well with some All Employee fields and actions frameworks such as JDO and are merged with Employee ones. Hibernate: you need to use the You can override fields, actions class declared in the ORMapping and events just redefine it in the tool and not its extension. EmployeeFilter class. The object contained is in the field called “entity”. 16
  • 18. Getting started! Connect to http://www.romaframework.org Download latest version Download the Handbook Start with the first tutorial Ask to the forum or the online support Enjoy! 18