SlideShare ist ein Scribd-Unternehmen logo
1 von 44
Downloaden Sie, um offline zu lesen
Spring ROO
 Internals and add-ons




              Massimiliano Dessì - SpringFramework Italian User Group
                               Javaday IV – Roma – 30 gennaio 2010
Speaker
     Software Architect / Developer
        ProNetics / Sourcesense

              Chairman
          JugSardegna Onlus

              Founder
  SpringFramework Italian User Group

      Committer - Contributor
  OpenNMS - MongoDB - MagicBox

                 Author
Spring 2.5 Aspect Oriented Programming
                       Massimiliano Dessì - SpringFramework Italian User Group
                                        Javaday IV – Roma – 30 gennaio 2010
Agenda
    - Demo for unbelievers-
        - Roo Internals -
     - Maven Roo support -
      - Add On Anatomy -
- Roo Domain Driven Design -
- AspectJ Intertype Declaration -
     - SpringSurf Add-on -
                   Massimiliano Dessì - SpringFramework Italian User Group
                                    Javaday IV – Roma – 30 gennaio 2010
5 Minutes demo for Unbelievers




Demo for unbelievers
Roo Internals
Maven Roo support
Add On Anatomy
Roo Domain Driven Design
AspectJ Intertype Declaration
SpringSurf Add-on

                                                 Massimiliano Dessì - SpringFramework Italian User Group
                                                                  Javaday IV – Roma – 30 gennaio 2010
Roo internals




Demo for unbelievers
Roo Internals
Maven Roo support
Add On Anatomy
Roo Domain Driven Design
AspectJ Intertype Declaration
SpringSurf Add-on

                                        Massimiliano Dessì - SpringFramework Italian User Group
                                                         Javaday IV – Roma – 30 gennaio 2010
Core modules
                    Classpath



                            ProcessManager




Shell                                             Project



        File Undo         File Monitor             Model            Metadata

                     Support

                               Massimiliano Dessì - SpringFramework Italian User Group
                                                Javaday IV – Roma – 30 gennaio 2010
Roo in its essence is an interactive shell
         and a ProcessManager
  The Shell receives the commands
        and a ProcessManager
       coordinates the operations
         required from the user

                        Massimiliano Dessì - SpringFramework Italian User Group
                                         Javaday IV – Roma – 30 gennaio 2010
- The Shell has a very good usability -
        (tab, context awareness, hiding, hints)
- Background monitoring of externally-made changes -
      - Full interaction with Spring Tool Suite -



                             Massimiliano Dessì - SpringFramework Italian User Group
                                              Javaday IV – Roma – 30 gennaio 2010
Shell

                    The Shell
    parses and validates the user input
and publishes the status about current task

     STARTING, STARTED, USER_INPUT, PARSING, EXECUTING,
                EXECUTION_RESULT_PROCESSING,
              EXECUTION_COMPLETE, SHUTTING_DOWN




                                  Massimiliano Dessì - SpringFramework Italian User Group
                                                   Javaday IV – Roma – 30 gennaio 2010
ProcessManager


The Shell passes the ParseResult object
         to the execute method
        of the ProcessManager
           (Strategy pattern)



                      Massimiliano Dessì - SpringFramework Italian User Group
                                       Javaday IV – Roma – 30 gennaio 2010
ProcessManager


             ProcessManager delivers:
               - State publication model -
           - Polling on filesystem resources -
- Execute CommandCallbacks for requested operations -
   - "Transaction-like" context for above operations -


                             Massimiliano Dessì - SpringFramework Italian User Group
                                              Javaday IV – Roma – 30 gennaio 2010
Commands



      During the bootstrap ROO
        reads all bean classes
of type CommandMarker (Tag interface)




                      Massimiliano Dessì - SpringFramework Italian User Group
                                       Javaday IV – Roma – 30 gennaio 2010
The Shell stores the metadata information
   (@CliAvailabilityIndicator) read from
            all CommandMarker beans
In this way the Shell knows all available commands
      and MethodTarget related to user input


                           Massimiliano Dessì - SpringFramework Italian User Group
                                            Javaday IV – Roma – 30 gennaio 2010
The Command class (CommandMarker)
         uses the related Operations class.
               The Operations class
              performs the real work
on Java and AspectJ classes, XML and template files.


                            Massimiliano Dessì - SpringFramework Italian User Group
                                             Javaday IV – Roma – 30 gennaio 2010
Maven ROO support
                                     sometimes maven is your friend :)




Demo for unbelievers
Roo Internals
Maven Roo support
Add On Anatomy
Roo Domain Driven Design
AspectJ Intertype Declaration
SpringSurf Add-on

                                                           Massimiliano Dessì - SpringFramework Italian User Group
                                                                            Javaday IV – Roma – 30 gennaio 2010
Roo uses Maven under the hood for:
 building the entire project and managing dependencies
             roo> project --topLevelPackage com.proj.roo.addon


                        add-on development
roo> project --topLevelPackage com.proj.roo.addon --template ROO_ADDON_SIMPLE


                             eclipse / STS
                            roo> perform eclipse


                               packaging
                           roo> perform assembly


                                         Massimiliano Dessì - SpringFramework Italian User Group
                                                          Javaday IV – Roma – 30 gennaio 2010
Add-On anatomy
                                   Security add-on in the example




Demo for unbelievers
Roo Internals
Maven Roo support
Add On Anatomy
Roo Domain Driven Design
AspectJ Intertype Declaration
SpringSurf Add-on

                                                       Massimiliano Dessì - SpringFramework Italian User Group
                                                                        Javaday IV – Roma – 30 gennaio 2010
