Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
Roma Meta Framework Concepts @JavaDay Rome 2007
1. Let's think to the application domain , then model it in simple Java Classes, write the business logic and Roma will make all the rest “ ” <Meta> Framework www.RomaFramework.org Luca Garulli CTO AssetData [email_address]
2. What should I use? J2EE Microsoft .NET 2.0 Ruby On Rails Struts WebWorks Spring MVC Apache Cocoon Apache Velocity Apache Tapestry RIFE Trails JSF NextApp Echo2 Swing Yet another… SWT JDO JDBC Hibernate iBatis Castor OS Workflow Enhydra Shark BPEL engine Apache OJB EJB3
3. Architecture atom I: behaviour aspects Domain, Model and Business Logic Persistence (repository) Session Monitoring Workflow Authentication I18N (Internationalization) View Reporting Aspects describe a behaviour and they are implemented as Java interfaces Scheduler Scheduler
4. Architecture atom II: modules Domain, Model and Business Logic Persistence (repository) Session Monitoring Workflow Authentication I18N View ??? Others Java Resource Bundle Echo2 JMX Tevere JSP JDO 2.0 JPOX 1.2 Roma architecture is totally modular Modules can implement Behavior Aspects Users Module, Custom Mock Echo2 Scheduler Open Symphony Quartz Reporting Jasper Reports
5. Roma: main concepts demo/ roma-project.xml build.xml src/ it/javaday/roma/demo test/ WebContent/ WEB-INF/ classes/ lib/ ... Write the model behavior + business logic Start to write domain classes under package it.javaday.roma.demo.domain Generate empty project scaffolding Run!
6. View: automatic rendering main:COLUMN default:GRID(4) notes:COLUMN actions:ROW Ok Cancel Print default area uses a GRID to place the POJO fields. You can choice how much columns to use. Order is given by Annotation or XML Annotation actions is the default area for actions. It's defined as a ROW You can specify custom areas where to place fields and actions. There is no limit to the number of areas you can create Name City Notes Web Surname
7. @ViewClass(orderFields="name surname city web", orderActions="ok cancel print") public class Customer{ private String name; private String surname; private String city; private String web; private String notes; public void ok(){} public void cancel(){} public void print(){} } View: POJO mapping Roma controller binds the POJO directly to the form generated. The relationship is 1-1 : if you change the content of a field in the browser, it will be updated in you Java object and viceversa. When you push any button, the action associated will be executed. Fast to write, easy to debug, simple to handle!
8. Behavior aspect orchestration login() display Start user session display Persistence (repository) I18N (Internationalization) View DB Authentication Session Flow
9. MVC Controller: 100% POJO based Invoking “ OK ” Action Bind changed form fields to the POJO Call ok () method against the POJO Validate POJO's rules + validate () method if any Follow the flow declared using Java5 Annotation