SlideShare une entreprise Scribd logo
1  sur  45
Pure Java RAD and
    Scaffolding Tools Race
@Drorbr
@jbaruch



       #javarad
Your Speakers

Dror Bereznitsky               Baruch Sadogursky
@drorbr                        @jbaruch
Development Division Manager   Innovation Expert
Tangram-Soft                   BMC Software
Agenda
Bla-bla-bla (AKA Overview)
  1        Framework[] frameworks = new Framework[]{
  2                seamForge, springRoo, playFramework};
  3        for (Framework fw : frameworks) {
  4            fw.showOverview();
  5            fw.hightlightFeatures();
  6            fw.runDemo();
  7            fw.showProsAndCons();
  8        }



Yadda-yadda-yadda (Aka Summary)
Rapid Application Development
Rapid Application Development
Why Slow?




                                                                      Integration == pain!
Java Web Frwks suck!



                                  Java EE application
                       –   Map model to relational (JPA)
                       –   Write Session EJBs for DAOs and Services
                       –   Write JSF UI (E.g.JSP)
                       –   Write bunch of xmls (persistence, web,
                           jsf, server specific)
                       –   Deploy to JEE server
Scaffolding
Modules
Modules

1    @Async
2    public static void Talk.indexTalks(Collection<Talk> talks) {
3        List<SolrInputDocument> documents = new ArrayList<SolrInputDocument>();
4        for (Talk talk : talks) {
5            SolrInputDocument sid = new SolrInputDocument();
6            sid.addField("id", "talk_" + talk.getId());
7            sid.addField("talk.id_l", talk.getId());
8            sid.addField("talk.code_l", talk.getCode());
9            sid.addField("talk.title_s", talk.getTitle());
10           sid.addField("talk.track_t", talk.getTrack());
11           sid.addField("talk.category_t", talk.getCategory());
12           sid.addField("talk.speaker_t", talk.getSpeaker());
13           // Add summary field to allow searching documents
14           sid.addField("talk_solrsummary_t", new StringBuilder().
15                   append(talk.getId()).append(" ").append(talk.getCode()).
16                   append(" ").append(talk.getTitle()).append(" ").
17                   append(talk.getTrack()).append(" ").
18                   append(talk.getCategory()).append(" ").
19                   append(talk.getSpeaker()));
20           documents.add(sid);
21       }
22       try {
23           SolrServer solrServer = solrServer();
24           solrServer.add(documents);
25           solrServer.commit();
26       } catch (Exception e) {
27           e.printStackTrace();
28       }
29   }
Writing your own module
Convention…
Over…
Configuration
On the Left lane:

JBOSS SEAM FORGE
Obvious and trivial jboss SEAM
          FORGE Facts
Developed by JBOSS (surprise!)
Heavily based on JBOSS SEAM (surprise!)
Heavily based on Maven
Uses standard java ee 6 features
Evolved from seam-gen project in August 2010
latest version 1.0.0-beta1
Interesting stuff
Interesting stuff
Plugins (aka Modules)




         Infrastructure
       Javabean validation
       Jboss as
       Glassfish AS
       Apache Maven
Developing Plugin


 Use standard java ee cdi TO
    access container services
Demo!
Pros and Cons
On the Middle lane:

SPRING ROO
Obvious and trivial Spring ROO Facts
  Developed by springsource (surprise!)
  Heavily based on the Spring framework (surprise!)
  revealed @ SpringOne Europe on 27 April 2009
  latest version 1.1.5
Inter-type declarations
1    @RooJavaBean
2    @RooToString
3    @RooEntity
4    public class Speaker {
5
6         @NotNull
7         private String firstName;
8
9         @NotNull
10        private String lastName;
11
12        private String email;
13
14        @ManyToMany(cascade = CascadeType.ALL)
15        private Set<Talk> talks = new HashSet();
16   }




         1        privileged aspect Speaker_Roo_JavaBean {
         2
         3            public String Speaker.getFirstName() {
         4                return this.firstName;
         5            }
         6
         7            public void Speaker.setFirstName(String firstName) {
         8                this.firstName = firstName;
         9            }
         10            …
         11   }