@ScopeDevelopmentShell
public class SecurityCommands implements CommandMarker{

    private SecurityOperations securityOperations;

    public SecurityCommands(SecurityOperations securityOperations) {
        Assert.notNull(securityOperations, "Security operations required");
        this.securityOperations = securityOperations;
    }

    @CliAvailabilityIndicator("security setup")
    public boolean isInstallSecurityAvailable() {
        return securityOperations.isInstallSecurityAvailable();
    }

    @CliCommand(value = "security setup",
                help = "Install Spring Security into your project")
    public void installSecurity() {
        securityOperations.installSecurity();
    }
}
                                            Massimiliano Dessì - SpringFramework Italian User Group
                                                             Javaday IV – Roma – 30 gennaio 2010
Security add-on
@ScopeDevelopmentShell
public class SecurityCommands implements CommandMarker
…
public SecurityCommands(SecurityOperations securityOperations) {
       Assert.notNull(securityOperations, "Security operations required");
       this.securityOperations = securityOperations;
}




@ScopeDevelopmentShell : Indicates a class that should be instantiated when the ROO
                             development Shell is used.

CommandMarker              : Tag Interface, the Command class must implement this interface




                                                   Massimiliano Dessì - SpringFramework Italian User Group
                                                                    Javaday IV – Roma – 30 gennaio 2010
Commands
@CliAvailabilityIndicator("security setup")
public boolean isInstallSecurityAvailable() {
    return securityOperations.isInstallSecurityAvailable();
}


@CliAvailabilityIndicator:Annotates a method that can indicate whether a particular
command is currently available or not.
This annotation must only be applied to a public no-argument method that returns primitive boolean.
The method should be inexpensive to evaluate, as this method can be called very frequently. If
expensive operations are necessary to compute command availability, it is suggested the method
return a boolean field that is maintained using the observer pattern.




                                                      Massimiliano Dessì - SpringFramework Italian User Group
                                                                        Javaday IV – Roma – 30 gennaio 2010
Commands

@CliCommand(value = "security setup",
            help = "Install Spring Security into your project")
public void installSecurity() {
   securityOperations.installSecurity();
}
...

@CliCommand
value: one or more strings which must serve as the start of a particular command in order to match
this method (these must be unique within the entire application)

help: help message for this command (the default is a blank String, which means there is no help)




                                                       Massimiliano Dessì - SpringFramework Italian User Group
                                                                        Javaday IV – Roma – 30 gennaio 2010
Operations
@ScopeDevelopment
public class SecurityOperations

    private   FileManager fileManager;
    private   PathResolver pathResolver;
    private   MetadataService metadataService;
    private   ProjectOperations projectOperations;

....



The SecurityOperations uses the above convenient Roo API to fulfill its purpose:
- Find/write and read any resources (Java, XML, JSP, Properties, AJ) on filesystem
- Read metadata
- Handle the POM file




                                                       Massimiliano Dessì - SpringFramework Italian User Group
                                                                        Javaday IV – Roma – 30 gennaio 2010
Recap, add-on should:
- Make a “Command” class and implement CommandMaker -
  - Delegate methods through to an “Operations” object -
         - Annotate methods with @CliCommand -
    - Annotate method parameters with @CliOption -
- Optionally use @CliAvailabilityIndicator if desired -
  - Throw any exceptions to abort and rollback changes -
  - Use JDK logging or return objects for console output -

                                 Massimiliano Dessì - SpringFramework Italian User Group
                                                  Javaday IV – Roma – 30 gennaio 2010
1.0.1 Base Add-Ons
• Backup              • Logging
• Bean Info           • Maven
• Configurable        • Pluralization
• Data On Demand      • Property Editor
• Email               • Property File
• Entity              • Security
• Dynamic Finder      • Integration Test
• Java Bean           • ToString
• JMS                 • Web (various)
• JPA
                   Massimiliano Dessì - SpringFramework Italian User Group
                                    Javaday IV – Roma – 30 gennaio 2010
Roo Domain Driven Design

Demo for unbelievers
Roo Internals
Maven Roo support
Add On Anatomy
Roo Domain Driven Design
AspectJ Intertype Declaration
SpringSurf Add-on

                                             Massimiliano Dessì - SpringFramework Italian User Group
                                                              Javaday IV – Roma – 30 gennaio 2010
Roo uses a pragmatic design approach.
Following the Domain Driven Design principles,
                  Roo avoids
Anemic Objects and prefers Rich Domain Objects
    that follows Object Oriented principles.
  This means encapsulation, immutability and
         proper role of domain objects
                          Massimiliano Dessì - SpringFramework Italian User Group
                                           Javaday IV – Roma – 30 gennaio 2010
Do you
  remember the
controller-entities
   interaction
  of this slide ?
 Roo works in a
   similar way
                      Massimiliano Dessì - SpringFramework Italian User Group
                                       Javaday IV – Roma – 30 gennaio 2010
Roo by default uses two layers:
An entity layer (similar to domain layer)
        and a web layer (REST).
  Roo achieves separation of concern
          of these two layers
through AspectJ ITD-based architecture.

                       Massimiliano Dessì - SpringFramework Italian User Group
                                        Javaday IV – Roma – 30 gennaio 2010
- REST Controllers work directly with Domain entities -
               - OpenEntityManagerInViewFilter -
     - JPA EntityManager bound to the thread for the entire
                    processing of the request -
             - allow for lazy loading in web views -
        - original transactions already being completed -
