SlideShare uma empresa Scribd logo
1 de 33
Baixar para ler offline
Architecture of a Modern Web App
Scott Andrews


@scothis
andrewss@vmware.com




                             Re-distribution allowed with author’s consent.

                                            © 2013 SpringSource, A division of VMware. All rights reserved
About Me

 Joined SpringSource in 2008
 Wearer of many hats

 Drifter                                                Teams
  • frameworks ⇆ applications                                 • Spring Web
  • open source ⇆ commercial                                  • tc Server
  • client ⇆ server                                           • Spring Insight
  • front-end ⇆ back-end                                      • Cloud Foundry
                                                              • SpringSource JavaScript




                                Re-distribution allowed with author’s consent.
                                                                                          2
Agenda
   Where we’ve been
   Where we’re going
   How we’ll get there
   Further resources
   Questions




                          Re-distribution allowed with author’s consent.
                                                                           3
Agenda
   Where we’ve been
   Where we’re going
   How we’ll get there
   Further resources
   Questions




                          Re-distribution allowed with author’s consent.
                                                                           4
In the beginning...




                      Re-distribution allowed with author’s consent.
                                                                       5
In the beginning...

 Sites were static HTML                            Pros:
                                                         • low computational overhead
                                                         • highly cacheable
                                                         • highly indexable


                                                    Cons:
                                                     • hard (easy?) to update
                                                     • no personalization
                                                     • usually poor UI




                           Re-distribution allowed with author’s consent.
                                                                                        6
Let there be CGI




                   Re-distribution allowed with author’s consent.
                                                                    7
Let there be CGI

 Introduced dynamic generated                      Pros:
 pages                                                   • dynamic!
                                                         • selectively cacheable
                                                         • highly indexable
                                                         • personalizable


                                                    Cons:
                                                     • “high” computational overhead
                                                     • hard to create
                                                     • usually poor UI




                           Re-distribution allowed with author’s consent.
                                                                                       8
LiveScript JavaScript




        http://en.wikipedia.org/wiki/File:Pop-up_ads.jpg


                                                 Re-distribution allowed with author’s consent.
                                                                                                  9
LiveScript JavaScript

 Dynamic pages                                                               Pros:
 Lightweight complement to                                                        • enhanced usability, maybe
  applets                                                                          • reduced trips to the server
 Mostly used for simple scripting
  • basic form validation                                                     Cons:
  • popup ads                                                                  • abuses annoyed users
  • comet cursor trails                                                        • business logic often implemented
                                                                                      twice: client and server




       http://en.wikipedia.org/wiki/File:Pop-up_ads.jpg

                                                     Re-distribution allowed with author’s consent.
                                                                                                                    10
AJAX - Web 2.0

 Google Maps sparked Web 2.0                     Pros:
 GMail                                                • killer UI
 • required JavaScript                                 • more responsive apps


                                                  Cons:
                                                   • difficult to cache
                                                   • impossible to index
                                                   • required JavaScript




                         Re-distribution allowed with author’s consent.
                                                                                11
Unobtrusive JavaScript

 No JavaScript, no problem                            Pros:
 Provide features for user agents                          • wider compatibility
  that support them                                         • just as rich UI
  • fall back to basic HTML                                 • just as responsive


                                                       Cons:
                                                        • higher development costs
                                                        • requires thoughtful engineering




                              Re-distribution allowed with author’s consent.
                                                                                            12
Client Side Applications

 Business logic lives on the client                   Pros:
 Resources and permanent state                             • reduce server workloads
  stored on the server                                      • application is highly cacheable
 Application and session state                             • extremely rich UI
  stored on client
                                                       Cons:
                                                        • content not indexable
                                                        • requires JavaScript
                                                        • often requires a ‘modern’ browser




                              Re-distribution allowed with author’s consent.
                                                                                                13
Agenda
   Where we’ve been
   Where we’re going
   How we’ll get there
   Further resources
   Questions




                          Re-distribution allowed with author’s consent.
                                                                           14
From server-side app to smart clients and services

                                                                Browser                 Client
              Browser-based

             HTML Rendering

         (progressive enhancement)


      HTML                  HTTP


         View                                                   Application
                         Controllers                            Server
       Generation


               Service Layer


       Channels        Repositories                                             RDBMS
                                                                                        Server
                                                                                CRUD

                               Re-distribution allowed with author’s consent.
                                                                                            15
From server-side app to smart clients and services

           HTML5 & JS Engine                                   Browser app or            Client
                                                               embedded in native
            DOM      Controllers

            Client-side model                                                  web stg


                    events &      HTTP &
           JSON     notifications WebSockets




              Service Layer


       Channels      Repositories                                              RDBMS
                                                                                         Server
                                                                               CRUD

                              Re-distribution allowed with author’s consent.
                                                                                             16
