SlideShare une entreprise Scribd logo
1  sur  40
Télécharger pour lire hors ligne
Spring ME
Unleashing Spring to the Rest of
the Platorm


J-Spring 2009
Wilfred Springer
Java is doing AWESOME!




                                                          2
        Source: Tiobe Programming Community Index March
Spring is doing GREAT!




          =
    +




                                             3
                  Source: Evans Data, 2008
But that's like... a freaking big
number




                                    4
… or is it?


   SAN MATEO, Calif.—November 19, 2008 –
   SpringSource, a leading provider of infrastructure
   software and the company behind Spring, the de facto
   standard in enterprise Java, today announced that
   results from an extensive Evans Data research study
   reveal large scale adoption and penetration of Spring
   as a means of increasing developer productivity and
   combating complexity in today’s enterprise
   application infrastructure market.


                                                           5
Java Nodes in the Cloud

    3 Billion Java-Enabled Cards in 2007
●


    1.8 Billion Java-Enabled Phones in 2007
●


    7 Million Java Set-top Boxes
●


    1 Million GWT downloads in 2007
●




                                              6
Not all men are equal




             Versus




                        7
We the people



 “We hold these truths to be self-evident, that all
men are created equal, that they are endowed by
their Creator with certain unalienable Rights, that
 among these are Life, Liberty, and the Pursuit of
                    Happiness.”


                                                      8
We the people


“We hold these truths to be self-evident, that all
 men... Java Developers are enttled to get their
          porton of Spring goodness.”

          Not just Java EE developers
          Not just Java SE developers
          But also Java ME developers
           And Java Card developers

                                                     9
Why Spring?




   All Spring's goodness summarized in
             famous last words




                                         10
IoC Container




   “Trust us, we know what we're doing.”
         “Don't call us, we call you.”




                                           11
Sanitized API




“Any problem in computer science can be solved
       with another layer of indirecton.”
                         – David Wheeler
AOP




“Once you have a hammer, everything else is a
                   nail.”
So why not use Spring itself?

Platorm Limitatons
 ● Limited Java Runtme capabilites


 ● Limitatons imposed by deployment


 ● Limited computatonal resources


          Limitatons on heap
      –
          Limitatons on applicaton size
      –
          Limitatons on performance
      –
