Slideshare.net (beta)

 
Post: 
Myspace Hi5 Friendster Xanga LiveJournal Facebook Blogger Tagged Typepad Freewebs BlackPlanet gigya icons

All comments

Add a comment on Slide 1

If you have a SlideShare account, login to comment; else you can comment as a guest


Showing 1-50 of 1 (more)

Roma Meta Framework Concepts @JavaDay Rome 2007

From lvca, 5 months ago

Roma Meta Framework concepts

590 views  |  0 comments  |  0 favorites  |  26 downloads
 

Groups/Events

 
 

Privacy InfoNew!

This slideshow is Public

 
Embed in your blog
Embed (wordpress.com)

Slideshow Statistics
Total Views: 590
on Slideshare: 590
from embeds: 0* * Views from embeds since 21 Aug, 07

Slideshow transcript

Slide 1: www.RomaFramework.org Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License “ Let's think to the application domain, then model it in simple Java Classes, <Meta> write the business logic and Framework Roma will make all the rest ” Luca Garulli CTO AssetData luca.garulli@assetdata.it

Slide 2: What should I use? Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License Microsoft Ruby On Rails .NET 2.0 J2EE NextApp Enhydra JSF Trails JDBC Castor Echo2 Shark Struts Spring Apache Apache OS JDO WebWorks MVC Tapestry OJB Workflow Apache Apache BPEL SWT Hibernate EJB3 Cocoon Velocity engine Yet Swing RIFE iBatis another… 2

Slide 3: Architecture atom I: behaviour aspects Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License Aspects describe a View behaviour and Persistence Scheduler they are (repository) implemented as Java interfaces I18N Scheduler (Internationalization) Domain, Model and Business Logic Session Authentication Workflow Reporting Monitoring 3

Slide 4: Architecture atom II: modules Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License Roma Echo2 JSP architecture is totally modular Modules can JDO 2.0 Java implement Resource JPOX 1.2 View Persistence Bundle Behavior I18N (repository) Aspects Users Module, Open Symphony Custom Scheduler Authentication Quartz Domain, Mock Model and Business Logic Jasper Reports Workflow Reporting Tevere ??? Monitoring Session Others JMX Echo2 4

Slide 5: Roma: main concepts Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License Generate > roma.sh create webready demo it.javaday.roma.demo /home/luca/demo empty project scaffolding demo/ Start to write domain public class Employee { roma-project.xml classes under package build.xml private String name; it.javaday.roma.demo.domain src/ private String surname; it/javaday/roma/demo private Date birth; test/ WebContent/ WEB-INF/ // GETTER + SETTERS classes/ } lib/ ... Write the model behavior + business logic @Persistence(mode=”tx”) public void save(){ Run! ObjectContext.getInstance() .getContexComponent(PersistenceAspect.class) .updateObject( this ); } 5

Slide 6: View: automatic rendering Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License main:COLUMN default:GRID(4) default area uses a GRID to place the POJO fields. Luca Garulli Name Surname You can choice how much columns to use. Order is City Web zioncity Luca given by Annotation or XML Annotation notes:COLUMN Notes You can specify custom areas where to place Zion's citizen fields and actions. There is no limit to the number of areas you can create actions:ROW actions is the default area for actions. It's defined as Ok Cancel Print a ROW 6

Slide 7: View: POJO mapping Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License 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! @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(){} } 7

Slide 8: Behavior aspect orchestration Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License I18N Session (Internationalization) login() Start user session display View Login Login Flow Authentication display Persistence DB (repository) 8

Slide 9: MVC Controller: 100% POJO based Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License Validate Invoking Controller POJO's rules + “OK” validate() Action method if any Bind changed form @ViewField(required=true, min=2) fields to the POJO private String name; POJO public void validate(){ if( name == null || name.trim().length() == 0){ throw new ValidationException( @FlowAction(next=HomePage.class) Call ok() method this, “name”, against the POJO “Please insert the name!”); public void ok(){ } } sendMessageToRemoteService(); } HomePage.java Follow the flow declared using Java5 Annotation 9

Slide 10: Summary Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License 16 available modules ● ● 9 committers, join us! ● 8.600+ downloads ● www.romaframework.org 10