From server-side app to smart clients and services

             HTML5 & JS Engine                                   Browser app or            Client
                                                                 embedded in native
             DOM        Controllers

             Client-side model                                                   web stg


                       events &      HTTP &
             JSON      notifications WebSockets


   Service          Service                 Service
                                                                         business /
                                                                         domain services
                Service Layer


       Channels         Repositories                                             RDBMS
                                                                                           Server
                                                                                 CRUD

                                Re-distribution allowed with author’s consent.
                                                                                               17
From server-side app to smart clients and services

             HTML5 & JS Engine                                 Browser app or            Client
                                                               embedded in native
             DOM        Controllers

             Client-side model                                                 web stg


                       events &      HTTP &
             JSON      notifications WebSockets


                                                                       business /
   Service          Service               Service                      domain services


       Channels         Repositories                                           RDBMS
                                                                                         Server
                                                                               CRUD

                              Re-distribution allowed with author’s consent.
                                                                                             18
From server-side app to smart clients and services

             HTML5 & JS Engine                                    Browser app or                       Client
                                                                  embedded in native
             DOM         Controllers

                Client-side model                                                     web stg


                        events &      HTTP &
             JSON       notifications WebSockets


                                                                          business /
   Service           Service                 Service                      domain services

      Service          Service                     Service                        platform services,
                                                                                  web APIs
                                                                                                       PaaS
       SQL             NoSQL                         other

                                 Re-distribution allowed with author’s consent.
                                                                                                           19
Demo
Applications as Services
       Monty Hall




   Re-distribution allowed with author’s consent.
                                                    20
Agenda
   Where we’ve been
   Where we’re going
   How we’ll get there
   Further resources
   Questions




                          Re-distribution allowed with author’s consent.
                                                                           21
Client side code as a first class citizen

 Apply design patterns
  • all of your old favorites still apply
  • functional and OO patterns


 Modularize
  • decompose applications
  • let loaders reassemble


 Unit test
  • several excellent test harnesses


 Enforce code quality
  • JSHint

                                    Re-distribution allowed with author’s consent.
                                                                                     22
Demo
Client side code as a first class citizen




           Re-distribution allowed with author’s consent.
                                                            23
Think Messaging

 Web Sockets are message based
 Web Workers are message based
 DOM Events are message based

 Web vs Integration is a false dichotomy




                             Re-distribution allowed with author’s consent.
                                                                              24
Demo
Client-Server Messaging




   Re-distribution allowed with author’s consent.
                                                    25
Simplify Views

 Simple templates can render on the client or server
  • JSP, et al will never render client side


 Can the model be cleanly serialized?
  • anemic domain model has benefits


 Avoid imperative logic
  • lots of conditions may indicate the model is poorly structured




                                  Re-distribution allowed with author’s consent.
                                                                                   26
Client vs Server

 The definitions of “back-end” and “front-end” are shifting
  • font-end != client, back-end != server


 Embrace both sides
 Specialize in client-server integration




                                 Re-distribution allowed with author’s consent.
                                                                                  27
Frameworks

 New frameworks are emerging
  • quickly reaching maturity
  • watch this space


 Frameworks will not solve all your issues
  • sorry




                                Re-distribution allowed with author’s consent.
                                                                                 28
Agenda
   Where we’ve been
   Where we’re going
   How we’ll get there
   Further resources
   Questions




                          Re-distribution allowed with author’s consent.
                                                                           29
IoC + JavaScript

 Decompose applications into modules
 Assemble modules together with Dependency Injection

 Brian Cavalier and John Hann
 • founders of Cujo.js


 Webinar January 31st
 • signup: http://www.springsource.org/node/3768
 • sneak peak: http://www.youtube.com/watch?v=TqX-CqYYwEc




                              Re-distribution allowed with author’s consent.
                                                                               30
Questions?




Re-distribution allowed with author’s consent.
                                                 31
Links

 Libraries
  • clicks.js: https://github.com/s2js/clicks
  • integration.js: https://github.com/s2js/integration
  • rest.js: https://github.com/s2js/rest
  • wire.js: https://github.com/cujojs/wire


 Scripted Editor: http://scripted-editor.github.com/scripted/

 Monty Hall application
  • front-end: https://github.com/five-eleven/monty-hall-ui
  • back-end: https://github.com/acolyer/monty-hall


 IoC + JavaScript Webinar: http://www.springsource.org/node/3768

                                   Re-distribution allowed with author’s consent.
                                                                                    32
Architecture of a Modern Web App
Scott Andrews


@scothis
andrewss@vmware.com




                             Re-distribution allowed with author’s consent.

                                            © 2013 SpringSource, A division of VMware. All rights reserved

Mais conteúdo relacionado

Mais procurados

Aws certification-101
Aws certification-101Aws certification-101
Aws certification-101Noel Healy
 