Inter-type declarations
1    @RooJavaBean
2    @RooToString
3    @RooEntity
4    public class Speaker {
                                                    1    privileged aspect Speaker_Roo_Entity {
5                                                   2
6        @NotNull                                   3            declare @type: Speaker: @Entity;
7        private String firstName;                  4
8                                                   5            @PersistenceContext
9        @NotNull                                   6            transient EntityManager Speaker.entityManager;
10       private String lastName;                   7
11                                                  8            @Id
12       private String email;                      9            @GeneratedValue(strategy = GenerationType.AUTO)
13                                                  10           @Column(name = "id")
14       @ManyToMany(cascade = CascadeType.ALL)     11           private Long Speaker.id;
15       private Set<Talk> talks = new HashSet();   12
16   }                                              13           @Version
                                                    14           @Column(name = "version")
                                                    15           private Integer Speaker.version;
                                                    16
                                                    17           @Transactional
                                                    18           public void Speaker.persist() {
                                                    19               this.entityManager.persist(this);
                                                    20           }
                                                    21
                                                    22           public static long Speaker.countSpeakers() {
                                                    23               return entityManager().createQuery(
                                                    24                 "SELECT COUNT(o) FROM Speaker o",
                                                    25                 Long.class).getSingleResult();
                                                    26           }
                                                    27       …
                                                    28   }
add-ons (AKA Modules)



          Infrastructure
Javabean validation        SOLR
Cloud Foundry and GAE      JUNIT and selenium
Embedded Jetty             OSGi
Apache MAVEN
Developing add-on
Demo!
Pros and Cons
On the Right lane:

PLAY! FRAMEWORK
Obvious and trivial Play! Facts
Developed by guillaume bort, supported by zenexity
First signs of life from 12 may 2007
latest version 1.2.3
Not your grandpa’s RAD Tool




      So, what gives?
The other “rapid”
More unusual stuff
Not using servlet API
Build and deployment handled by Python scripts
Static controllers
“Share nothing” architecture
JSP-LIKE templating engine (based on Groovy)
Admin area otf generation
Graphical Test runner
Modules



                            Infrastructure
                Scala                        ElasticSearch and Lucene
                Eclipse Compiler             JUNIT and selenium
                GAE                          OAuth
                JBoss Netty

*Yap, we lied
Developing module
Developing module
Demo!
Pros and Cons
Feature             Seam Forge         Spring Roo          Play!
Scaffolding        One-Time           Continuous         One-time
                                                         (as module)
OTF compile        No                 No                 Yes
Persistence        JPA                JPA               JPA
                                                        Morphia
User interface     JSF                Spring-MVC        HOME-Grown
                                      GWT               (JSP-like)
Full Text Search   No                 Solr              ElasticSearch
                                                        Lucene
REST support       No                 Spring-rest       Rest-easy
Deployment         JBOss AS           Servlet container Embedded netty
                   Glassfish AS       GAE               Gae
                                      Cloud Foundry     Servlet container
Feature                       Seam Forge        Spring Roo          Play!
     Backed up                       JBOss            Springsource      zenexity
     Maturity                        Low              High              high
     Documentation                   Low              Medium            Medium
     Books                           NO               “Roo in action”   “Introducing the
                                                      Early access      Play Framework”
     License                         LGPL             Apache 2          Apache 2
     Mailing List                    6 messages in    132 messages in   ~550 messages in
                                     last month       last month        last month*



*Inc. announcements on usage, etc.
Pure Java RAD and Scaffolding Tools Race

Contenu connexe

Tendances

Jersey framework
Jersey frameworkJersey framework
Jersey framework
knight1128
 
Jdk(java) 7 - 6 기타기능
Jdk(java) 7 - 6 기타기능Jdk(java) 7 - 6 기타기능
Jdk(java) 7 - 6 기타기능
knight1128
 

Tendances (20)

How to Choose a JDK
How to Choose a JDKHow to Choose a JDK
How to Choose a JDK
 