- Service layer is optional, it can be created and used for business
                logic spanning multiple entities -
                                    Massimiliano Dessì - SpringFramework Italian User Group
                                                     Javaday IV – Roma – 30 gennaio 2010
AspectJ ITD
                                (where Roo shines)



Demo for unbelievers
Roo Internals
Maven Roo support
Add On Anatomy
Roo Domain Driven Design
AspectJ Intertype Declaration
SpringSurf Add-on

                                          Massimiliano Dessì - SpringFramework Italian User Group
                                                           Javaday IV – Roma – 30 gennaio 2010
Do you
remember
the concept
    of
this slide ?



               Massimiliano Dessì - SpringFramework Italian User Group
                                Javaday IV – Roma – 30 gennaio 2010
The Spring Introductions in the Aspect world
  are called Inter-Type Declarations (ITD) .
           Roo uses AspectJ ITD
instead of Spring Introductions (proxy based).
 With ITD Roo performs active generation.


                         Massimiliano Dessì - SpringFramework Italian User Group
                                          Javaday IV – Roma – 30 gennaio 2010
The ITD enables ROO through the add-on
       to write the custom logic
into <name_class>_Roo_<addOn>.aj files
 related to the corresponding java class
     AspectJ compiler does the rest
  by linking the pieces of the puzzle :)

                      Massimiliano Dessì - SpringFramework Italian User Group
                                       Javaday IV – Roma – 30 gennaio 2010
For example the add-ons Entity, JavaBean, ToString
generates the proper logic in corresponding .aj files.
                  *_Roo_Entity.aj
                *_Roo_JavaBean.aj
                 *_Roo_ToString.aj



                             Massimiliano Dessì - SpringFramework Italian User Group
                                              Javaday IV – Roma – 30 gennaio 2010
With AspectJ ITD
    Roo can implement
an effective Object Oriented
  Domain Driven Design
        application



                Massimiliano Dessì - SpringFramework Italian User Group
                                 Javaday IV – Roma – 30 gennaio 2010
Alfresco SpringSurf add-on



Demo for unbelievers
Roo Internals
Maven Roo support
Add On Anatomy
Roo Domain Driven Design
AspectJ Intertype Declaration
SpringSurf Add-on

                                              Massimiliano Dessì - SpringFramework Italian User Group
                                                               Javaday IV – Roma – 30 gennaio 2010
“Spring Surf is a view composition framework
       for Spring MVC that plugs into
      your existing Spring applications.
                 It provides
  a scriptable and content-centric approach
        to building web applications “

                         Massimiliano Dessì - SpringFramework Italian User Group
                                          Javaday IV – Roma – 30 gennaio 2010
Surf is born from the alfresco community
     need of a lightweight approach
      to create application services
                   and
        user interface extensions
         instead of JSF or Struts

                         Massimiliano Dessì - SpringFramework Italian User Group
                                          Javaday IV – Roma – 30 gennaio 2010
