JAX 2012: Moderne Architektur mit Spring und JavaScript

Modern
Architectures
Spring
           with

                         and

   JavaScript

          Martin Lippert,VMware
  mlippert@vmware.com, @martinlippert
Were do we come from?




                    http://www.nasa.gov
Servlet Specification
        mostly static HTML created on server
                  Template Engines




                                      JSP Specification
                                     mostly static HTML created on server
                                    no template engines necessary anymore




    Web Frameworks
    mostly static HTML created on server
        various framework, supporting:
authentication, session-handling, page flows, etc.



                                          JavaScript
                                        only used to do some kid‘s stuff
Or from her
           e?
Desktop?
            SWT?

   Swing?
Typical Runtime Structures



     Browser          render HTML



                      business logic &
Tomcat / tc Server
                      page rendering



Relational Database    contains data
And today...
What happens?


                         render HTML & improved
     Browser
                         experience using JavaScript
            AJAX calls


                              business logic &
Tomcat / tc Server         page rendering & APIs


                            contains data & new
Relational Database
                         challenges (structure, size)
A few observations
                         duplicated logic, no
                           modularization
                           render HTML & improved
     Browser
                          experience using JavaScript
            AJAX calls
                         APIs are challenging, Java not
                          the only language anymore
                                 business logic &
Tomcat / tc Server            page rendering & APIs

                          relational & transactional
                              contains anymore
                              don‘t fit data & new
Relational Database
                           challenges (structure, size)
Different pictures


AWS             node.js                HTML/CSS
          NoSQL               Java
                                     JavaScript
JavaScript      Hadoop
          CoffeeScript


      Startups              „old economy“

  Scala
             Ruby/Rails      Application
 Clojure          PaaS         Server
                                           RDBMS
          HTML5/CSS3
Where do we go
    from here?
The

Client
  Side
Innovation happens here
The JavaScript Story




            http://www.maztek.com/blog/wp-content/uploads/javascript.jpg
My assumptions
             - on the client side -




       Browser only (HTML5/CSS3)
             JavaScript only


   „The browser-based application
written in JavaScript becomes the new
       rich client architecture“
Existing JavaScript libs are UI centric
         (focus on making life with the DOM easier)


               most prominent:
                  jquery
JavaScript versions of
„good old rich client patterns“
       begin to appear
         (and are highly necessary)




           Examples
         backbone.js
          angular.js
          ember.js
              ...
The

Server
  Side
My assumptions
            - server side languages -




     many different languages in use
choose the right language for the right job
    don‘t use a new language for fun
My assumptions
             - data storage -




     more and more data (big data)
different storage techniques combined
     (rdbms, nosql, graph databases)
         scalability is important
The landscape

                    Browser App
                       (JavaScript)




Service   Service     Service         Service    Service



                NoSQL                           NoSQL
RDBMS                                  NoSQL
      RDBMS                NoSQL                 NoSQL
Browser App
                        (JavaScript)




               rich client application
Service         written in JavaScript
          Service       Service      Service   Service
        (a lot bigger than what we do today in
             JavaScript within the browser)

                   NoSQL                   NoSQL
RDBMS                                  NoSQL
       RDBMS                NoSQL              NoSQL
The landscape
         services are provided by a PaaS
  or are hand-written (in a language of your choice)
                  Browser App
    this is where Spring is really powerful
                      (JavaScript)

    ready to run „in the cloud“ (scalability)
              (no client-side rendering or logic)




Service   Service       Service          Service     Service



                   NoSQL                            NoSQL
RDBMS                                       NoSQL
      RDBMS                   NoSQL                  NoSQL
Browser App
                       (JavaScript)


        RDBMS and NoSQL datastores are
               provided by the PaaS
         the PaaS takes care of scalability
Serviceaccess managed by Spring (e.g. Spring Service
          Service   Service   Service        Data)




                  NoSQL                   NoSQL
RDBMS                                 NoSQL
       RDBMS               NoSQL              NoSQL
Running in the cloud
                    (on a PaaS)


Service   Service    Service      Service    Service



                NoSQL                       NoSQL