Presentation sso design_security
Presentation sso design_securityPresentation sso design_security
Presentation sso design_securityMarco Morana
 
VPC Design and New Capabilities for Amazon VPC
VPC Design and New Capabilities for Amazon VPCVPC Design and New Capabilities for Amazon VPC
VPC Design and New Capabilities for Amazon VPCAmazon Web Services
 
Cloud computing (pdf)
Cloud computing   (pdf)Cloud computing   (pdf)
Cloud computing (pdf)Steven Habuda
 
서버리스 IoT 백엔드 개발 및 구현 사례 : 윤석찬 (AWS 테크에반젤리스트)
서버리스 IoT 백엔드 개발 및 구현 사례 : 윤석찬 (AWS 테크에반젤리스트)서버리스 IoT 백엔드 개발 및 구현 사례 : 윤석찬 (AWS 테크에반젤리스트)
서버리스 IoT 백엔드 개발 및 구현 사례 : 윤석찬 (AWS 테크에반젤리스트)Amazon Web Services Korea
 
Amazon EKS - security best practices - 2022
Amazon EKS - security best practices - 2022 Amazon EKS - security best practices - 2022
Amazon EKS - security best practices - 2022 Jean-François LOMBARDO
 
K8s on AWS - Introducing Amazon EKS
K8s on AWS - Introducing Amazon EKSK8s on AWS - Introducing Amazon EKS
K8s on AWS - Introducing Amazon EKSAmazon Web Services
 
Event-Driven Stream Processing and Model Deployment with Apache Kafka, Kafka ...
Event-Driven Stream Processing and Model Deployment with Apache Kafka, Kafka ...Event-Driven Stream Processing and Model Deployment with Apache Kafka, Kafka ...
Event-Driven Stream Processing and Model Deployment with Apache Kafka, Kafka ...Kai Wähner
 
Deploying Confluent Platform for Production
Deploying Confluent Platform for ProductionDeploying Confluent Platform for Production
Deploying Confluent Platform for Productionconfluent
 
Amazon EKS: Getting Started
Amazon EKS: Getting StartedAmazon EKS: Getting Started
Amazon EKS: Getting StartedTanya Seno
 
VMware NSX 101: What, Why & How
VMware NSX 101: What, Why & HowVMware NSX 101: What, Why & How
VMware NSX 101: What, Why & HowAniekan Akpaffiong
 

Mais procurados (20)

Aws certification-101
Aws certification-101Aws certification-101
Aws certification-101
 
Presentation sso design_security
Presentation sso design_securityPresentation sso design_security
Presentation sso design_security
 
AWS
AWSAWS
AWS
 
Amazon EKS Deep Dive
Amazon EKS Deep DiveAmazon EKS Deep Dive
Amazon EKS Deep Dive
 
VPC Design and New Capabilities for Amazon VPC
VPC Design and New Capabilities for Amazon VPCVPC Design and New Capabilities for Amazon VPC
VPC Design and New Capabilities for Amazon VPC
 
Cloud computing (pdf)
Cloud computing   (pdf)Cloud computing   (pdf)
Cloud computing (pdf)
 
서버리스 IoT 백엔드 개발 및 구현 사례 : 윤석찬 (AWS 테크에반젤리스트)
서버리스 IoT 백엔드 개발 및 구현 사례 : 윤석찬 (AWS 테크에반젤리스트)서버리스 IoT 백엔드 개발 및 구현 사례 : 윤석찬 (AWS 테크에반젤리스트)
서버리스 IoT 백엔드 개발 및 구현 사례 : 윤석찬 (AWS 테크에반젤리스트)
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
 
Introduction to Amazon EKS
Introduction to Amazon EKSIntroduction to Amazon EKS
Introduction to Amazon EKS
 
Amazon EKS - security best practices - 2022
Amazon EKS - security best practices - 2022 Amazon EKS - security best practices - 2022
Amazon EKS - security best practices - 2022
 
K8s on AWS - Introducing Amazon EKS
K8s on AWS - Introducing Amazon EKSK8s on AWS - Introducing Amazon EKS
K8s on AWS - Introducing Amazon EKS
 
AWS PPT.pptx
AWS PPT.pptxAWS PPT.pptx
AWS PPT.pptx
 
Event-Driven Stream Processing and Model Deployment with Apache Kafka, Kafka ...
Event-Driven Stream Processing and Model Deployment with Apache Kafka, Kafka ...Event-Driven Stream Processing and Model Deployment with Apache Kafka, Kafka ...
Event-Driven Stream Processing and Model Deployment with Apache Kafka, Kafka ...
 
Monitoring and Alerting
Monitoring and AlertingMonitoring and Alerting
Monitoring and Alerting
 
Webhooks
WebhooksWebhooks
Webhooks
 
Introducing AWS Fargate
Introducing AWS FargateIntroducing AWS Fargate
Introducing AWS Fargate
 