Spring Surf is an official
    Spring extension by Alfresco.
        (http://www.springsource.org/extensions/se-surf)


     Roo enables scaffolding for
Surf pages, templates and components.


                                     Massimiliano Dessì - SpringFramework Italian User Group
                                                           Javaday IV – Roma – 30 gennaio 2010
The Spring Surf Roo add-on
shows one of the many possibilities
  that Roo provides with its API




                   Massimiliano Dessì - SpringFramework Italian User Group
                                    Javaday IV – Roma – 30 gennaio 2010
Spring-Surf mini demo




            Massimiliano Dessì - SpringFramework Italian User Group
                             Javaday IV – Roma – 30 gennaio 2010
Q&A



Massimiliano Dessì - SpringFramework Italian User Group
                 Javaday IV – Roma – 30 gennaio 2010
• Home                                            Project resources
• http://www.springsource.org/roo
• Contains links to all other resources

• Forum
• http://forum.springsource.org

• Issues
• http://jira.springframework.org/browse/ROO

• Twitter
• #roo hash key
• follow @schmidtstefan & @benalexau




                                               Massimiliano Dessì - SpringFramework Italian User Group
                                                                Javaday IV – Roma – 30 gennaio 2010
Thanks for the attention !
          Massimiliano Dessì
          desmax74 at yahoo.it
massimiliano.dessi at pronetics.it

                 http://twitter.com/desmax74
                  http://jroller.com/desmax
            http://www.linkedin.com/in/desmax74
             http://www.slideshare.net/desmax74
    http://wiki.java.net/bin/view/People/MassimilianoDessi
http://www.jugsardegna.org/vqwiki/jsp/Wiki?MassimilianoDessi
                                     Massimiliano Dessì - SpringFramework Italian User Group
                                                        Javaday IV – Roma – 30 gennaio 2010

Weitere ähnliche Inhalte

Ähnlich wie Spring Roo Internals and Add-ons

IRJET - Automation in Python using Speech Recognition
IRJET -  	  Automation in Python using Speech RecognitionIRJET -  	  Automation in Python using Speech Recognition
IRJET - Automation in Python using Speech RecognitionIRJET Journal
 
JavaScript Power Tools 2015 - Marcello Teodori - Codemotion Rome 2015
JavaScript Power Tools 2015 - Marcello Teodori - Codemotion Rome 2015JavaScript Power Tools 2015 - Marcello Teodori - Codemotion Rome 2015
JavaScript Power Tools 2015 - Marcello Teodori - Codemotion Rome 2015Codemotion
 
JavaScript Power Tools 2015
JavaScript Power Tools 2015JavaScript Power Tools 2015
JavaScript Power Tools 2015Marcello Teodori
 
Continous Monitoring with Hudson JMeter and iPhone
Continous Monitoring with Hudson JMeter and iPhoneContinous Monitoring with Hudson JMeter and iPhone
Continous Monitoring with Hudson JMeter and iPhoneRiccardo Solimena
 
Continous monitoring con Hudson, Jmeter e iPhone
Continous monitoring con Hudson, Jmeter e iPhoneContinous monitoring con Hudson, Jmeter e iPhone
Continous monitoring con Hudson, Jmeter e iPhoneCodemotion
 
A brief overview of java frameworks
A brief overview of java frameworksA brief overview of java frameworks
A brief overview of java frameworksMD Sayem Ahmed
 
Moven - Apache Big Data Europe 2016 - SSIX Project
Moven - Apache Big Data Europe 2016 - SSIX ProjectMoven - Apache Big Data Europe 2016 - SSIX Project
Moven - Apache Big Data Europe 2016 - SSIX ProjectSergio Fernández
 
Lean Engineering. Applying Lean Principles to Building Experiences
Lean Engineering. Applying Lean Principles to Building ExperiencesLean Engineering. Applying Lean Principles to Building Experiences
Lean Engineering. Applying Lean Principles to Building ExperiencesBill Scott
 
Spring Roo 1.0.0 Technical Deep Dive
Spring Roo 1.0.0 Technical Deep DiveSpring Roo 1.0.0 Technical Deep Dive
Spring Roo 1.0.0 Technical Deep DiveBen Alex
 
Razor Agile Development: Shave time off your SPRINTS using Razor for Agile De...
Razor Agile Development: Shave time off your SPRINTS using Razor for Agile De...Razor Agile Development: Shave time off your SPRINTS using Razor for Agile De...
Razor Agile Development: Shave time off your SPRINTS using Razor for Agile De...Michael Cesino
 
[Ultracode Munich #4] Short introduction to the new Android build system incl...
[Ultracode Munich #4] Short introduction to the new Android build system incl...[Ultracode Munich #4] Short introduction to the new Android build system incl...
[Ultracode Munich #4] Short introduction to the new Android build system incl...BeMyApp
 
Focus Group Open Source 28.4.2010 Paolo Maresca
Focus Group Open Source 28.4.2010 Paolo MarescaFocus Group Open Source 28.4.2010 Paolo Maresca
Focus Group Open Source 28.4.2010 Paolo MarescaRoberto Galoppini
 
Feature Bits at LSSC10
Feature  Bits at LSSC10Feature  Bits at LSSC10
Feature Bits at LSSC10Erik Sowa
 
Whoops! Where did my architecture go?
Whoops! Where did my architecture go?Whoops! Where did my architecture go?
Whoops! Where did my architecture go?Oliver Gierke
 
Obiettivi e progetti della comunità Eclipse italiana
Obiettivi e progetti della comunità Eclipse italianaObiettivi e progetti della comunità Eclipse italiana
Obiettivi e progetti della comunità Eclipse italianaEclipse Day 2010 in Rome
 
Developing Agile Java Applications using Spring tools
Developing Agile Java Applications using Spring toolsDeveloping Agile Java Applications using Spring tools
Developing Agile Java Applications using Spring toolsSathish Chittibabu
 

Ähnlich wie Spring Roo Internals and Add-ons (20)

IRJET - Automation in Python using Speech Recognition
IRJET -  	  Automation in Python using Speech RecognitionIRJET -  	  Automation in Python using Speech Recognition
IRJET - Automation in Python using Speech Recognition
 
JavaScript Power Tools 2015 - Marcello Teodori - Codemotion Rome 2015
JavaScript Power Tools 2015 - Marcello Teodori - Codemotion Rome 2015JavaScript Power Tools 2015 - Marcello Teodori - Codemotion Rome 2015
JavaScript Power Tools 2015 - Marcello Teodori - Codemotion Rome 2015
 
JavaScript Power Tools 2015
JavaScript Power Tools 2015JavaScript Power Tools 2015
JavaScript Power Tools 2015
 
Debugging
DebuggingDebugging
Debugging
 
Continous Monitoring with Hudson JMeter and iPhone
Continous Monitoring with Hudson JMeter and iPhoneContinous Monitoring with Hudson JMeter and iPhone
Continous Monitoring with Hudson JMeter and iPhone
 
L09 Frameworks
L09 FrameworksL09 Frameworks
L09 Frameworks
 
Continous monitoring con Hudson, Jmeter e iPhone
Continous monitoring con Hudson, Jmeter e iPhoneContinous monitoring con Hudson, Jmeter e iPhone
Continous monitoring con Hudson, Jmeter e iPhone
 
A brief overview of java frameworks
A brief overview of java frameworksA brief overview of java frameworks
A brief overview of java frameworks
 
Selenium for Designers
Selenium for DesignersSelenium for Designers
Selenium for Designers
 
Moven - Apache Big Data Europe 2016 - SSIX Project
Moven - Apache Big Data Europe 2016 - SSIX ProjectMoven - Apache Big Data Europe 2016 - SSIX Project
Moven - Apache Big Data Europe 2016 - SSIX Project
 
Lean Engineering. Applying Lean Principles to Building Experiences
Lean Engineering. Applying Lean Principles to Building ExperiencesLean Engineering. Applying Lean Principles to Building Experiences
Lean Engineering. Applying Lean Principles to Building Experiences
 
PureMVC
PureMVCPureMVC
PureMVC
 
Spring Roo 1.0.0 Technical Deep Dive
Spring Roo 1.0.0 Technical Deep DiveSpring Roo 1.0.0 Technical Deep Dive
Spring Roo 1.0.0 Technical Deep Dive
 
Razor Agile Development: Shave time off your SPRINTS using Razor for Agile De...
Razor Agile Development: Shave time off your SPRINTS using Razor for Agile De...Razor Agile Development: Shave time off your SPRINTS using Razor for Agile De...
Razor Agile Development: Shave time off your SPRINTS using Razor for Agile De...
 
[Ultracode Munich #4] Short introduction to the new Android build system incl...
[Ultracode Munich #4] Short introduction to the new Android build system incl...[Ultracode Munich #4] Short introduction to the new Android build system incl...
[Ultracode Munich #4] Short introduction to the new Android build system incl...
 
Focus Group Open Source 28.4.2010 Paolo Maresca
Focus Group Open Source 28.4.2010 Paolo MarescaFocus Group Open Source 28.4.2010 Paolo Maresca
Focus Group Open Source 28.4.2010 Paolo Maresca
 
Feature Bits at LSSC10
Feature  Bits at LSSC10Feature  Bits at LSSC10
Feature Bits at LSSC10
 
Whoops! Where did my architecture go?
Whoops! Where did my architecture go?Whoops! Where did my architecture go?
Whoops! Where did my architecture go?
 
Obiettivi e progetti della comunità Eclipse italiana
Obiettivi e progetti della comunità Eclipse italianaObiettivi e progetti della comunità Eclipse italiana
Obiettivi e progetti della comunità Eclipse italiana
 
Developing Agile Java Applications using Spring tools
Developing Agile Java Applications using Spring toolsDeveloping Agile Java Applications using Spring tools
Developing Agile Java Applications using Spring tools
 

Mehr von Massimiliano Dessì

When Old Meets New: Turning Maven into a High Scalable, Resource Efficient, C...
When Old Meets New: Turning Maven into a High Scalable, Resource Efficient, C...When Old Meets New: Turning Maven into a High Scalable, Resource Efficient, C...
When Old Meets New: Turning Maven into a High Scalable, Resource Efficient, C...Massimiliano Dessì
 
Microservices in Go_Dessi_Massimiliano_Codemotion_2017_Rome
Microservices in Go_Dessi_Massimiliano_Codemotion_2017_Rome Microservices in Go_Dessi_Massimiliano_Codemotion_2017_Rome
Microservices in Go_Dessi_Massimiliano_Codemotion_2017_Rome Massimiliano Dessì
 
Dessi docker kubernetes paas cloud
Dessi docker kubernetes paas cloudDessi docker kubernetes paas cloud
Dessi docker kubernetes paas cloudMassimiliano Dessì
 
Web Marketing Training 2014 Community Online
Web Marketing Training 2014 Community OnlineWeb Marketing Training 2014 Community Online
Web Marketing Training 2014 Community OnlineMassimiliano Dessì
 
Vert.X like Node.js but polyglot and reactive on JVM
Vert.X like Node.js but polyglot and reactive on JVMVert.X like Node.js but polyglot and reactive on JVM
Vert.X like Node.js but polyglot and reactive on JVMMassimiliano Dessì
 
Reactive applications Linux Day 2013
Reactive applications Linux Day 2013Reactive applications Linux Day 2013
Reactive applications Linux Day 2013Massimiliano Dessì
 
Scala Italy 2013 extended Scalatra vs Spring MVC
Scala Italy 2013 extended Scalatra vs Spring MVCScala Italy 2013 extended Scalatra vs Spring MVC
Scala Italy 2013 extended Scalatra vs Spring MVCMassimiliano Dessì
 
Codemotion 2013 scalatra_play_spray
Codemotion 2013 scalatra_play_sprayCodemotion 2013 scalatra_play_spray
Codemotion 2013 scalatra_play_sprayMassimiliano Dessì
 
Why we cannot ignore functional programming
Why we cannot ignore functional programmingWhy we cannot ignore functional programming
Why we cannot ignore functional programmingMassimiliano Dessì
 
Three languages in thirty minutes
Three languages in thirty minutesThree languages in thirty minutes
Three languages in thirty minutesMassimiliano Dessì
 

Mehr von Massimiliano Dessì (20)

Code One 2018 maven
Code One 2018   mavenCode One 2018   maven
Code One 2018 maven
 
When Old Meets New: Turning Maven into a High Scalable, Resource Efficient, C...
When Old Meets New: Turning Maven into a High Scalable, Resource Efficient, C...When Old Meets New: Turning Maven into a High Scalable, Resource Efficient, C...
When Old Meets New: Turning Maven into a High Scalable, Resource Efficient, C...
 
Hacking Maven Linux day 2017
Hacking Maven Linux day 2017Hacking Maven Linux day 2017
Hacking Maven Linux day 2017
 
Microservices in Go_Dessi_Massimiliano_Codemotion_2017_Rome
Microservices in Go_Dessi_Massimiliano_Codemotion_2017_Rome Microservices in Go_Dessi_Massimiliano_Codemotion_2017_Rome
Microservices in Go_Dessi_Massimiliano_Codemotion_2017_Rome
 
Dessi docker kubernetes paas cloud
Dessi docker kubernetes paas cloudDessi docker kubernetes paas cloud
Dessi docker kubernetes paas cloud
 
Docker dDessi november 2015
Docker dDessi november 2015Docker dDessi november 2015
Docker dDessi november 2015
 
Docker linuxday 2015
Docker linuxday 2015Docker linuxday 2015
Docker linuxday 2015
 
Openshift linuxday 2014
Openshift linuxday 2014Openshift linuxday 2014
Openshift linuxday 2014
 
Web Marketing Training 2014 Community Online
Web Marketing Training 2014 Community OnlineWeb Marketing Training 2014 Community Online
Web Marketing Training 2014 Community Online
 
Vert.X like Node.js but polyglot and reactive on JVM
Vert.X like Node.js but polyglot and reactive on JVMVert.X like Node.js but polyglot and reactive on JVM
Vert.X like Node.js but polyglot and reactive on JVM
 
Reactive applications Linux Day 2013
Reactive applications Linux Day 2013Reactive applications Linux Day 2013
Reactive applications Linux Day 2013
 
Scala Italy 2013 extended Scalatra vs Spring MVC
Scala Italy 2013 extended Scalatra vs Spring MVCScala Italy 2013 extended Scalatra vs Spring MVC
Scala Italy 2013 extended Scalatra vs Spring MVC
 
Codemotion 2013 scalatra_play_spray
Codemotion 2013 scalatra_play_sprayCodemotion 2013 scalatra_play_spray
Codemotion 2013 scalatra_play_spray
 
Why we cannot ignore functional programming
Why we cannot ignore functional programmingWhy we cannot ignore functional programming
Why we cannot ignore functional programming
 
Scala linux day 2012
Scala linux day 2012 Scala linux day 2012
Scala linux day 2012
 
Three languages in thirty minutes
Three languages in thirty minutesThree languages in thirty minutes
Three languages in thirty minutes
 
MongoDB dessi-codemotion
MongoDB dessi-codemotionMongoDB dessi-codemotion
MongoDB dessi-codemotion
 
MongoDB Webtech conference 2010
MongoDB Webtech conference 2010MongoDB Webtech conference 2010
MongoDB Webtech conference 2010
 
RESTEasy
RESTEasyRESTEasy
RESTEasy
 
Spring Roo JaxItalia09
Spring Roo JaxItalia09Spring Roo JaxItalia09
Spring Roo JaxItalia09
 

Kürzlich hochgeladen

My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 

Kürzlich hochgeladen (20)

My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 

Spring Roo Internals and Add-ons

  • 1. Spring ROO Internals and add-ons Massimiliano Dessì - SpringFramework Italian User Group Javaday IV – Roma – 30 gennaio 2010
  • 2. Speaker Software Architect / Developer ProNetics / Sourcesense Chairman JugSardegna Onlus Founder SpringFramework Italian User Group Committer - Contributor OpenNMS - MongoDB - MagicBox Author Spring 2.5 Aspect Oriented Programming Massimiliano Dessì - SpringFramework Italian User Group Javaday IV – Roma – 30 gennaio 2010
  • 3. Agenda - Demo for unbelievers- - Roo Internals - - Maven Roo support - - Add On Anatomy - - Roo Domain Driven Design - - AspectJ Intertype Declaration - - SpringSurf Add-on - Massimiliano Dessì - SpringFramework Italian User Group Javaday IV – Roma – 30 gennaio 2010
  • 4. 5 Minutes demo for Unbelievers Demo for unbelievers Roo Internals Maven Roo support Add On Anatomy Roo Domain Driven Design AspectJ Intertype Declaration SpringSurf Add-on Massimiliano Dessì - SpringFramework Italian User Group Javaday IV – Roma – 30 gennaio 2010
  • 5. Roo internals Demo for unbelievers Roo Internals Maven Roo support Add On Anatomy Roo Domain Driven Design AspectJ Intertype Declaration SpringSurf Add-on Massimiliano Dessì - SpringFramework Italian User Group Javaday IV – Roma – 30 gennaio 2010
  • 6. Core modules Classpath ProcessManager Shell Project File Undo File Monitor Model Metadata Support Massimiliano Dessì - SpringFramework Italian User Group Javaday IV – Roma – 30 gennaio 2010
  • 7. Roo in its essence is an interactive shell and a ProcessManager The Shell receives the commands and a ProcessManager coordinates the operations required from the user Massimiliano Dessì - SpringFramework Italian User Group Javaday IV – Roma – 30 gennaio 2010
  • 8. - The Shell has a very good usability - (tab, context awareness, hiding, hints) - Background monitoring of externally-made changes - - Full interaction with Spring Tool Suite - Massimiliano Dessì - SpringFramework Italian User Group Javaday IV – Roma – 30 gennaio 2010
  • 9. Shell The Shell parses and validates the user input and publishes the status about current task STARTING, STARTED, USER_INPUT, PARSING, EXECUTING, EXECUTION_RESULT_PROCESSING, EXECUTION_COMPLETE, SHUTTING_DOWN Massimiliano Dessì - SpringFramework Italian User Group Javaday IV – Roma – 30 gennaio 2010
  • 10. ProcessManager The Shell passes the ParseResult object to the execute method of the ProcessManager (Strategy pattern) Massimiliano Dessì - SpringFramework Italian User Group Javaday IV – Roma – 30 gennaio 2010
  • 11. ProcessManager ProcessManager delivers: - State publication model - - Polling on filesystem resources - - Execute CommandCallbacks for requested operations - - "Transaction-like" context for above operations - Massimiliano Dessì - SpringFramework Italian User Group Javaday IV – Roma – 30 gennaio 2010
  • 12. Commands During the bootstrap ROO reads all bean classes of type CommandMarker (Tag interface) Massimiliano Dessì - SpringFramework Italian User Group Javaday IV – Roma – 30 gennaio 2010
  • 13. The Shell stores the metadata information (@CliAvailabilityIndicator) read from all CommandMarker beans In this way the Shell knows all available commands and MethodTarget related to user input Massimiliano Dessì - SpringFramework Italian User Group Javaday IV – Roma – 30 gennaio 2010
  • 14. The Command class (CommandMarker) uses the related Operations class. The Operations class performs the real work on Java and AspectJ classes, XML and template files. Massimiliano Dessì - SpringFramework Italian User Group Javaday IV – Roma – 30 gennaio 2010
  • 15. Maven ROO support sometimes maven is your friend :) Demo for unbelievers Roo Internals Maven Roo support Add On Anatomy Roo Domain Driven Design AspectJ Intertype Declaration SpringSurf Add-on Massimiliano Dessì - SpringFramework Italian User Group Javaday IV – Roma – 30 gennaio 2010
  • 16. Roo uses Maven under the hood for: building the entire project and managing dependencies roo> project --topLevelPackage com.proj.roo.addon add-on development roo> project --topLevelPackage com.proj.roo.addon --template ROO_ADDON_SIMPLE eclipse / STS roo> perform eclipse packaging roo> perform assembly Massimiliano Dessì - SpringFramework Italian User Group Javaday IV – Roma – 30 gennaio 2010
  • 17. Add-On anatomy Security add-on in the example Demo for unbelievers Roo Internals Maven Roo support Add On Anatomy Roo Domain Driven Design AspectJ Intertype Declaration SpringSurf Add-on Massimiliano Dessì - SpringFramework Italian User Group Javaday IV – Roma – 30 gennaio 2010
  • 18. @ScopeDevelopmentShell public class SecurityCommands implements CommandMarker{ private SecurityOperations securityOperations; public SecurityCommands(SecurityOperations securityOperations) { Assert.notNull(securityOperations, "Security operations required"); this.securityOperations = securityOperations; } @CliAvailabilityIndicator("security setup") public boolean isInstallSecurityAvailable() { return securityOperations.isInstallSecurityAvailable(); } @CliCommand(value = "security setup", help = "Install Spring Security into your project") public void installSecurity() { securityOperations.installSecurity(); } } Massimiliano Dessì - SpringFramework Italian User Group Javaday IV – Roma – 30 gennaio 2010
  • 19. Security add-on @ScopeDevelopmentShell public class SecurityCommands implements CommandMarker … public SecurityCommands(SecurityOperations securityOperations) { Assert.notNull(securityOperations, "Security operations required"); this.securityOperations = securityOperations; } @ScopeDevelopmentShell : Indicates a class that should be instantiated when the ROO development Shell is used. CommandMarker : Tag Interface, the Command class must implement this interface Massimiliano Dessì - SpringFramework Italian User Group Javaday IV – Roma – 30 gennaio 2010
  • 20. Commands @CliAvailabilityIndicator("security setup") public boolean isInstallSecurityAvailable() { return securityOperations.isInstallSecurityAvailable(); } @CliAvailabilityIndicator:Annotates a method that can indicate whether a particular command is currently available or not. This annotation must only be applied to a public no-argument method that returns primitive boolean. The method should be inexpensive to evaluate, as this method can be called very frequently. If expensive operations are necessary to compute command availability, it is suggested the method return a boolean field that is maintained using the observer pattern. Massimiliano Dessì - SpringFramework Italian User Group Javaday IV – Roma – 30 gennaio 2010
  • 21. Commands @CliCommand(value = "security setup", help = "Install Spring Security into your project") public void installSecurity() { securityOperations.installSecurity(); } ... @CliCommand value: one or more strings which must serve as the start of a particular command in order to match this method (these must be unique within the entire application) help: help message for this command (the default is a blank String, which means there is no help) Massimiliano Dessì - SpringFramework Italian User Group Javaday IV – Roma – 30 gennaio 2010
  • 22. Operations @ScopeDevelopment public class SecurityOperations private FileManager fileManager; private PathResolver pathResolver; private MetadataService metadataService; private ProjectOperations projectOperations; .... The SecurityOperations uses the above convenient Roo API to fulfill its purpose: - Find/write and read any resources (Java, XML, JSP, Properties, AJ) on filesystem - Read metadata - Handle the POM file Massimiliano Dessì - SpringFramework Italian User Group Javaday IV – Roma – 30 gennaio 2010
  • 23. Recap, add-on should: - Make a “Command” class and implement CommandMaker - - Delegate methods through to an “Operations” object - - Annotate methods with @CliCommand - - Annotate method parameters with @CliOption - - Optionally use @CliAvailabilityIndicator if desired - - Throw any exceptions to abort and rollback changes - - Use JDK logging or return objects for console output - Massimiliano Dessì - SpringFramework Italian User Group Javaday IV – Roma – 30 gennaio 2010
  • 24. 1.0.1 Base Add-Ons • Backup • Logging • Bean Info • Maven • Configurable • Pluralization • Data On Demand • Property Editor • Email • Property File • Entity • Security • Dynamic Finder • Integration Test • Java Bean • ToString • JMS • Web (various) • JPA Massimiliano Dessì - SpringFramework Italian User Group Javaday IV – Roma – 30 gennaio 2010
  • 25. Roo Domain Driven Design Demo for unbelievers Roo Internals Maven Roo support Add On Anatomy Roo Domain Driven Design AspectJ Intertype Declaration SpringSurf Add-on Massimiliano Dessì - SpringFramework Italian User Group Javaday IV – Roma – 30 gennaio 2010
  • 26. Roo uses a pragmatic design approach. Following the Domain Driven Design principles, Roo avoids Anemic Objects and prefers Rich Domain Objects that follows Object Oriented principles. This means encapsulation, immutability and proper role of domain objects Massimiliano Dessì - SpringFramework Italian User Group Javaday IV – Roma – 30 gennaio 2010
  • 27. Do you remember the controller-entities interaction of this slide ? Roo works in a similar way Massimiliano Dessì - SpringFramework Italian User Group Javaday IV – Roma – 30 gennaio 2010
  • 28. Roo by default uses two layers: An entity layer (similar to domain layer) and a web layer (REST). Roo achieves separation of concern of these two layers through AspectJ ITD-based architecture. Massimiliano Dessì - SpringFramework Italian User Group Javaday IV – Roma – 30 gennaio 2010
  • 29. - REST Controllers work directly with Domain entities - - OpenEntityManagerInViewFilter - - JPA EntityManager bound to the thread for the entire processing of the request - - allow for lazy loading in web views - - original transactions already being completed - - Service layer is optional, it can be created and used for business logic spanning multiple entities - Massimiliano Dessì - SpringFramework Italian User Group Javaday IV – Roma – 30 gennaio 2010
  • 30. AspectJ ITD (where Roo shines) Demo for unbelievers Roo Internals Maven Roo support Add On Anatomy Roo Domain Driven Design AspectJ Intertype Declaration SpringSurf Add-on Massimiliano Dessì - SpringFramework Italian User Group Javaday IV – Roma – 30 gennaio 2010
  • 31. Do you remember the concept of this slide ? Massimiliano Dessì - SpringFramework Italian User Group Javaday IV – Roma – 30 gennaio 2010
  • 32. The Spring Introductions in the Aspect world are called Inter-Type Declarations (ITD) . Roo uses AspectJ ITD instead of Spring Introductions (proxy based). With ITD Roo performs active generation. Massimiliano Dessì - SpringFramework Italian User Group Javaday IV – Roma – 30 gennaio 2010
  • 33. The ITD enables ROO through the add-on to write the custom logic into <name_class>_Roo_<addOn>.aj files related to the corresponding java class AspectJ compiler does the rest by linking the pieces of the puzzle :) Massimiliano Dessì - SpringFramework Italian User Group Javaday IV – Roma – 30 gennaio 2010
  • 34. For example the add-ons Entity, JavaBean, ToString generates the proper logic in corresponding .aj files. *_Roo_Entity.aj *_Roo_JavaBean.aj *_Roo_ToString.aj Massimiliano Dessì - SpringFramework Italian User Group Javaday IV – Roma – 30 gennaio 2010
  • 35. With AspectJ ITD Roo can implement an effective Object Oriented Domain Driven Design application Massimiliano Dessì - SpringFramework Italian User Group Javaday IV – Roma – 30 gennaio 2010
  • 36. Alfresco SpringSurf add-on Demo for unbelievers Roo Internals Maven Roo support Add On Anatomy Roo Domain Driven Design AspectJ Intertype Declaration SpringSurf Add-on Massimiliano Dessì - SpringFramework Italian User Group Javaday IV – Roma – 30 gennaio 2010
  • 37. “Spring Surf is a view composition framework for Spring MVC that plugs into your existing Spring applications. It provides a scriptable and content-centric approach to building web applications “ Massimiliano Dessì - SpringFramework Italian User Group Javaday IV – Roma – 30 gennaio 2010
  • 38. Surf is born from the alfresco community need of a lightweight approach to create application services and user interface extensions instead of JSF or Struts Massimiliano Dessì - SpringFramework Italian User Group Javaday IV – Roma – 30 gennaio 2010
  • 39. Spring Surf is an official Spring extension by Alfresco. (http://www.springsource.org/extensions/se-surf) Roo enables scaffolding for Surf pages, templates and components. Massimiliano Dessì - SpringFramework Italian User Group Javaday IV – Roma – 30 gennaio 2010
  • 40. The Spring Surf Roo add-on shows one of the many possibilities that Roo provides with its API Massimiliano Dessì - SpringFramework Italian User Group Javaday IV – Roma – 30 gennaio 2010
  • 41. Spring-Surf mini demo Massimiliano Dessì - SpringFramework Italian User Group Javaday IV – Roma – 30 gennaio 2010
  • 42. Q&A Massimiliano Dessì - SpringFramework Italian User Group Javaday IV – Roma – 30 gennaio 2010
  • 43. • Home Project resources • http://www.springsource.org/roo • Contains links to all other resources • Forum • http://forum.springsource.org • Issues • http://jira.springframework.org/browse/ROO • Twitter • #roo hash key • follow @schmidtstefan & @benalexau Massimiliano Dessì - SpringFramework Italian User Group Javaday IV – Roma – 30 gennaio 2010
  • 44. Thanks for the attention ! Massimiliano Dessì desmax74 at yahoo.it massimiliano.dessi at pronetics.it http://twitter.com/desmax74 http://jroller.com/desmax http://www.linkedin.com/in/desmax74 http://www.slideshare.net/desmax74 http://wiki.java.net/bin/view/People/MassimilianoDessi http://www.jugsardegna.org/vqwiki/jsp/Wiki?MassimilianoDessi Massimiliano Dessì - SpringFramework Italian User Group Javaday IV – Roma – 30 gennaio 2010