RDBMS                              NoSQL
      RDBMS              NoSQL               NoSQL
The

Challenges
Modularity
    in
JavaScript
AMD
 (asynchronous module definition)

             wire.js
(Dependency Injection for JavaScript)

Micro Services for JavaScript
(OSGi services written in JavaScript)
More Challenges
offline
cloud-ready services
define good APIs
versioned APIs
TDD for JavaScript
more information
                Adrian Colyer on Application Development in the Cloud Era
                      http://www.youtube.com/watch?v=axOPJbrIjkY

Example app using Spring for providing RESTful APIs and JavaScript for a rich client and mobile
                                            app
                       https://github.com/SpringSource/html5expense

                   Asynchronous Module Definition for JavaScript (AMD)
                            https://github.com/amdjs/amdjs-api
                          http://requirejs.org/docs/whyamd.html

                                             wire.js
                                https://github.com/cujojs/wire

                                     hello world with wire.js
                         https://github.com/briancavalier/hello-wire.js

                             more advanced example for wire.js
                         https://github.com/briancavalier/piratescript

                                     Cloud Foundry PaaS
                                http://www.cloudfoundry.com
                                http://www.cloudfoundry.org
Q&A
and thank you for your attention




        Martin Lippert,VMware
mlippert@vmware.com, @martinlippert
1 of 30

More Related Content

What's hot(20)

Similar to JAX 2012: Moderne Architektur mit Spring und JavaScript(20)

Wakanda - apps.berlin.js - 2012-11-29Wakanda - apps.berlin.js - 2012-11-29
Wakanda - apps.berlin.js - 2012-11-29
Alexandre Morgaut3K views
SQL Data Service OverviewSQL Data Service Overview
SQL Data Service Overview
Eric Nelson916 views
Eclipse & die Microsoft cloudEclipse & die Microsoft cloud
Eclipse & die Microsoft cloud
Patric Boscolo512 views
Viridians on RailsViridians on Rails
Viridians on Rails
Viridians444 views
Best of Microsoft Dev Camp 2015Best of Microsoft Dev Camp 2015
Best of Microsoft Dev Camp 2015
Bluegrass Digital615 views
Node PDX: Intro to Sails.jsNode PDX: Intro to Sails.js
Node PDX: Intro to Sails.js
Mike McNeil6.9K views
Shreeraj-Hacking_Web_2Shreeraj-Hacking_Web_2
Shreeraj-Hacking_Web_2
guest66dc5f51.5K views
CM WebClient for CA PlexCM WebClient for CA Plex
CM WebClient for CA Plex
CM First Group2.7K views
Why we chose mongodb for guardian.co.ukWhy we chose mongodb for guardian.co.uk
Why we chose mongodb for guardian.co.uk
Graham Tackley35.3K views
Seeding The CloudSeeding The Cloud
Seeding The Cloud
Ted Leung3.1K views
Node jsNode js
Node js
Chirag Parmar2.9K views
Web Development TodayWeb Development Today
Web Development Today
bretticus608 views
Comm Gate Corporate Profile V0.4Comm Gate Corporate Profile V0.4
Comm Gate Corporate Profile V0.4
Abhik Biswas413 views

Recently uploaded(20)

Java Platform Approach 1.0 - Picnic MeetupJava Platform Approach 1.0 - Picnic Meetup
Java Platform Approach 1.0 - Picnic Meetup
Rick Ossendrijver23 views
Web Dev - 1 PPT.pdfWeb Dev - 1 PPT.pdf
Web Dev - 1 PPT.pdf
gdsczhcet48 views