Java 5 and 6 New Features
Java 5 and 6 New FeaturesJava 5 and 6 New Features
Java 5 and 6 New Features
 
Highlights from Java 10, 11 and 12 and Future of Java at JUG Koblenz
Highlights from Java 10, 11 and 12 and Future of Java at JUG KoblenzHighlights from Java 10, 11 and 12 and Future of Java at JUG Koblenz
Highlights from Java 10, 11 and 12 and Future of Java at JUG Koblenz
 
2 P Seminar
2 P Seminar2 P Seminar
2 P Seminar
 
What`s new in Java 7
What`s new in Java 7What`s new in Java 7
What`s new in Java 7
 
Making Exceptions on Exception Handling (WEH 2012 Keynote Speech)
Making Exceptions on  Exception Handling (WEH 2012 Keynote Speech)Making Exceptions on  Exception Handling (WEH 2012 Keynote Speech)
Making Exceptions on Exception Handling (WEH 2012 Keynote Speech)
 
Java 7: Quo vadis?
Java 7: Quo vadis?Java 7: Quo vadis?
Java 7: Quo vadis?
 
Java7 New Features and Code Examples
Java7 New Features and Code ExamplesJava7 New Features and Code Examples
Java7 New Features and Code Examples
 
Jersey framework
Jersey frameworkJersey framework
Jersey framework
 
DevNexus 2020: Discover Modern Java
DevNexus 2020: Discover Modern JavaDevNexus 2020: Discover Modern Java
DevNexus 2020: Discover Modern Java
 
From Java 6 to Java 7 reference
From Java 6 to Java 7 referenceFrom Java 6 to Java 7 reference
From Java 6 to Java 7 reference
 
Java 7 New Features
Java 7 New FeaturesJava 7 New Features
Java 7 New Features
 
Bytecode manipulation with Javassist and ASM
Bytecode manipulation with Javassist and ASMBytecode manipulation with Javassist and ASM
Bytecode manipulation with Javassist and ASM
 
Java7
Java7Java7
Java7
 
Getting started with Java 9 modules
Getting started with Java 9 modulesGetting started with Java 9 modules
Getting started with Java 9 modules
 
Whats New in Java 5, 6, & 7 (Webinar Presentation - June 2013)
Whats New in Java 5, 6, & 7 (Webinar Presentation - June 2013)Whats New in Java 5, 6, & 7 (Webinar Presentation - June 2013)
Whats New in Java 5, 6, & 7 (Webinar Presentation - June 2013)
 
Jdk(java) 7 - 6 기타기능
Jdk(java) 7 - 6 기타기능Jdk(java) 7 - 6 기타기능
Jdk(java) 7 - 6 기타기능
 
To inject or not to inject: CDI is the question
To inject or not to inject: CDI is the questionTo inject or not to inject: CDI is the question
To inject or not to inject: CDI is the question
 
Java 10 New Features
Java 10 New FeaturesJava 10 New Features
Java 10 New Features
 
What's new in Java EE 6
What's new in Java EE 6What's new in Java EE 6
What's new in Java EE 6
 

Similaire à Pure Java RAD and Scaffolding Tools Race

JavaScript Growing Up
JavaScript Growing UpJavaScript Growing Up
JavaScript Growing Up
David Padbury
 
Industrial Strength Groovy - Tools for the Professional Groovy Developer: Pau...
Industrial Strength Groovy - Tools for the Professional Groovy Developer: Pau...Industrial Strength Groovy - Tools for the Professional Groovy Developer: Pau...
Industrial Strength Groovy - Tools for the Professional Groovy Developer: Pau...
Paul King
 
Terence Barr - jdk7+8 - 24mai2011
Terence Barr - jdk7+8 - 24mai2011Terence Barr - jdk7+8 - 24mai2011
Terence Barr - jdk7+8 - 24mai2011
Agora Group
 

Similaire à Pure Java RAD and Scaffolding Tools Race (20)

ExSchema
ExSchemaExSchema
ExSchema
 