Microsoft Azure Overview
Microsoft Azure OverviewMicrosoft Azure Overview
Microsoft Azure Overview
 
Deploying Confluent Platform for Production
Deploying Confluent Platform for ProductionDeploying Confluent Platform for Production
Deploying Confluent Platform for Production
 
Amazon EKS: Getting Started
Amazon EKS: Getting StartedAmazon EKS: Getting Started
Amazon EKS: Getting Started
 
VMware NSX 101: What, Why & How
VMware NSX 101: What, Why & HowVMware NSX 101: What, Why & How
VMware NSX 101: What, Why & How
 

Destaque

7 Stages of Scaling Web Applications
7 Stages of Scaling Web Applications7 Stages of Scaling Web Applications
7 Stages of Scaling Web ApplicationsDavid Mitzenmacher
 
High Scalability by Example – How can Web-Architecture scale like Facebook, T...
High Scalability by Example – How can Web-Architecture scale like Facebook, T...High Scalability by Example – How can Web-Architecture scale like Facebook, T...
High Scalability by Example – How can Web-Architecture scale like Facebook, T...Robert Mederer
 
Architecting large Node.js applications
Architecting large Node.js applicationsArchitecting large Node.js applications
Architecting large Node.js applicationsSergi Mansilla
 
MySQL Developer Day conference: MySQL Replication and Scalability
MySQL Developer Day conference: MySQL Replication and ScalabilityMySQL Developer Day conference: MySQL Replication and Scalability
MySQL Developer Day conference: MySQL Replication and ScalabilityShivji Kumar Jha
 
Successful MySQL Scalability
Successful MySQL ScalabilitySuccessful MySQL Scalability
Successful MySQL ScalabilityRonald Bradford
 
Seminar : "The Future of MYSQL - Roadmap to Success" session MySQL...
Seminar : "The Future of MYSQL - Roadmap to Success"  session MySQL...Seminar : "The Future of MYSQL - Roadmap to Success"  session MySQL...
Seminar : "The Future of MYSQL - Roadmap to Success" session MySQL...Software Park Thailand
 
Seminar : "The Future of MySQL - Roadmap to Success" session MySQL ...
Seminar : "The Future of MySQL - Roadmap to Success" session MySQL ...Seminar : "The Future of MySQL - Roadmap to Success" session MySQL ...
Seminar : "The Future of MySQL - Roadmap to Success" session MySQL ...Software Park Thailand
 
NoSQL and SQL - blending the best of both worlds
NoSQL and SQL - blending the best of both worldsNoSQL and SQL - blending the best of both worlds
NoSQL and SQL - blending the best of both worldsAndrew Morgan
 
MySQL High Availability Solutions - Feb 2015 webinar
MySQL High Availability Solutions - Feb 2015 webinarMySQL High Availability Solutions - Feb 2015 webinar
MySQL High Availability Solutions - Feb 2015 webinarAndrew Morgan
 
Seminar : "The Future of MySQL - Roadmap to Success" session MySQL ...
Seminar : "The Future of MySQL - Roadmap to Success" session MySQL ...Seminar : "The Future of MySQL - Roadmap to Success" session MySQL ...
Seminar : "The Future of MySQL - Roadmap to Success" session MySQL ...Software Park Thailand
 
Building a Scalable Architecture for web apps
Building a Scalable Architecture for web appsBuilding a Scalable Architecture for web apps
Building a Scalable Architecture for web appsDirecti Group
 
Mysql cluster introduction
Mysql cluster introductionMysql cluster introduction
Mysql cluster introductionAndrew Morgan
 
Best practices for MySQL High Availability
Best practices for MySQL High AvailabilityBest practices for MySQL High Availability
Best practices for MySQL High AvailabilityColin Charles
 
MySQL Cluster - Latest Developments (up to and including MySQL Cluster 7.4)
MySQL Cluster - Latest Developments (up to and including MySQL Cluster 7.4)MySQL Cluster - Latest Developments (up to and including MySQL Cluster 7.4)
MySQL Cluster - Latest Developments (up to and including MySQL Cluster 7.4)Andrew Morgan
 
FOSDEM 2015 - NoSQL and SQL the best of both worlds
FOSDEM 2015 - NoSQL and SQL the best of both worldsFOSDEM 2015 - NoSQL and SQL the best of both worlds
FOSDEM 2015 - NoSQL and SQL the best of both worldsAndrew Morgan
 
Facebook architecture presentation: scalability challenge
Facebook architecture presentation: scalability challengeFacebook architecture presentation: scalability challenge
Facebook architecture presentation: scalability challengeCristina Munoz
 

Destaque (19)

7 Stages of Scaling Web Applications
7 Stages of Scaling Web Applications7 Stages of Scaling Web Applications
7 Stages of Scaling Web Applications
 
