Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
JL-1




                        Roma <Meta>
                         Framework
            Introduction and main concepts...
Development Scenario I
     Choose the right framework between hundreds

Each framework is proprietary,
so migration is to...
Development Scenario II
           What happens if you
         discover that the tool or
       the framework you choose
...
Do you need a <meta> framework?

   Set of behavior interfaces instead of
          framework APIs directly.

The aim is t...
Domain centric view
                                Echo2     Janiculum                                 Modules can
      ...
Aspects
 Authentication •Scheduler
       •Flow                   •Security
   •Enterprise                •Semantic
      ...
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 ent...
Enriched Meta Model I
•Roma auto discovers all the model
              of your
    •application and generate:
            ...
Enriched Meta Model II
    •But Java as language is not enough to
 express a complete model. What means this?
            ...
Enriched Meta Model III
     •We need a way to enrich the meta-model using
       Java5+ Annotations or Xml Annotations
•C...
Auto rendering: POJO instead
                  of GUI components
•public class User {
• private String name;
• private Str...
Auto rendering: POJO → Form




          13
Binding POJO ↔ Form




   14
Composite Forms
      •To build complex forms you need to composite
                   POJOs all together
•ContactInstance...
Extension by composition I
     Classic Inheritance                Extension by Composition

                             ...
Extension by composition II




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

         Download latest version

         Download the Handbook...
Demo pleeeease!




 19
Upcoming SlideShare
Loading in …5
×

Roma introduction and concepts

2,338 views

Published on

Fast introduction to the most innovative framework to build web applications

Published in: Technology, Education
  • Be the first to comment

Roma introduction and concepts

  1. 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. 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. 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. 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. 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. 6. Aspects Authentication •Scheduler •Flow •Security •Enterprise •Semantic •Hook •Serialization •I18n (internationalization) •Service •Logging •Session •Monitoring •Validation •Persistence •View •Registry •Workflow •Reporting 6
  7. 7. POJO is the answer for all •POJO • • •(Plain Old Java Object) 7
  8. 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. 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. 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. 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. 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. 13. Auto rendering: POJO → Form 13
  14. 14. Binding POJO ↔ Form 14
  15. 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. 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
  17. 17. Extension by composition II 17
  18. 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
  19. 19. Demo pleeeease! 19

×