JAX 2012: Moderne Architektur mit Spring und JavaScript

  • 1. Modern Architectures Spring with and JavaScript Martin Lippert,VMware mlippert@vmware.com, @martinlippert
  • 2. Were do we come from? http://www.nasa.gov
  • 3. Servlet Specification mostly static HTML created on server Template Engines JSP Specification mostly static HTML created on server no template engines necessary anymore Web Frameworks mostly static HTML created on server various framework, supporting: authentication, session-handling, page flows, etc. JavaScript only used to do some kid‘s stuff
  • 4. Or from her e? Desktop? SWT? Swing?
  • 5. Typical Runtime Structures Browser render HTML business logic & Tomcat / tc Server page rendering Relational Database contains data
  • 7. What happens? render HTML & improved Browser experience using JavaScript AJAX calls business logic & Tomcat / tc Server page rendering & APIs contains data & new Relational Database challenges (structure, size)
  • 8. A few observations duplicated logic, no modularization render HTML & improved Browser experience using JavaScript AJAX calls APIs are challenging, Java not the only language anymore business logic & Tomcat / tc Server page rendering & APIs relational & transactional contains anymore don‘t fit data & new Relational Database challenges (structure, size)
  • 9. Different pictures AWS node.js HTML/CSS NoSQL Java JavaScript JavaScript Hadoop CoffeeScript Startups „old economy“ Scala Ruby/Rails Application Clojure PaaS Server RDBMS HTML5/CSS3
  • 10. Where do we go from here?
  • 13. The JavaScript Story http://www.maztek.com/blog/wp-content/uploads/javascript.jpg
  • 14. My assumptions - on the client side - Browser only (HTML5/CSS3) JavaScript only „The browser-based application written in JavaScript becomes the new rich client architecture“
  • 15. Existing JavaScript libs are UI centric (focus on making life with the DOM easier) most prominent: jquery
  • 16. JavaScript versions of „good old rich client patterns“ begin to appear (and are highly necessary) Examples backbone.js angular.js ember.js ...
  • 18. My assumptions - server side languages - many different languages in use choose the right language for the right job don‘t use a new language for fun
  • 19. My assumptions - data storage - more and more data (big data) different storage techniques combined (rdbms, nosql, graph databases) scalability is important
  • 20. The landscape Browser App (JavaScript) Service Service Service Service Service NoSQL NoSQL RDBMS NoSQL RDBMS NoSQL NoSQL
  • 21. Browser App (JavaScript) rich client application Service written in JavaScript Service Service Service Service (a lot bigger than what we do today in JavaScript within the browser) NoSQL NoSQL RDBMS NoSQL RDBMS NoSQL NoSQL
  • 22. The landscape services are provided by a PaaS or are hand-written (in a language of your choice) Browser App this is where Spring is really powerful (JavaScript) ready to run „in the cloud“ (scalability) (no client-side rendering or logic) Service Service Service Service Service NoSQL NoSQL RDBMS NoSQL RDBMS NoSQL NoSQL
  • 23. Browser App (JavaScript) RDBMS and NoSQL datastores are provided by the PaaS the PaaS takes care of scalability Serviceaccess managed by Spring (e.g. Spring Service Service Service Service Data) NoSQL NoSQL RDBMS NoSQL RDBMS NoSQL NoSQL
  • 24. Running in the cloud (on a PaaS) Service Service Service Service Service NoSQL NoSQL RDBMS NoSQL RDBMS NoSQL NoSQL
  • 26. Modularity in JavaScript
  • 27. AMD (asynchronous module definition) wire.js (Dependency Injection for JavaScript) Micro Services for JavaScript (OSGi services written in JavaScript)
  • 28. More Challenges offline cloud-ready services define good APIs versioned APIs TDD for JavaScript
  • 29. more information Adrian Colyer on Application Development in the Cloud Era http://www.youtube.com/watch?v=axOPJbrIjkY Example app using Spring for providing RESTful APIs and JavaScript for a rich client and mobile app https://github.com/SpringSource/html5expense Asynchronous Module Definition for JavaScript (AMD) https://github.com/amdjs/amdjs-api http://requirejs.org/docs/whyamd.html wire.js https://github.com/cujojs/wire hello world with wire.js https://github.com/briancavalier/hello-wire.js more advanced example for wire.js https://github.com/briancavalier/piratescript Cloud Foundry PaaS http://www.cloudfoundry.com http://www.cloudfoundry.org
  • 30. Q&A and thank you for your attention Martin Lippert,VMware mlippert@vmware.com, @martinlippert