High Scalability by Example – How can Web-Architecture scale like Facebook, T...
High Scalability by Example – How can Web-Architecture scale like Facebook, T...High Scalability by Example – How can Web-Architecture scale like Facebook, T...
High Scalability by Example – How can Web-Architecture scale like Facebook, T...
 
Architecting large Node.js applications
Architecting large Node.js applicationsArchitecting large Node.js applications
Architecting large Node.js applications
 
Scalability Design Principles - Internal Session
Scalability Design Principles - Internal SessionScalability Design Principles - Internal Session
Scalability Design Principles - Internal Session
 
Web application architecture
Web application architectureWeb application architecture
Web application architecture
 
MySQL Developer Day conference: MySQL Replication and Scalability
MySQL Developer Day conference: MySQL Replication and ScalabilityMySQL Developer Day conference: MySQL Replication and Scalability
MySQL Developer Day conference: MySQL Replication and Scalability
 
Successful MySQL Scalability
Successful MySQL ScalabilitySuccessful MySQL Scalability
Successful MySQL Scalability
 
Seminar : "The Future of MYSQL - Roadmap to Success" session MySQL...
Seminar : "The Future of MYSQL - Roadmap to Success"  session MySQL...Seminar : "The Future of MYSQL - Roadmap to Success"  session MySQL...
Seminar : "The Future of MYSQL - Roadmap to Success" session MySQL...
 
Seminar : "The Future of MySQL - Roadmap to Success" session MySQL ...
Seminar : "The Future of MySQL - Roadmap to Success" session MySQL ...Seminar : "The Future of MySQL - Roadmap to Success" session MySQL ...
Seminar : "The Future of MySQL - Roadmap to Success" session MySQL ...
 
NoSQL and SQL - blending the best of both worlds
NoSQL and SQL - blending the best of both worldsNoSQL and SQL - blending the best of both worlds
NoSQL and SQL - blending the best of both worlds
 
MySQL High Availability Solutions - Feb 2015 webinar
MySQL High Availability Solutions - Feb 2015 webinarMySQL High Availability Solutions - Feb 2015 webinar
MySQL High Availability Solutions - Feb 2015 webinar
 
MySQL Cluster Basics
MySQL Cluster BasicsMySQL Cluster Basics
MySQL Cluster Basics
 
Seminar : "The Future of MySQL - Roadmap to Success" session MySQL ...
Seminar : "The Future of MySQL - Roadmap to Success" session MySQL ...Seminar : "The Future of MySQL - Roadmap to Success" session MySQL ...
Seminar : "The Future of MySQL - Roadmap to Success" session MySQL ...
 
Building a Scalable Architecture for web apps
Building a Scalable Architecture for web appsBuilding a Scalable Architecture for web apps
Building a Scalable Architecture for web apps
 
Mysql cluster introduction
Mysql cluster introductionMysql cluster introduction
Mysql cluster introduction
 
Best practices for MySQL High Availability
Best practices for MySQL High AvailabilityBest practices for MySQL High Availability
Best practices for MySQL High Availability
 
MySQL Cluster - Latest Developments (up to and including MySQL Cluster 7.4)
MySQL Cluster - Latest Developments (up to and including MySQL Cluster 7.4)MySQL Cluster - Latest Developments (up to and including MySQL Cluster 7.4)
MySQL Cluster - Latest Developments (up to and including MySQL Cluster 7.4)
 
FOSDEM 2015 - NoSQL and SQL the best of both worlds
FOSDEM 2015 - NoSQL and SQL the best of both worldsFOSDEM 2015 - NoSQL and SQL the best of both worlds
FOSDEM 2015 - NoSQL and SQL the best of both worlds
 
Facebook architecture presentation: scalability challenge
Facebook architecture presentation: scalability challengeFacebook architecture presentation: scalability challenge
Facebook architecture presentation: scalability challenge
 

Semelhante a Architecture of a Modern Web App

Mongo DB for Java, Python and PHP Developers
Mongo DB for Java, Python and PHP DevelopersMongo DB for Java, Python and PHP Developers
Mongo DB for Java, Python and PHP DevelopersRick Hightower
 
Replication Solutions for PostgreSQL
Replication Solutions for PostgreSQLReplication Solutions for PostgreSQL
Replication Solutions for PostgreSQLPeter Eisentraut
 
Front End page speed performance improvements for Drupal
Front End page speed performance improvements for DrupalFront End page speed performance improvements for Drupal
Front End page speed performance improvements for DrupalAndy Kucharski
 
Web Apps vs. Native Apps: The Low Down
Web Apps vs. Native Apps: The Low DownWeb Apps vs. Native Apps: The Low Down
Web Apps vs. Native Apps: The Low DownApppli
 