Java 7 Whats New(), Whats Next() from Oredev
Java 7 Whats New(), Whats Next() from OredevJava 7 Whats New(), Whats Next() from Oredev
Java 7 Whats New(), Whats Next() from Oredev
 
Aop clustering
Aop clusteringAop clustering
Aop clustering
 
Java one 2010
Java one 2010Java one 2010
Java one 2010
 
Panama.pdf
Panama.pdfPanama.pdf
Panama.pdf
 
JavaScript Growing Up
JavaScript Growing UpJavaScript Growing Up
JavaScript Growing Up
 
Industrial Strength Groovy - Tools for the Professional Groovy Developer: Pau...
Industrial Strength Groovy - Tools for the Professional Groovy Developer: Pau...Industrial Strength Groovy - Tools for the Professional Groovy Developer: Pau...
Industrial Strength Groovy - Tools for the Professional Groovy Developer: Pau...
 
Tech Days 2010
Tech  Days 2010Tech  Days 2010
Tech Days 2010
 
Atlassian Groovy Plugins
Atlassian Groovy PluginsAtlassian Groovy Plugins
Atlassian Groovy Plugins
 
Java
JavaJava
Java
 
Java se7 features
Java se7 featuresJava se7 features
Java se7 features
 
Spring Boot
Spring BootSpring Boot
Spring Boot
 
Groovy Introduction - JAX Germany - 2008
Groovy Introduction - JAX Germany - 2008Groovy Introduction - JAX Germany - 2008
Groovy Introduction - JAX Germany - 2008
 
Rapid Network Application Development with Apache MINA
Rapid Network Application Development with Apache MINARapid Network Application Development with Apache MINA
Rapid Network Application Development with Apache MINA
 
Spring Boot Revisited with KoFu and JaFu
Spring Boot Revisited with KoFu and JaFuSpring Boot Revisited with KoFu and JaFu
Spring Boot Revisited with KoFu and JaFu
 
Building native Android applications with Mirah and Pindah
Building native Android applications with Mirah and PindahBuilding native Android applications with Mirah and Pindah
Building native Android applications with Mirah and Pindah
 
Jet presentation
Jet presentationJet presentation
Jet presentation
 
Terence Barr - jdk7+8 - 24mai2011
Terence Barr - jdk7+8 - 24mai2011Terence Barr - jdk7+8 - 24mai2011
Terence Barr - jdk7+8 - 24mai2011
 
Json generation
Json generationJson generation
Json generation
 
Android and the Seven Dwarfs from Devox'15
Android and the Seven Dwarfs from Devox'15Android and the Seven Dwarfs from Devox'15
Android and the Seven Dwarfs from Devox'15
 

Plus de Baruch Sadogursky

Plus de Baruch Sadogursky (20)

DevOps Patterns & Antipatterns for Continuous Software Updates @ NADOG April ...
DevOps Patterns & Antipatterns for Continuous Software Updates @ NADOG April ...DevOps Patterns & Antipatterns for Continuous Software Updates @ NADOG April ...
DevOps Patterns & Antipatterns for Continuous Software Updates @ NADOG April ...
 
DevOps Patterns & Antipatterns for Continuous Software Updates @ DevOps.com A...
DevOps Patterns & Antipatterns for Continuous Software Updates @ DevOps.com A...DevOps Patterns & Antipatterns for Continuous Software Updates @ DevOps.com A...
DevOps Patterns & Antipatterns for Continuous Software Updates @ DevOps.com A...
 
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at Oracle Code NY...
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at Oracle Code NY...DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at Oracle Code NY...
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at Oracle Code NY...
 
Data driven devops as presented at QCon London 2018
Data driven devops as presented at QCon London 2018Data driven devops as presented at QCon London 2018
Data driven devops as presented at QCon London 2018
 
A Research Study Into DevOps Bottlenecks as presented at Oracle Code LA 2018
A Research Study Into DevOps Bottlenecks as presented at Oracle Code LA 2018A Research Study Into DevOps Bottlenecks as presented at Oracle Code LA 2018
A Research Study Into DevOps Bottlenecks as presented at Oracle Code LA 2018
 