Java Runtime Limitations
                                                ct
                                         )
                                       e( refle
                                )
                             ... anc g.
                           e( s t        n tring
                         am In a.la .S                          i st
                       rN e w a v                          il.L
                                           ng
                     o
                  s.f ss.n er j a.la r                  ut
                                                     a.
                as la                         a
                               h                    v
                                     v
                           Ot
             Cl                            ch    ja
                                  ja
                     C
 GWT         n       n     n      y        y     y
 Java ME     y       y     n      y        y     n
 Java Card   n       n     n      n        n     n

        BeanFactory#getBean(String name)?
        BeanFactory#getBean(char[] name)?
Deployment Limitations (1)

    <bean id=”movie1” class=”sample.Movie”>
      <property name=”title” value=”Into the Wild”/>
                                                         1
    </bean>

                      OBFUSCATION
                                    package a.b;
package com.mgm;
                                    public class a {
public class Movie {
                                      void a(String ...);
  void setTitle(String title);
                                    }
}
                         2                               3

    <bean id=”movie1” class=”a.b.a”>
      <property name=”a” value=”Into the Wild”/>
    </bean>
                                                         4
Deployment Limitations (2)
    GWT → JavaScript
●


    Java Card → CAP fles
●
Computational Resources (1)

    Heap:
●


    Java SE
●


            Max heap approx. 1.5 GB
        –

    Java ME
●


            Lower bound max. heap: 140 KB
        –
            Upper bound max. heap: 128 MB
        –
            Between factor 11 and 11,714 diference
        –

    Java Card
●


            16 K RAM
        –
Computational Resources (2)
    Applicaton size:
●


    Java ME: Upperbounds between 64 KB and 28 MB
●




        Spring Core        267KB
        Spring Beans       467KB
        Spring Context     455KB
        Total             1189KB
Throughput

    Nokia E71:
●


            369 MHz ARM 11 CPU
        –

    Gameboy Advance
●


            16 MHz ARM 7 CPU
        –
            C-Ray Raytracing Benchmark 296108 s
        –

    Dell PowerEdge M710
●


            2.4 GHz Xeon Quad Core CPU
        –
            C-Ray Raytracing Benchmark 201 s
        –
Introducing Spring ME's IoC
                        Do most of the
                        hard work at
                        build time




                                   21
Assume this object model




                           22
And you want to create this




                              23
The Spring (ME) configuration
<beans xmlns=”…”>
  <bean id=”movieFinder” class=”….InMemoryMovieFinder”>
    <property name=”movies”>
      <list>
         <bean class=”….Movie”>
           <property name=”title” value=”Bye Bye Blue Bird”/>
           <property name=”director” value=”Søren Kragh-Jacobsen”/>
           <property name=”year” value=”1999”/>
         </bean>
         …
      </list>
    </property>
  </bean>
</beans>




                                                                      24
… And with the Maven plugin
<project>
  <build>
    <plugins>
      <plugin>
        <groupId>me.springframework</groupId>
        <artifactId>spring-me-maven-plugin</artifactId>
        <version>1.0-SNAPSHOT</version>
        <executions>
          <execution>
            <goals>
               <goal>generate</goal>
            </goals>
            <configuration>
               <contextFile>....context.xml</contextFile>
               <className>com.mgm.BeanFactory</className>
            </configuration>
          </execution>
        </executions>

                                                            25
You get this BeanFactory

public class BeanFactory {

    public Object getBean(String name) {
      if (“movieFinder”.equals(name)) {
        return getMovieFinder();
      }
    }

    private final Object getMovieFinder() { … }
    …
}




                                                  26
DEMO
    Spring ME on Java SE
●


    Spring ME on Java ME
●


    Spring ME on GWT
●




                           27
Spring ME

    Compile tme validaton
●


         “Is 10e2 a valid int representaton?”
     –

         “Is an instance of Boeing747 assignable to a
     –
           property of type Airplane?”
    Minimal or no runtme dependencies
●


    Superfast (but no benchmarks to verify this)
●


    Small (1K?)
●
Under the hood




                 29
Spring ME Meta Model

    Meta Model independent of Spring
●


    Typically Spring XML confguraton is used
●


    Meta Model supports other sources
●




     Spring XML                     Spring ME
                    Spring ME
    Configuration                  BeanFactory
                    Meta Model

                                                 30
Other sources?
                  @Autowired        @ProvidedBy
                  @PostConstruct    @Inject
                  @PostDestroy      @ImplementedBy




   Annotations




                                            Spring ME
                       Spring ME
                                           BeanFactory
                       Meta Model


   Spring XML
  Configuration                                          31
Spring ME's Meta Model




                         32
Meta Model Instantiated




                          33
If not Spring ME, then what?
                            GWT
                        ●
    Java Card
●

                                 GWToolbox
                             –
         None
     –
                                 Rocket GWT
                             –
         (Spring ME?)
     –
                                 GIN
                             –
    Java ME
●
                                 Spring ME
                             –
         Signal
     –
                                 Suco
                             –
         Israfl IoC
     –
         Fall ME
     –
         Spring ME
     –
Inversion of Control Galore

                                                                                                x
                                                                                  ion rs nta
                                                                               at           y               n
                                                                             ur olde t S                 tio n
                                                                       n ig
                                                                                                      jec ctio
                                                        s            o                n
                                                              od rati onf ceh plia
                                                     od                                            in
                                                            h
                                                   h
                                                 et od met figu on c pla om                 s* tor inje
                               s es                                                                            g
                                                                                           n
                        E ton yp               m th y                                    io truc rty me e irin
                                                             n ati rty C
                                             y             o                           t
                  T va M gle otot zy ger ctor t me stro L c not ope ring as llec ns ope na typ tow
                                                                           i
                        n                    i
                W
               G Ja Si Pr La Ea Fa In De XM An Pr Sp Al Co Co Pr By By Au
Rocket GWT    y n y y y y y y y y n y n n all y y y n ?
Spring ME     y y y y y y y y y y n n y n l/m y y y y ...
Israfil IoC   n y y n n n n n n n n n n n ... y n n y y
Fall ME       n y y n n n n n n n n n n n ... y n n n n
GWToolbox     y n y y y y ? y y n y y n n all n y n y y
Signal        n n y y n n ? n n n y n y n all n y y ? ?




                                                                                                       35
The Rest: Sanitized API
    Java ME needs a lot more sanity
●


            J2ME Polish is your friend
        –

    Java Card is probably too limited to use
●

    wrapper API
    GWT is already addressed by a lot of
●

    frameworks



                                               36
The Rest: AOP?
    What about it?
●


    Using the metadata, proxies could be
●

    constructed at build tme
    The factory could construct these proxies
●

    instead of the actual objects




                                                37
Current status

     'Request' scope
 ●


     'Session' scope
 ●


     'Global session' scope
 ●


     BeanFactoryAware, but ...
 ●


     BeanPostProcessor (without refecton?)
 ●


     BeanFactoryPostProcessor, but ...
 ●


     FactoryBean, but ...
 ●




                                             38
If there's only one thing
    “ME” as in “supportng Java ME”
●


    “ME” as in “a microscopic small version of
●

    Spring”
    Useful for Java ME
●


    Useful for GWT
●


    Useful for Java SE
●


    Potentally useful for Java Card and Java EE
●




                                                  39
Roadmap
    Version 1.0 (J109 release) end of May 2009
●


    Integraton with J2ME Polish
●


    BOF-4470, June 4, JavaOne
●


    htp://springframework.me/
●


    spring-me@googlegroups.com
●




                                                 40

Contenu connexe

Tendances

Vaadin7 modern-web-apps-in-java
Vaadin7 modern-web-apps-in-javaVaadin7 modern-web-apps-in-java
Vaadin7 modern-web-apps-in-javaJoonas Lehtinen
 
Spring Performance Gains
Spring Performance GainsSpring Performance Gains
Spring Performance GainsVMware Tanzu
 
クラウド・アプリケーション・アーキテクチャ
クラウド・アプリケーション・アーキテクチャクラウド・アプリケーション・アーキテクチャ
クラウド・アプリケーション・アーキテクチャTomoharu ASAMI
 
Java 7 Dolphin manjula kollipara
Java 7 Dolphin manjula kolliparaJava 7 Dolphin manjula kollipara
Java 7 Dolphin manjula kolliparaManjula Kollipara
 
The Java EE 7 Platform: Productivity++ & Embracing HTML5
The Java EE 7 Platform: Productivity++ & Embracing HTML5The Java EE 7 Platform: Productivity++ & Embracing HTML5
The Java EE 7 Platform: Productivity++ & Embracing HTML5Arun Gupta
 
5050 dev nation
5050 dev nation5050 dev nation
5050 dev nationArun Gupta
 
Cloud acceleration-pro active-solutionslinux-ow2
Cloud acceleration-pro active-solutionslinux-ow2Cloud acceleration-pro active-solutionslinux-ow2
Cloud acceleration-pro active-solutionslinux-ow2OW2
 
The Java EE 7 Platform: Productivity &amp; HTML5 at San Francisco JUG
The Java EE 7 Platform: Productivity &amp; HTML5 at San Francisco JUGThe Java EE 7 Platform: Productivity &amp; HTML5 at San Francisco JUG
The Java EE 7 Platform: Productivity &amp; HTML5 at San Francisco JUGArun Gupta
 
Flavors of Concurrency in Java
Flavors of Concurrency in JavaFlavors of Concurrency in Java
Flavors of Concurrency in JavaJavaDayUA
 
Eclipse Indigo DemoCamp Walldorf 2011
Eclipse Indigo DemoCamp Walldorf 2011Eclipse Indigo DemoCamp Walldorf 2011
Eclipse Indigo DemoCamp Walldorf 2011Marcel Bruch
 
2010 06-24 karlsruher entwicklertag
2010 06-24 karlsruher entwicklertag2010 06-24 karlsruher entwicklertag
2010 06-24 karlsruher entwicklertagMarcel Bruch
 
Hangs, Slowdowns, Starvation—Oh My! A Deep Dive into the Life of a Java Threa...
Hangs, Slowdowns, Starvation—Oh My! A Deep Dive into the Life of a Java Threa...Hangs, Slowdowns, Starvation—Oh My! A Deep Dive into the Life of a Java Threa...
Hangs, Slowdowns, Starvation—Oh My! A Deep Dive into the Life of a Java Threa...David Buck
 
Java SE 7、そしてJava SE 8
Java SE 7、そしてJava SE 8Java SE 7、そしてJava SE 8
Java SE 7、そしてJava SE 8Yuichi Sakuraba
 
Eclipse Code Recommenders @ MAJUG 2011
Eclipse Code Recommenders @ MAJUG 2011Eclipse Code Recommenders @ MAJUG 2011
Eclipse Code Recommenders @ MAJUG 2011Marcel Bruch
 
DWX 2013 Nuremberg
DWX 2013 NurembergDWX 2013 Nuremberg
DWX 2013 NurembergMarcel Bruch
 
Java 7 Modularity: a View from the Gallery
Java 7 Modularity: a View from the GalleryJava 7 Modularity: a View from the Gallery
Java 7 Modularity: a View from the Gallerynjbartlett
 
Mv unmasked.w.code.march.2013
Mv unmasked.w.code.march.2013Mv unmasked.w.code.march.2013
Mv unmasked.w.code.march.2013EDB
 

Tendances (20)

Vaadin7 modern-web-apps-in-java
Vaadin7 modern-web-apps-in-javaVaadin7 modern-web-apps-in-java
Vaadin7 modern-web-apps-in-java
 
Spring Performance Gains
Spring Performance GainsSpring Performance Gains
Spring Performance Gains
 
クラウド・アプリケーション・アーキテクチャ
クラウド・アプリケーション・アーキテクチャクラウド・アプリケーション・アーキテクチャ
クラウド・アプリケーション・アーキテクチャ
 
Java 7 Dolphin manjula kollipara
Java 7 Dolphin manjula kolliparaJava 7 Dolphin manjula kollipara
Java 7 Dolphin manjula kollipara
 
The Java EE 7 Platform: Productivity++ & Embracing HTML5
The Java EE 7 Platform: Productivity++ & Embracing HTML5The Java EE 7 Platform: Productivity++ & Embracing HTML5
The Java EE 7 Platform: Productivity++ & Embracing HTML5
 
5050 dev nation
5050 dev nation5050 dev nation
5050 dev nation
 
Cloud acceleration-pro active-solutionslinux-ow2
Cloud acceleration-pro active-solutionslinux-ow2Cloud acceleration-pro active-solutionslinux-ow2
Cloud acceleration-pro active-solutionslinux-ow2
 
The Java EE 7 Platform: Productivity &amp; HTML5 at San Francisco JUG
The Java EE 7 Platform: Productivity &amp; HTML5 at San Francisco JUGThe Java EE 7 Platform: Productivity &amp; HTML5 at San Francisco JUG
The Java EE 7 Platform: Productivity &amp; HTML5 at San Francisco JUG
 
Flavors of Concurrency in Java
Flavors of Concurrency in JavaFlavors of Concurrency in Java
Flavors of Concurrency in Java
 
JavaOne 2010: OSGI Migrat
JavaOne 2010: OSGI MigratJavaOne 2010: OSGI Migrat
JavaOne 2010: OSGI Migrat
 
DTrace and Drupal
DTrace and DrupalDTrace and Drupal
DTrace and Drupal
 
Extending and scripting PDT
Extending and scripting PDTExtending and scripting PDT
Extending and scripting PDT
 
Eclipse Indigo DemoCamp Walldorf 2011
Eclipse Indigo DemoCamp Walldorf 2011Eclipse Indigo DemoCamp Walldorf 2011
Eclipse Indigo DemoCamp Walldorf 2011
 
2010 06-24 karlsruher entwicklertag
2010 06-24 karlsruher entwicklertag2010 06-24 karlsruher entwicklertag
2010 06-24 karlsruher entwicklertag
 
Hangs, Slowdowns, Starvation—Oh My! A Deep Dive into the Life of a Java Threa...
Hangs, Slowdowns, Starvation—Oh My! A Deep Dive into the Life of a Java Threa...Hangs, Slowdowns, Starvation—Oh My! A Deep Dive into the Life of a Java Threa...
Hangs, Slowdowns, Starvation—Oh My! A Deep Dive into the Life of a Java Threa...
 
Java SE 7、そしてJava SE 8
Java SE 7、そしてJava SE 8Java SE 7、そしてJava SE 8
Java SE 7、そしてJava SE 8
 
Eclipse Code Recommenders @ MAJUG 2011
Eclipse Code Recommenders @ MAJUG 2011Eclipse Code Recommenders @ MAJUG 2011
Eclipse Code Recommenders @ MAJUG 2011
 
DWX 2013 Nuremberg
DWX 2013 NurembergDWX 2013 Nuremberg
DWX 2013 Nuremberg
 
Java 7 Modularity: a View from the Gallery
Java 7 Modularity: a View from the GalleryJava 7 Modularity: a View from the Gallery
Java 7 Modularity: a View from the Gallery
 
Mv unmasked.w.code.march.2013
Mv unmasked.w.code.march.2013Mv unmasked.w.code.march.2013
Mv unmasked.w.code.march.2013
 

En vedette

Interactive Powerpoint Project
Interactive Powerpoint ProjectInteractive Powerpoint Project
Interactive Powerpoint Projectdoomsj
 
Escuela Normal Superior Del Estado
Escuela Normal Superior Del EstadoEscuela Normal Superior Del Estado
Escuela Normal Superior Del Estadoguestc48621
 
Portada Nadal
Portada NadalPortada Nadal
Portada Nadalariafp10
 
El Alegre Barrendero
El Alegre BarrenderoEl Alegre Barrendero
El Alegre Barrenderoprofesorivan3
 
Interactive Powerpoint Project
Interactive Powerpoint ProjectInteractive Powerpoint Project
Interactive Powerpoint Projectdoomsj
 
Breaking Through the Talent Barrier
Breaking Through the Talent BarrierBreaking Through the Talent Barrier
Breaking Through the Talent BarrierService Strategies
 

En vedette (10)

Mlsbooktalks
MlsbooktalksMlsbooktalks
Mlsbooktalks
 
Mongo
MongoMongo
Mongo
 
Interactive Powerpoint Project
Interactive Powerpoint ProjectInteractive Powerpoint Project
Interactive Powerpoint Project
 
NoSQL Rollercoaster
NoSQL RollercoasterNoSQL Rollercoaster
NoSQL Rollercoaster
 
Escuela Normal Superior Del Estado
Escuela Normal Superior Del EstadoEscuela Normal Superior Del Estado
Escuela Normal Superior Del Estado
 
Portada Nadal
Portada NadalPortada Nadal
Portada Nadal
 
Simplicity
SimplicitySimplicity
Simplicity
 
El Alegre Barrendero
El Alegre BarrenderoEl Alegre Barrendero
El Alegre Barrendero
 
Interactive Powerpoint Project
Interactive Powerpoint ProjectInteractive Powerpoint Project
Interactive Powerpoint Project
 
Breaking Through the Talent Barrier
Breaking Through the Talent BarrierBreaking Through the Talent Barrier
Breaking Through the Talent Barrier
 

Similaire à Spring ME

Grails @ Java User Group Silicon Valley
Grails @ Java User Group Silicon ValleyGrails @ Java User Group Silicon Valley
Grails @ Java User Group Silicon ValleySven Haiges
 
JSUG - Spring by Christoph Pickl
JSUG - Spring by Christoph PicklJSUG - Spring by Christoph Pickl
JSUG - Spring by Christoph PicklChristoph Pickl
 
Monkeybars in the Manor
Monkeybars in the ManorMonkeybars in the Manor
Monkeybars in the Manormartinbtt
 
Java Performance and Using Java Flight Recorder
Java Performance and Using Java Flight RecorderJava Performance and Using Java Flight Recorder
Java Performance and Using Java Flight RecorderIsuru Perera
 
Don't Leave Windows Broken
Don't Leave Windows BrokenDon't Leave Windows Broken
Don't Leave Windows BrokenKen William
 
Terracotta Java Scalability - Stateless Versus Stateful Apps
Terracotta Java Scalability - Stateless Versus Stateful AppsTerracotta Java Scalability - Stateless Versus Stateful Apps
Terracotta Java Scalability - Stateless Versus Stateful AppsMatthew McCullough
 
Terence Barr - jdk7+8 - 24mai2011
Terence Barr - jdk7+8 - 24mai2011Terence Barr - jdk7+8 - 24mai2011
Terence Barr - jdk7+8 - 24mai2011Agora Group
 
Questioning the status quo
Questioning the status quoQuestioning the status quo
Questioning the status quoIvano Pagano
 
2 Roads to Redemption - Thoughts on XSS and SQLIA
2 Roads to Redemption - Thoughts on XSS and SQLIA2 Roads to Redemption - Thoughts on XSS and SQLIA
2 Roads to Redemption - Thoughts on XSS and SQLIAguestfdcb8a
 
Building RESTful Java Applications with EMF
Building RESTful Java Applications with EMFBuilding RESTful Java Applications with EMF
Building RESTful Java Applications with EMFKenn Hussey
 
Lagergren jvmls-2014-final
Lagergren jvmls-2014-finalLagergren jvmls-2014-final
Lagergren jvmls-2014-finalMarcus Lagergren
 
Java questions with answers
Java questions with answersJava questions with answers
Java questions with answersKuntal Bhowmick
 
Lightweight Grids With Terracotta
Lightweight Grids With TerracottaLightweight Grids With Terracotta
Lightweight Grids With TerracottaPT.JUG
 

Similaire à Spring ME (20)

BeJUG JavaFx In Practice
BeJUG JavaFx In PracticeBeJUG JavaFx In Practice
BeJUG JavaFx In Practice
 
Jvm Language Summit Rose 20081016
Jvm Language Summit Rose 20081016Jvm Language Summit Rose 20081016
Jvm Language Summit Rose 20081016
 
Grails @ Java User Group Silicon Valley
Grails @ Java User Group Silicon ValleyGrails @ Java User Group Silicon Valley
Grails @ Java User Group Silicon Valley
 
Os Haase
Os HaaseOs Haase
Os Haase
 
JSUG - Spring by Christoph Pickl
JSUG - Spring by Christoph PicklJSUG - Spring by Christoph Pickl
JSUG - Spring by Christoph Pickl
 
Monkeybars in the Manor
Monkeybars in the ManorMonkeybars in the Manor
Monkeybars in the Manor
 
Java Performance and Using Java Flight Recorder
Java Performance and Using Java Flight RecorderJava Performance and Using Java Flight Recorder
Java Performance and Using Java Flight Recorder
 
Don't Leave Windows Broken
Don't Leave Windows BrokenDon't Leave Windows Broken
Don't Leave Windows Broken
 
Terracotta Java Scalability - Stateless Versus Stateful Apps
Terracotta Java Scalability - Stateless Versus Stateful AppsTerracotta Java Scalability - Stateless Versus Stateful Apps
Terracotta Java Scalability - Stateless Versus Stateful Apps
 
Terence Barr - jdk7+8 - 24mai2011
Terence Barr - jdk7+8 - 24mai2011Terence Barr - jdk7+8 - 24mai2011
Terence Barr - jdk7+8 - 24mai2011
 
Questioning the status quo
Questioning the status quoQuestioning the status quo
Questioning the status quo
 
2 Roads to Redemption - Thoughts on XSS and SQLIA
2 Roads to Redemption - Thoughts on XSS and SQLIA2 Roads to Redemption - Thoughts on XSS and SQLIA
2 Roads to Redemption - Thoughts on XSS and SQLIA
 
S is for Spec
S is for SpecS is for Spec
S is for Spec
 
Building RESTful Java Applications with EMF
Building RESTful Java Applications with EMFBuilding RESTful Java Applications with EMF
Building RESTful Java Applications with EMF
 
Lagergren jvmls-2014-final
Lagergren jvmls-2014-finalLagergren jvmls-2014-final
Lagergren jvmls-2014-final
 
Java EE 6 & Spring: A Lover's Quarrel
Java EE 6 & Spring: A Lover's QuarrelJava EE 6 & Spring: A Lover's Quarrel
Java EE 6 & Spring: A Lover's Quarrel
 
Java questions with answers
Java questions with answersJava questions with answers
Java questions with answers
 
Lightweight Grids With Terracotta
Lightweight Grids With TerracottaLightweight Grids With Terracotta
Lightweight Grids With Terracotta
 
Java On Speed
Java On SpeedJava On Speed
Java On Speed
 
Big Data made easy with a Spark
Big Data made easy with a SparkBig Data made easy with a Spark
Big Data made easy with a Spark
 

Plus de Wilfred Springer (9)

Unfiltered Unveiled
Unfiltered UnveiledUnfiltered Unveiled
Unfiltered Unveiled
 
Scala in your organisation
Scala in your organisationScala in your organisation
Scala in your organisation
 
Unfiltered Unveiled
Unfiltered UnveiledUnfiltered Unveiled
Unfiltered Unveiled
 
NoSQL
NoSQLNoSQL
NoSQL
 
Byzantine Generals
Byzantine GeneralsByzantine Generals
Byzantine Generals
 
Eventually Consistent
Eventually ConsistentEventually Consistent
Eventually Consistent
 
Into the Wild
Into the WildInto the Wild
Into the Wild
 
OOPSLA Talk on Preon
OOPSLA Talk on PreonOOPSLA Talk on Preon
OOPSLA Talk on Preon
 
Preon (J-Fall 2008)
Preon (J-Fall 2008)Preon (J-Fall 2008)
Preon (J-Fall 2008)
 

Dernier

Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 

Dernier (20)

Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 

Spring ME

  • 1. Spring ME Unleashing Spring to the Rest of the Platorm J-Spring 2009 Wilfred Springer
  • 2. Java is doing AWESOME! 2 Source: Tiobe Programming Community Index March
  • 3. Spring is doing GREAT! = + 3 Source: Evans Data, 2008
  • 4. But that's like... a freaking big number 4
  • 5. … or is it? SAN MATEO, Calif.—November 19, 2008 – SpringSource, a leading provider of infrastructure software and the company behind Spring, the de facto standard in enterprise Java, today announced that results from an extensive Evans Data research study reveal large scale adoption and penetration of Spring as a means of increasing developer productivity and combating complexity in today’s enterprise application infrastructure market. 5
  • 6. Java Nodes in the Cloud 3 Billion Java-Enabled Cards in 2007 ● 1.8 Billion Java-Enabled Phones in 2007 ● 7 Million Java Set-top Boxes ● 1 Million GWT downloads in 2007 ● 6
  • 7. Not all men are equal Versus 7
  • 8. We the people “We hold these truths to be self-evident, that all men are created equal, that they are endowed by their Creator with certain unalienable Rights, that among these are Life, Liberty, and the Pursuit of Happiness.” 8
  • 9. We the people “We hold these truths to be self-evident, that all men... Java Developers are enttled to get their porton of Spring goodness.” Not just Java EE developers Not just Java SE developers But also Java ME developers And Java Card developers 9
  • 10. Why Spring? All Spring's goodness summarized in famous last words 10
  • 11. IoC Container “Trust us, we know what we're doing.” “Don't call us, we call you.” 11
  • 12. Sanitized API “Any problem in computer science can be solved with another layer of indirecton.” – David Wheeler
  • 13. AOP “Once you have a hammer, everything else is a nail.”
  • 14. So why not use Spring itself? Platorm Limitatons ● Limited Java Runtme capabilites ● Limitatons imposed by deployment ● Limited computatonal resources Limitatons on heap – Limitatons on applicaton size – Limitatons on performance –
  • 15. Java Runtime Limitations ct ) e( refle ) ... anc g. e( s t n tring am In a.la .S i st rN e w a v il.L ng o s.f ss.n er j a.la r ut a. as la a h v v Ot Cl ch ja ja C GWT n n n y y y Java ME y y n y y n Java Card n n n n n n BeanFactory#getBean(String name)? BeanFactory#getBean(char[] name)?
  • 16. Deployment Limitations (1) <bean id=”movie1” class=”sample.Movie”> <property name=”title” value=”Into the Wild”/> 1 </bean> OBFUSCATION package a.b; package com.mgm; public class a { public class Movie { void a(String ...); void setTitle(String title); } } 2 3 <bean id=”movie1” class=”a.b.a”> <property name=”a” value=”Into the Wild”/> </bean> 4
  • 17. Deployment Limitations (2) GWT → JavaScript ● Java Card → CAP fles ●
  • 18. Computational Resources (1) Heap: ● Java SE ● Max heap approx. 1.5 GB – Java ME ● Lower bound max. heap: 140 KB – Upper bound max. heap: 128 MB – Between factor 11 and 11,714 diference – Java Card ● 16 K RAM –
  • 19. Computational Resources (2) Applicaton size: ● Java ME: Upperbounds between 64 KB and 28 MB ● Spring Core 267KB Spring Beans 467KB Spring Context 455KB Total 1189KB
  • 20. Throughput Nokia E71: ● 369 MHz ARM 11 CPU – Gameboy Advance ● 16 MHz ARM 7 CPU – C-Ray Raytracing Benchmark 296108 s – Dell PowerEdge M710 ● 2.4 GHz Xeon Quad Core CPU – C-Ray Raytracing Benchmark 201 s –
  • 21. Introducing Spring ME's IoC Do most of the hard work at build time 21
  • 22. Assume this object model 22
  • 23. And you want to create this 23
  • 24. The Spring (ME) configuration <beans xmlns=”…”> <bean id=”movieFinder” class=”….InMemoryMovieFinder”> <property name=”movies”> <list> <bean class=”….Movie”> <property name=”title” value=”Bye Bye Blue Bird”/> <property name=”director” value=”Søren Kragh-Jacobsen”/> <property name=”year” value=”1999”/> </bean> … </list> </property> </bean> </beans> 24
  • 25. … And with the Maven plugin <project> <build> <plugins> <plugin> <groupId>me.springframework</groupId> <artifactId>spring-me-maven-plugin</artifactId> <version>1.0-SNAPSHOT</version> <executions> <execution> <goals> <goal>generate</goal> </goals> <configuration> <contextFile>....context.xml</contextFile> <className>com.mgm.BeanFactory</className> </configuration> </execution> </executions> 25
  • 26. You get this BeanFactory public class BeanFactory { public Object getBean(String name) { if (“movieFinder”.equals(name)) { return getMovieFinder(); } } private final Object getMovieFinder() { … } … } 26
  • 27. DEMO Spring ME on Java SE ● Spring ME on Java ME ● Spring ME on GWT ● 27
  • 28. Spring ME Compile tme validaton ● “Is 10e2 a valid int representaton?” – “Is an instance of Boeing747 assignable to a – property of type Airplane?” Minimal or no runtme dependencies ● Superfast (but no benchmarks to verify this) ● Small (1K?) ●
  • 30. Spring ME Meta Model Meta Model independent of Spring ● Typically Spring XML confguraton is used ● Meta Model supports other sources ● Spring XML Spring ME Spring ME Configuration BeanFactory Meta Model 30
  • 31. Other sources? @Autowired @ProvidedBy @PostConstruct @Inject @PostDestroy @ImplementedBy Annotations Spring ME Spring ME BeanFactory Meta Model Spring XML Configuration 31
  • 32. Spring ME's Meta Model 32
  • 34. If not Spring ME, then what? GWT ● Java Card ● GWToolbox – None – Rocket GWT – (Spring ME?) – GIN – Java ME ● Spring ME – Signal – Suco – Israfl IoC – Fall ME – Spring ME –
  • 35. Inversion of Control Galore x ion rs nta at y n ur olde t S tio n n ig jec ctio s o n od rati onf ceh plia od in h h et od met figu on c pla om s* tor inje s es g n E ton yp m th y io truc rty me e irin n ati rty C y o t T va M gle otot zy ger ctor t me stro L c not ope ring as llec ns ope na typ tow i n i W G Ja Si Pr La Ea Fa In De XM An Pr Sp Al Co Co Pr By By Au Rocket GWT y n y y y y y y y y n y n n all y y y n ? Spring ME y y y y y y y y y y n n y n l/m y y y y ... Israfil IoC n y y n n n n n n n n n n n ... y n n y y Fall ME n y y n n n n n n n n n n n ... y n n n n GWToolbox y n y y y y ? y y n y y n n all n y n y y Signal n n y y n n ? n n n y n y n all n y y ? ? 35
  • 36. The Rest: Sanitized API Java ME needs a lot more sanity ● J2ME Polish is your friend – Java Card is probably too limited to use ● wrapper API GWT is already addressed by a lot of ● frameworks 36
  • 37. The Rest: AOP? What about it? ● Using the metadata, proxies could be ● constructed at build tme The factory could construct these proxies ● instead of the actual objects 37
  • 38. Current status 'Request' scope ● 'Session' scope ● 'Global session' scope ● BeanFactoryAware, but ... ● BeanPostProcessor (without refecton?) ● BeanFactoryPostProcessor, but ... ● FactoryBean, but ... ● 38
  • 39. If there's only one thing “ME” as in “supportng Java ME” ● “ME” as in “a microscopic small version of ● Spring” Useful for Java ME ● Useful for GWT ● Useful for Java SE ● Potentally useful for Java Card and Java EE ● 39
  • 40. Roadmap Version 1.0 (J109 release) end of May 2009 ● Integraton with J2ME Polish ● BOF-4470, June 4, JavaOne ● htp://springframework.me/ ● spring-me@googlegroups.com ● 40