Testing Drupal Site Performance Across Browsers, Geographies and Networks
Testing Drupal Site Performance Across Browsers, Geographies and NetworksTesting Drupal Site Performance Across Browsers, Geographies and Networks
Testing Drupal Site Performance Across Browsers, Geographies and NetworksAcquia
 
Architecture of a Modern Web App - SpringOne India
Architecture of a Modern Web App - SpringOne IndiaArchitecture of a Modern Web App - SpringOne India
Architecture of a Modern Web App - SpringOne IndiaJeremy Grelle
 
GWT Jug Stuttgart
GWT Jug StuttgartGWT Jug Stuttgart
GWT Jug Stuttgarthbraun
 
Front End page speed performance improvements for Drupal
Front End page speed performance improvements for DrupalFront End page speed performance improvements for Drupal
Front End page speed performance improvements for DrupalPromet Source
 
MongoDB at NoSQL Now! 2012: Benefits and Challenges of Using MongoDB in the E...
MongoDB at NoSQL Now! 2012: Benefits and Challenges of Using MongoDB in the E...MongoDB at NoSQL Now! 2012: Benefits and Challenges of Using MongoDB in the E...
MongoDB at NoSQL Now! 2012: Benefits and Challenges of Using MongoDB in the E...MongoDB
 
Subversion Edge Overview
Subversion Edge OverviewSubversion Edge Overview
Subversion Edge OverviewLotharSchubert
 
Sinatra and Heroku - A comfortable ruby way for web service
Sinatra and Heroku - A comfortable ruby way for web serviceSinatra and Heroku - A comfortable ruby way for web service
Sinatra and Heroku - A comfortable ruby way for web serviceTony Zhang
 
ServerTemplates - The Next Generation
ServerTemplates - The Next GenerationServerTemplates - The Next Generation
ServerTemplates - The Next GenerationRightScale
 
Change and Release Management with JIRA and Bamboo - Atlassian Summit 2010
Change and Release Management with JIRA and Bamboo - Atlassian Summit 2010Change and Release Management with JIRA and Bamboo - Atlassian Summit 2010
Change and Release Management with JIRA and Bamboo - Atlassian Summit 2010Atlassian
 
Rise of the hybrids
Rise of the hybridsRise of the hybrids
Rise of the hybridsOron Ben Zvi
 
REST vs. GraphQL: Critical Look
REST vs. GraphQL: Critical LookREST vs. GraphQL: Critical Look
REST vs. GraphQL: Critical LookNordic APIs
 
7_OPEN17_Azure_Next-gen Development with PaaS & Containers
7_OPEN17_Azure_Next-gen Development with PaaS & Containers7_OPEN17_Azure_Next-gen Development with PaaS & Containers
7_OPEN17_Azure_Next-gen Development with PaaS & ContainersKangaroot
 
Reaching 1 Million APIs and what to do when we get there
Reaching 1 Million APIs and what to do when we get thereReaching 1 Million APIs and what to do when we get there
Reaching 1 Million APIs and what to do when we get there3scale
 

Semelhante a Architecture of a Modern Web App (20)

Infographic Hosting
Infographic HostingInfographic Hosting
Infographic Hosting
 
Mongo DB for Java, Python and PHP Developers
Mongo DB for Java, Python and PHP DevelopersMongo DB for Java, Python and PHP Developers
Mongo DB for Java, Python and PHP Developers
 
Replication Solutions for PostgreSQL
Replication Solutions for PostgreSQLReplication Solutions for PostgreSQL
Replication Solutions for PostgreSQL
 
20120802 timisoara
20120802 timisoara20120802 timisoara
20120802 timisoara
 
Front End page speed performance improvements for Drupal
Front End page speed performance improvements for DrupalFront End page speed performance improvements for Drupal
Front End page speed performance improvements for Drupal
 
Web Apps vs. Native Apps: The Low Down
Web Apps vs. Native Apps: The Low DownWeb Apps vs. Native Apps: The Low Down
Web Apps vs. Native Apps: The Low Down
 
Testing Drupal Site Performance Across Browsers, Geographies and Networks
Testing Drupal Site Performance Across Browsers, Geographies and NetworksTesting Drupal Site Performance Across Browsers, Geographies and Networks
Testing Drupal Site Performance Across Browsers, Geographies and Networks
 
Architecture of a Modern Web App - SpringOne India
Architecture of a Modern Web App - SpringOne IndiaArchitecture of a Modern Web App - SpringOne India
Architecture of a Modern Web App - SpringOne India
 
GWT Jug Stuttgart
GWT Jug StuttgartGWT Jug Stuttgart
GWT Jug Stuttgart
 
Front End page speed performance improvements for Drupal
Front End page speed performance improvements for DrupalFront End page speed performance improvements for Drupal
Front End page speed performance improvements for Drupal
 