Java Puzzlers NG S03 a DevNexus 2018
Java Puzzlers NG S03 a DevNexus 2018Java Puzzlers NG S03 a DevNexus 2018
Java Puzzlers NG S03 a DevNexus 2018
 
Where the Helm are your binaries? as presented at Canada Kubernetes Meetups
Where the Helm are your binaries? as presented at Canada Kubernetes MeetupsWhere the Helm are your binaries? as presented at Canada Kubernetes Meetups
Where the Helm are your binaries? as presented at Canada Kubernetes Meetups
 
Data driven devops as presented at Codemash 2018
Data driven devops as presented at Codemash 2018Data driven devops as presented at Codemash 2018
Data driven devops as presented at Codemash 2018
 
A Research Study into DevOps Bottlenecks as presented at Codemash 2018
A Research Study into DevOps Bottlenecks as presented at Codemash 2018A Research Study into DevOps Bottlenecks as presented at Codemash 2018
A Research Study into DevOps Bottlenecks as presented at Codemash 2018
 
Best Practices for Managing Docker Versions as presented at JavaOne 2017
Best Practices for Managing Docker Versions as presented at JavaOne 2017Best Practices for Managing Docker Versions as presented at JavaOne 2017
Best Practices for Managing Docker Versions as presented at JavaOne 2017
 
Troubleshooting & Debugging Production Microservices in Kubernetes as present...
Troubleshooting & Debugging Production Microservices in Kubernetes as present...Troubleshooting & Debugging Production Microservices in Kubernetes as present...
Troubleshooting & Debugging Production Microservices in Kubernetes as present...
 
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at Devoxx 2017
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at Devoxx 2017DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at Devoxx 2017
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at Devoxx 2017
 
Amazon Alexa Skills vs Google Home Actions, the Big Java VUI Faceoff as prese...
Amazon Alexa Skills vs Google Home Actions, the Big Java VUI Faceoff as prese...Amazon Alexa Skills vs Google Home Actions, the Big Java VUI Faceoff as prese...
Amazon Alexa Skills vs Google Home Actions, the Big Java VUI Faceoff as prese...
 
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at DevOps Days Be...
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at DevOps Days Be...DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at DevOps Days Be...
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at DevOps Days Be...
 
Java Puzzlers NG S02: Down the Rabbit Hole as it was presented at The Pittsbu...
Java Puzzlers NG S02: Down the Rabbit Hole as it was presented at The Pittsbu...Java Puzzlers NG S02: Down the Rabbit Hole as it was presented at The Pittsbu...
Java Puzzlers NG S02: Down the Rabbit Hole as it was presented at The Pittsbu...
 
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at The Pittsburgh...
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at The Pittsburgh...DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at The Pittsburgh...
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at The Pittsburgh...
 
Let’s Wing It: A Study in DevRel Strategy
 Let’s Wing It: A Study in DevRel Strategy Let’s Wing It: A Study in DevRel Strategy
Let’s Wing It: A Study in DevRel Strategy
 
Log Driven First Class Customer Support at Scale
Log Driven First Class Customer Support at ScaleLog Driven First Class Customer Support at Scale
Log Driven First Class Customer Support at Scale
 
[Webinar] The Frog And The Butler: CI Pipelines For Modern DevOps
[Webinar] The Frog And The Butler: CI Pipelines For Modern DevOps[Webinar] The Frog And The Butler: CI Pipelines For Modern DevOps
[Webinar] The Frog And The Butler: CI Pipelines For Modern DevOps
 
Patterns and antipatterns in Docker image lifecycle as was presented at DC Do...
Patterns and antipatterns in Docker image lifecycle as was presented at DC Do...Patterns and antipatterns in Docker image lifecycle as was presented at DC Do...
Patterns and antipatterns in Docker image lifecycle as was presented at DC Do...
 

Dernier

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Dernier (20)

MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 

Pure Java RAD and Scaffolding Tools Race

  • 1. Pure Java RAD and Scaffolding Tools Race @Drorbr @jbaruch #javarad
  • 2. Your Speakers Dror Bereznitsky Baruch Sadogursky @drorbr @jbaruch Development Division Manager Innovation Expert Tangram-Soft BMC Software
  • 3. Agenda Bla-bla-bla (AKA Overview) 1 Framework[] frameworks = new Framework[]{ 2 seamForge, springRoo, playFramework}; 3 for (Framework fw : frameworks) { 4 fw.showOverview(); 5 fw.hightlightFeatures(); 6 fw.runDemo(); 7 fw.showProsAndCons(); 8 } Yadda-yadda-yadda (Aka Summary)
  • 4.
  • 7. Why Slow? Integration == pain! Java Web Frwks suck! Java EE application – Map model to relational (JPA) – Write Session EJBs for DAOs and Services – Write JSF UI (E.g.JSP) – Write bunch of xmls (persistence, web, jsf, server specific) – Deploy to JEE server
  • 10. Modules 1 @Async 2 public static void Talk.indexTalks(Collection<Talk> talks) { 3 List<SolrInputDocument> documents = new ArrayList<SolrInputDocument>(); 4 for (Talk talk : talks) { 5 SolrInputDocument sid = new SolrInputDocument(); 6 sid.addField("id", "talk_" + talk.getId()); 7 sid.addField("talk.id_l", talk.getId()); 8 sid.addField("talk.code_l", talk.getCode()); 9 sid.addField("talk.title_s", talk.getTitle()); 10 sid.addField("talk.track_t", talk.getTrack()); 11 sid.addField("talk.category_t", talk.getCategory()); 12 sid.addField("talk.speaker_t", talk.getSpeaker()); 13 // Add summary field to allow searching documents 14 sid.addField("talk_solrsummary_t", new StringBuilder(). 15 append(talk.getId()).append(" ").append(talk.getCode()). 16 append(" ").append(talk.getTitle()).append(" "). 17 append(talk.getTrack()).append(" "). 18 append(talk.getCategory()).append(" "). 19 append(talk.getSpeaker())); 20 documents.add(sid); 21 } 22 try { 23 SolrServer solrServer = solrServer(); 24 solrServer.add(documents); 25 solrServer.commit(); 26 } catch (Exception e) { 27 e.printStackTrace(); 28 } 29 }
  • 15.
  • 16. On the Left lane: JBOSS SEAM FORGE
  • 17. Obvious and trivial jboss SEAM FORGE Facts Developed by JBOSS (surprise!) Heavily based on JBOSS SEAM (surprise!) Heavily based on Maven Uses standard java ee 6 features Evolved from seam-gen project in August 2010 latest version 1.0.0-beta1
  • 20. Plugins (aka Modules) Infrastructure Javabean validation Jboss as Glassfish AS Apache Maven
  • 21. Developing Plugin Use standard java ee cdi TO access container services
  • 22. Demo!
  • 24. On the Middle lane: SPRING ROO
  • 25. Obvious and trivial Spring ROO Facts Developed by springsource (surprise!) Heavily based on the Spring framework (surprise!) revealed @ SpringOne Europe on 27 April 2009 latest version 1.1.5
  • 26. Inter-type declarations 1 @RooJavaBean 2 @RooToString 3 @RooEntity 4 public class Speaker { 5 6 @NotNull 7 private String firstName; 8 9 @NotNull 10 private String lastName; 11 12 private String email; 13 14 @ManyToMany(cascade = CascadeType.ALL) 15 private Set<Talk> talks = new HashSet(); 16 } 1 privileged aspect Speaker_Roo_JavaBean { 2 3 public String Speaker.getFirstName() { 4 return this.firstName; 5 } 6 7 public void Speaker.setFirstName(String firstName) { 8 this.firstName = firstName; 9 } 10 … 11 }
  • 27. Inter-type declarations 1 @RooJavaBean 2 @RooToString 3 @RooEntity 4 public class Speaker { 1 privileged aspect Speaker_Roo_Entity { 5 2 6 @NotNull 3 declare @type: Speaker: @Entity; 7 private String firstName; 4 8 5 @PersistenceContext 9 @NotNull 6 transient EntityManager Speaker.entityManager; 10 private String lastName; 7 11 8 @Id 12 private String email; 9 @GeneratedValue(strategy = GenerationType.AUTO) 13 10 @Column(name = "id") 14 @ManyToMany(cascade = CascadeType.ALL) 11 private Long Speaker.id; 15 private Set<Talk> talks = new HashSet(); 12 16 } 13 @Version 14 @Column(name = "version") 15 private Integer Speaker.version; 16 17 @Transactional 18 public void Speaker.persist() { 19 this.entityManager.persist(this); 20 } 21 22 public static long Speaker.countSpeakers() { 23 return entityManager().createQuery( 24 "SELECT COUNT(o) FROM Speaker o", 25 Long.class).getSingleResult(); 26 } 27 … 28 }
  • 28. add-ons (AKA Modules) Infrastructure Javabean validation SOLR Cloud Foundry and GAE JUNIT and selenium Embedded Jetty OSGi Apache MAVEN
  • 30. Demo!
  • 32. On the Right lane: PLAY! FRAMEWORK
  • 33. Obvious and trivial Play! Facts Developed by guillaume bort, supported by zenexity First signs of life from 12 may 2007 latest version 1.2.3
  • 34. Not your grandpa’s RAD Tool So, what gives?
  • 36. More unusual stuff Not using servlet API Build and deployment handled by Python scripts Static controllers “Share nothing” architecture JSP-LIKE templating engine (based on Groovy) Admin area otf generation Graphical Test runner
  • 37. Modules Infrastructure Scala ElasticSearch and Lucene Eclipse Compiler JUNIT and selenium GAE OAuth JBoss Netty *Yap, we lied
  • 40. Demo!
  • 42.
  • 43. Feature Seam Forge Spring Roo Play! Scaffolding One-Time Continuous One-time (as module) OTF compile No No Yes Persistence JPA JPA JPA Morphia User interface JSF Spring-MVC HOME-Grown GWT (JSP-like) Full Text Search No Solr ElasticSearch Lucene REST support No Spring-rest Rest-easy Deployment JBOss AS Servlet container Embedded netty Glassfish AS GAE Gae Cloud Foundry Servlet container
  • 44. Feature Seam Forge Spring Roo Play! Backed up JBOss Springsource zenexity Maturity Low High high Documentation Low Medium Medium Books NO “Roo in action” “Introducing the Early access Play Framework” License LGPL Apache 2 Apache 2 Mailing List 6 messages in 132 messages in ~550 messages in last month last month last month* *Inc. announcements on usage, etc.

Notes de l'éditeur

  1. Presentation of the speakers – background, twitter, etc.
  2. Explain agenda:Background and overview on what RAD isFor each framework:Overview Interesting features Extension capabilitiesDemoPros and consSummary and comparisonQ&amp;A
  3. Fourth-generation-languages tried to move away from the machine towards business problems. They failed being too restrictive.
  4. Overview on what RAD is:Opposite to slow J2EE, will explain why slow in next slidesPopularized by RoRCommon features:Scaffolding (will be explained in following slides)Modularity (will be explained in the following slides)CLI (shell)
  5. Why traditional J2EE apps are slow to delevop? Mainly 2 reasons:Integration of a lot of stuff (see next slides)Java web frameworks are suboptimal (see next slides)
  6. What is scaffolding? Generation of UI from entities
  7. modules are used to add functionality to project.They ease integration by generating configurations.E.g. all the ORM configurations are generated
  8. Lot’s of modules are like scaffolding. They generate functionality based on existing entitiesE.g. solr add-on, which generate the configuration, and lots of indexing and searching logic based on the entity
  9. Simple to use, lot’s of reasonabledefaults are assumed and hidden.
  10. Full power at your hand comes with tedious configuration and setup.Simple example of COC is Hibernate 2 hbm.xml, which named each and every persistent property vs. Hibernate annotations (or JPA), in which all the properties are persistent by default unless otherwise stated.
  11. Metawidget – UI generation framework. Supports various backends, inc. JPA, Hibernate, Seam, etc. and various frontends, inc. Android, GWT, Spring MVC, Swing, SWT and JSF.In theory, selecting Metawidget as the scaffolding tool should give the ability to provide all those UIs. In practice, only JSF is supported
  12. Promisesabstractions for Persistence as a general concept (JDBC, JPA, Hibernate, NoSQL, and JDO). For now only JPA is implemented
  13. Seam Persistence supports for no-sql, currently implemented only JPAMetawidget supports GWT, Spring MVC, Struts, Swing and SWT, currently implemented only JSF
  14. Developing plugin is easy, project created automatically, use standard Java EE to perform operations, use Forge API to do stuff to project. Full support for CLI.Not using OSGi, so plugins run in same classloader, which creates classpath hell. Current workaround is maven shade plugin with relocation.
  15. Pros – Scaffolding with JSF – easy to create JSF UIHeavily based on Java EE 6 and Seam framework.Cons – Early days, only limited amount of features implemented (e.g. Metawidget only for JSF), bugs and failures.Generated classes are editable by user, regeneration destroys the changes. That limits the usage to project bootstrap stage only.Classpath hell ugly workaround for plugins creation
  16. Standard AspectJ technique for separation of conserns. Used inRoo to separate auto-generated content from user-editable contentAlso fights some Java boilerplate – here it hides the getters and setters from JavaBean
  17. Here is adds the JPA stuff to entity, both technical details of entity itself (like ID and Version) and the active record nature (persist, merge, find)
  18. Variosaddons include full text search, REST support with JSON, GWT UI, deployment to cloud factory and other fancy stuffJPA providers – Hibernate, EclipseLink, OpenJPA, DataNecleus
  19. Creation of add-on is simple and convenient:Use add-on creator add-onInject the services for manipulating the project, generate code and ITDs, access application contextAdd-on is regular Spring bean, everything works.Roo is running inside OSGi container (Apache Felix), the add-ons are bundles. That solves the classpath issues better way than Seam Forge does. The OSGi complexity is hidden from add-on developer.
  20. Pros – Separation of user-authored code from autogenerated code. That allows Roo to manage the application even after the user started to change the code in IDE.Tight integration with Spring Framework, allowing easy usage of all the features.Solr add-onGood usage of OSGi to solve classpath issues with add-ons. The complexity of OSGi is well hidden.Cons – Most of the code is in ITDs. They are almost Java, but not quite. Looks like magic.No support for NoSQL persistence. We’d expect it to present due to excellent SpringData project. Work in progress.We can’t say Active Record as it is implemented in Roo is a con, but absence of DAO option is. Debates in progress.
  21. Play does not support scaffolding by default. So, is it still Rapid Application Development Tool?
  22. Yes. It uses other technique to achieve rapid development – the on-the-fly compile. It saves recompile-redeploy-restart cycle and speeds up the development.
  23. Play also differs from other tools in:Not using Servlet API, it uses Netty (NIO) directlyNot using Maven, but bunch of Python scriptsAll the methods in controllers are static Uses “Share nothing” architecture to be totally statelessUses its own templating engine, the improved JSP, written in Groovy
  24. Various add-ons include mongoDB, Rest-Easy for REST over JSON, Scaffolding (not as default, but in add-on) , Scala support, deployment to GAE, full text search etc.
  25. A module is just another Play application.
  26. Special command for bootstrapping module developmentModules are automatically loaded from the /modules directory of the applicationModules are less restricted than application , e.g. module doesn’t have application.conf file. Everything in module is optional.Public module repo exists, your module can be there after a short review of the core team.The classpath hell is not tackled. Ivy is used for dependency management, so ivy.xml should sort out all the jar conflicts.
  27. Pros – OTF compile gives great productivity boostFansy modules, like full text search, MongoDB and even ScalaNIO server based on NettyCons – Scaffolding as module with questionable qualityClasspath hell in module development