MongoDB at NoSQL Now! 2012: Benefits and Challenges of Using MongoDB in the E...
MongoDB at NoSQL Now! 2012: Benefits and Challenges of Using MongoDB in the E...MongoDB at NoSQL Now! 2012: Benefits and Challenges of Using MongoDB in the E...
MongoDB at NoSQL Now! 2012: Benefits and Challenges of Using MongoDB in the E...
 
Subversion Edge Overview
Subversion Edge OverviewSubversion Edge Overview
Subversion Edge Overview
 
Sinatra and Heroku - A comfortable ruby way for web service
Sinatra and Heroku - A comfortable ruby way for web serviceSinatra and Heroku - A comfortable ruby way for web service
Sinatra and Heroku - A comfortable ruby way for web service
 
ServerTemplates - The Next Generation
ServerTemplates - The Next GenerationServerTemplates - The Next Generation
ServerTemplates - The Next Generation
 
20120306 dublin js
20120306 dublin js20120306 dublin js
20120306 dublin js
 
Change and Release Management with JIRA and Bamboo - Atlassian Summit 2010
Change and Release Management with JIRA and Bamboo - Atlassian Summit 2010Change and Release Management with JIRA and Bamboo - Atlassian Summit 2010
Change and Release Management with JIRA and Bamboo - Atlassian Summit 2010
 
Rise of the hybrids
Rise of the hybridsRise of the hybrids
Rise of the hybrids
 
REST vs. GraphQL: Critical Look
REST vs. GraphQL: Critical LookREST vs. GraphQL: Critical Look
REST vs. GraphQL: Critical Look
 
7_OPEN17_Azure_Next-gen Development with PaaS & Containers
7_OPEN17_Azure_Next-gen Development with PaaS & Containers7_OPEN17_Azure_Next-gen Development with PaaS & Containers
7_OPEN17_Azure_Next-gen Development with PaaS & Containers
 
Reaching 1 Million APIs and what to do when we get there
Reaching 1 Million APIs and what to do when we get thereReaching 1 Million APIs and what to do when we get there
Reaching 1 Million APIs and what to do when we get there
 

Último

FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMKumar Satyam
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard37
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAnitaRaj43
 

Último (20)

FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 

Architecture of a Modern Web App

  • 1. Architecture of a Modern Web App Scott Andrews @scothis andrewss@vmware.com Re-distribution allowed with author’s consent. © 2013 SpringSource, A division of VMware. All rights reserved
  • 2. About Me  Joined SpringSource in 2008  Wearer of many hats  Drifter  Teams • frameworks ⇆ applications • Spring Web • open source ⇆ commercial • tc Server • client ⇆ server • Spring Insight • front-end ⇆ back-end • Cloud Foundry • SpringSource JavaScript Re-distribution allowed with author’s consent. 2
  • 3. Agenda  Where we’ve been  Where we’re going  How we’ll get there  Further resources  Questions Re-distribution allowed with author’s consent. 3
  • 4. Agenda  Where we’ve been  Where we’re going  How we’ll get there  Further resources  Questions Re-distribution allowed with author’s consent. 4
  • 5. In the beginning... Re-distribution allowed with author’s consent. 5
  • 6. In the beginning...  Sites were static HTML  Pros: • low computational overhead • highly cacheable • highly indexable  Cons: • hard (easy?) to update • no personalization • usually poor UI Re-distribution allowed with author’s consent. 6
  • 7. Let there be CGI Re-distribution allowed with author’s consent. 7
  • 8. Let there be CGI  Introduced dynamic generated  Pros: pages • dynamic! • selectively cacheable • highly indexable • personalizable  Cons: • “high” computational overhead • hard to create • usually poor UI Re-distribution allowed with author’s consent. 8
  • 9. LiveScript JavaScript http://en.wikipedia.org/wiki/File:Pop-up_ads.jpg Re-distribution allowed with author’s consent. 9
  • 10. LiveScript JavaScript  Dynamic pages  Pros:  Lightweight complement to • enhanced usability, maybe applets • reduced trips to the server  Mostly used for simple scripting • basic form validation  Cons: • popup ads • abuses annoyed users • comet cursor trails • business logic often implemented twice: client and server http://en.wikipedia.org/wiki/File:Pop-up_ads.jpg Re-distribution allowed with author’s consent. 10
  • 11. AJAX - Web 2.0  Google Maps sparked Web 2.0  Pros:  GMail • killer UI • required JavaScript • more responsive apps  Cons: • difficult to cache • impossible to index • required JavaScript Re-distribution allowed with author’s consent. 11
  • 12. Unobtrusive JavaScript  No JavaScript, no problem  Pros:  Provide features for user agents • wider compatibility that support them • just as rich UI • fall back to basic HTML • just as responsive  Cons: • higher development costs • requires thoughtful engineering Re-distribution allowed with author’s consent. 12
  • 13. Client Side Applications  Business logic lives on the client  Pros:  Resources and permanent state • reduce server workloads stored on the server • application is highly cacheable  Application and session state • extremely rich UI stored on client  Cons: • content not indexable • requires JavaScript • often requires a ‘modern’ browser Re-distribution allowed with author’s consent. 13
  • 14. Agenda  Where we’ve been  Where we’re going  How we’ll get there  Further resources  Questions Re-distribution allowed with author’s consent. 14
  • 15. From server-side app to smart clients and services Browser Client Browser-based HTML Rendering (progressive enhancement) HTML HTTP View Application Controllers Server Generation Service Layer Channels Repositories RDBMS Server CRUD Re-distribution allowed with author’s consent. 15
  • 16. From server-side app to smart clients and services HTML5 & JS Engine Browser app or Client embedded in native DOM Controllers Client-side model web stg events & HTTP & JSON notifications WebSockets Service Layer Channels Repositories RDBMS Server CRUD Re-distribution allowed with author’s consent. 16
  • 17. From server-side app to smart clients and services HTML5 & JS Engine Browser app or Client embedded in native DOM Controllers Client-side model web stg events & HTTP & JSON notifications WebSockets Service Service Service business / domain services Service Layer Channels Repositories RDBMS Server CRUD Re-distribution allowed with author’s consent. 17
  • 18. From server-side app to smart clients and services HTML5 & JS Engine Browser app or Client embedded in native DOM Controllers Client-side model web stg events & HTTP & JSON notifications WebSockets business / Service Service Service domain services Channels Repositories RDBMS Server CRUD Re-distribution allowed with author’s consent. 18
  • 19. From server-side app to smart clients and services HTML5 & JS Engine Browser app or Client embedded in native DOM Controllers Client-side model web stg events & HTTP & JSON notifications WebSockets business / Service Service Service domain services Service Service Service platform services, web APIs PaaS SQL NoSQL other Re-distribution allowed with author’s consent. 19
  • 20. Demo Applications as Services Monty Hall Re-distribution allowed with author’s consent. 20
  • 21. Agenda  Where we’ve been  Where we’re going  How we’ll get there  Further resources  Questions Re-distribution allowed with author’s consent. 21
  • 22. Client side code as a first class citizen  Apply design patterns • all of your old favorites still apply • functional and OO patterns  Modularize • decompose applications • let loaders reassemble  Unit test • several excellent test harnesses  Enforce code quality • JSHint Re-distribution allowed with author’s consent. 22
  • 23. Demo Client side code as a first class citizen Re-distribution allowed with author’s consent. 23
  • 24. Think Messaging  Web Sockets are message based  Web Workers are message based  DOM Events are message based  Web vs Integration is a false dichotomy Re-distribution allowed with author’s consent. 24
  • 25. Demo Client-Server Messaging Re-distribution allowed with author’s consent. 25
  • 26. Simplify Views  Simple templates can render on the client or server • JSP, et al will never render client side  Can the model be cleanly serialized? • anemic domain model has benefits  Avoid imperative logic • lots of conditions may indicate the model is poorly structured Re-distribution allowed with author’s consent. 26
  • 27. Client vs Server  The definitions of “back-end” and “front-end” are shifting • font-end != client, back-end != server  Embrace both sides  Specialize in client-server integration Re-distribution allowed with author’s consent. 27
  • 28. Frameworks  New frameworks are emerging • quickly reaching maturity • watch this space  Frameworks will not solve all your issues • sorry Re-distribution allowed with author’s consent. 28
  • 29. Agenda  Where we’ve been  Where we’re going  How we’ll get there  Further resources  Questions Re-distribution allowed with author’s consent. 29
  • 30. IoC + JavaScript  Decompose applications into modules  Assemble modules together with Dependency Injection  Brian Cavalier and John Hann • founders of Cujo.js  Webinar January 31st • signup: http://www.springsource.org/node/3768 • sneak peak: http://www.youtube.com/watch?v=TqX-CqYYwEc Re-distribution allowed with author’s consent. 30
  • 31. Questions? Re-distribution allowed with author’s consent. 31
  • 32. Links  Libraries • clicks.js: https://github.com/s2js/clicks • integration.js: https://github.com/s2js/integration • rest.js: https://github.com/s2js/rest • wire.js: https://github.com/cujojs/wire  Scripted Editor: http://scripted-editor.github.com/scripted/  Monty Hall application • front-end: https://github.com/five-eleven/monty-hall-ui • back-end: https://github.com/acolyer/monty-hall  IoC + JavaScript Webinar: http://www.springsource.org/node/3768 Re-distribution allowed with author’s consent. 32
  • 33. Architecture of a Modern Web App Scott Andrews @scothis andrewss@vmware.com Re-distribution allowed with author’s consent. © 2013 SpringSource, A division of VMware. All rights reserved