SlideShare una empresa de Scribd logo
1 de 12
Descargar para leer sin conexión
REST Inspired Code
          Partitioning with a
          JavaScript Middleware
                Janne Kuuskeri, Tommi Mikkonen
                Tampere University of Technology




Monday, April 11, 2011
Motivation

               Web pages are now
               web applications
               Web application are too
               complex to build
               How to make it easier?




Monday, April 11, 2011
Current State
                          Browser                               Server

                                                                Controller

                             View

                                                                  Model
                         JavaScript, CSS,
                         HTML, JSP, Kid,
                                            Ajax, XML, JSON
                             eRuby                            Java, Python, Ruby



Monday, April 11, 2011
Problems
               Applications are
               fragmented over many
               different technologies
               Responsibilities are
               difficult to assign
               Traditional software
               engineering principles are
               difficult to apply



Monday, April 11, 2011
How to Make
          It Easier?
               One language to rule
               them all
               Fat client
               Automatic and more
               importantly dynamic
               code partitioning




Monday, April 11, 2011
Groke
                                           Internet

                         Web Application              Web Application


                          Groke Client                 Groke Server


                            Browser                     Web Server




Monday, April 11, 2011
Implementation

                         Groke Client   Groke Server


                         JavaScript     CommonJS
                         Ajax            Narwhal
                                        JSGI
                                         Jack
                                         Middleware

Monday, April 11, 2011
Implementation
                 Groke Server


               Expose interface in terms of resources
                         Modules : /groke/module/[module]
                         Functions : /groke/module/[module]/[function]
                         Constructors : /groke/ctor/[module]/[function]
                         Objects : /groke/obj/[obj-id]/[property]
                         Anonymous functions : /groke/func/[func-id]
Monday, April 11, 2011
Demo




Monday, April 11, 2011
REST?
               Functions as resources
                         RESTful interface is data (resource) driven
               Parameters are always POSTed to resources
                         The platform cannot have any understanding about
                         the semantics of the resources (possibly functions) it
                         exposes




Monday, April 11, 2011
Future Work


               Make Groke symmetric by utilizing Comet or
               WebSockets
               Make client side wrapper cacheable
               Garbage collection




Monday, April 11, 2011
Questions?


                         http://github.com/wuher/groke




Monday, April 11, 2011

Más contenido relacionado

La actualidad más candente

JavaOne 2011 - Going Mobile With Java Based Technologies Today
JavaOne 2011 - Going Mobile With Java Based Technologies TodayJavaOne 2011 - Going Mobile With Java Based Technologies Today
JavaOne 2011 - Going Mobile With Java Based Technologies Today
Wesley Hales
 

La actualidad más candente (20)

Introduction To Core Java - SpringPeople
Introduction To Core Java - SpringPeopleIntroduction To Core Java - SpringPeople
Introduction To Core Java - SpringPeople
 
JavaOne 2011 - Going Mobile With Java Based Technologies Today
JavaOne 2011 - Going Mobile With Java Based Technologies TodayJavaOne 2011 - Going Mobile With Java Based Technologies Today
JavaOne 2011 - Going Mobile With Java Based Technologies Today
 
Programming and the web for beginners
Programming and the web for beginnersProgramming and the web for beginners
Programming and the web for beginners
 
Introduction To Angular.js - SpringPeople
Introduction To Angular.js - SpringPeopleIntroduction To Angular.js - SpringPeople
Introduction To Angular.js - SpringPeople
 
How Symfony Changed My Life
How Symfony Changed My LifeHow Symfony Changed My Life
How Symfony Changed My Life
 
SpringPeople Building Web Sites with ASP.NET MVC FRAMEWORK
SpringPeople Building Web Sites with ASP.NET MVC FRAMEWORKSpringPeople Building Web Sites with ASP.NET MVC FRAMEWORK
SpringPeople Building Web Sites with ASP.NET MVC FRAMEWORK
 
La vita nella corsia di sorpasso; A tutta velocità, XPages!
La vita nella corsia di sorpasso; A tutta velocità, XPages!La vita nella corsia di sorpasso; A tutta velocità, XPages!
La vita nella corsia di sorpasso; A tutta velocità, XPages!
 
React & Flux Workshop
React & Flux WorkshopReact & Flux Workshop
React & Flux Workshop
 
Introduce Flux & react in practices (KKBOX)
Introduce Flux & react in practices (KKBOX)Introduce Flux & react in practices (KKBOX)
Introduce Flux & react in practices (KKBOX)
 
Sencha and Spring (Spring 2GX 2013)
Sencha and Spring (Spring 2GX 2013) Sencha and Spring (Spring 2GX 2013)
Sencha and Spring (Spring 2GX 2013)
 
Introducing Clean Architecture
Introducing Clean ArchitectureIntroducing Clean Architecture
Introducing Clean Architecture
 
Onion Architecture and the Blog
Onion Architecture and the BlogOnion Architecture and the Blog
Onion Architecture and the Blog
 
Reactive: Programming -> Systems -> Architecture
Reactive: Programming -> Systems -> ArchitectureReactive: Programming -> Systems -> Architecture
Reactive: Programming -> Systems -> Architecture
 
MWLUG 2015 - An Introduction to MVC
MWLUG 2015 - An Introduction to MVCMWLUG 2015 - An Introduction to MVC
MWLUG 2015 - An Introduction to MVC
 
SpringPeople Introduction to Mule ESB
SpringPeople Introduction to Mule ESBSpringPeople Introduction to Mule ESB
SpringPeople Introduction to Mule ESB
 
MVC - Introduction
MVC - IntroductionMVC - Introduction
MVC - Introduction
 
Java EE revisits design patterns
Java EE revisits design patterns Java EE revisits design patterns
Java EE revisits design patterns
 
Flux
FluxFlux
Flux
 
Mule
MuleMule
Mule
 
MWLUG - Universal Java
MWLUG  -  Universal JavaMWLUG  -  Universal Java
MWLUG - Universal Java
 

Destacado

Referaat Biodiversiteit Routes
Referaat Biodiversiteit RoutesReferaat Biodiversiteit Routes
Referaat Biodiversiteit Routes
A_Zuyderwijk
 
Hofpleinlijnviaduct
HofpleinlijnviaductHofpleinlijnviaduct
Hofpleinlijnviaduct
A_Zuyderwijk
 
Environmental principles
Environmental principlesEnvironmental principles
Environmental principles
janels
 

Destacado (18)

De Urban Manager
De Urban ManagerDe Urban Manager
De Urban Manager
 
2010 April Open Photo Sharing Sm
2010  April  Open Photo Sharing Sm2010  April  Open Photo Sharing Sm
2010 April Open Photo Sharing Sm
 
August Photo Sharing
August Photo SharingAugust Photo Sharing
August Photo Sharing
 
Alimentos artesanais
Alimentos artesanaisAlimentos artesanais
Alimentos artesanais
 
JavaScript Landscape
JavaScript LandscapeJavaScript Landscape
JavaScript Landscape
 
Referaat Biodiversiteit Routes
Referaat Biodiversiteit RoutesReferaat Biodiversiteit Routes
Referaat Biodiversiteit Routes
 
Hofpleinlijnviaduct
HofpleinlijnviaductHofpleinlijnviaduct
Hofpleinlijnviaduct
 
Feb. 2010 Photo Sharing
Feb. 2010 Photo SharingFeb. 2010 Photo Sharing
Feb. 2010 Photo Sharing
 
Revitalisering, Ontwikkeling, Transitie
Revitalisering, Ontwikkeling, TransitieRevitalisering, Ontwikkeling, Transitie
Revitalisering, Ontwikkeling, Transitie
 
Experiences on a Design Approach for Interactive Web Applications
Experiences on a Design Approach for Interactive Web ApplicationsExperiences on a Design Approach for Interactive Web Applications
Experiences on a Design Approach for Interactive Web Applications
 
Clifton Bibliography
Clifton BibliographyClifton Bibliography
Clifton Bibliography
 
CommonJS Frameworks
CommonJS FrameworksCommonJS Frameworks
CommonJS Frameworks
 
Preparation Cr U1 9 15 09
Preparation Cr U1 9 15 09Preparation Cr U1 9 15 09
Preparation Cr U1 9 15 09
 
REST overview
REST overviewREST overview
REST overview
 
Manoj Gangwar Brief Insight
Manoj Gangwar Brief InsightManoj Gangwar Brief Insight
Manoj Gangwar Brief Insight
 
5min Pres 2009 Li
5min Pres 2009 Li5min Pres 2009 Li
5min Pres 2009 Li
 
Environmental principles
Environmental principlesEnvironmental principles
Environmental principles
 
November Photo Sharing
November Photo SharingNovember Photo Sharing
November Photo Sharing
 

Similar a Groke

Community Code: Pega Mobile
Community Code: Pega MobileCommunity Code: Pega Mobile
Community Code: Pega Mobile
Sencha
 
Making Portals Cool: The Compelling Advantages of a Portlet Bridge
Making Portals Cool: The Compelling Advantages of a Portlet BridgeMaking Portals Cool: The Compelling Advantages of a Portlet Bridge
Making Portals Cool: The Compelling Advantages of a Portlet Bridge
Wesley Hales
 

Similar a Groke (20)

The Fast, The Slow and the Lazy
The Fast, The Slow and the LazyThe Fast, The Slow and the Lazy
The Fast, The Slow and the Lazy
 
RIA Security - Broken By Design
RIA Security - Broken By DesignRIA Security - Broken By Design
RIA Security - Broken By Design
 
A Look at the Future of HTML5
A Look at the Future of HTML5A Look at the Future of HTML5
A Look at the Future of HTML5
 
Jax 2011 keynote
Jax 2011 keynoteJax 2011 keynote
Jax 2011 keynote
 
Building Mobile Apps in WordPress - WordCamp Toronto 2011
Building Mobile Apps in WordPress - WordCamp Toronto 2011Building Mobile Apps in WordPress - WordCamp Toronto 2011
Building Mobile Apps in WordPress - WordCamp Toronto 2011
 
2011 The Year of Web apps
2011 The Year of Web apps2011 The Year of Web apps
2011 The Year of Web apps
 
Cross-Platform, Native Mobile Development with a DSL
Cross-Platform, Native Mobile Development with a DSLCross-Platform, Native Mobile Development with a DSL
Cross-Platform, Native Mobile Development with a DSL
 
Java EE Technical Keynote - JavaOne India 2011
Java EE Technical Keynote - JavaOne India 2011Java EE Technical Keynote - JavaOne India 2011
Java EE Technical Keynote - JavaOne India 2011
 
Flowdock's full-text search with MongoDB
Flowdock's full-text search with MongoDBFlowdock's full-text search with MongoDB
Flowdock's full-text search with MongoDB
 
Javascript Views, Client-side or Server-side with NodeJS
Javascript Views, Client-side or Server-side with NodeJSJavascript Views, Client-side or Server-side with NodeJS
Javascript Views, Client-side or Server-side with NodeJS
 
3D in the Browser via WebGL: It's Go Time
3D in the Browser via WebGL: It's Go Time 3D in the Browser via WebGL: It's Go Time
3D in the Browser via WebGL: It's Go Time
 
WebBee rapid web app development teck stack
WebBee rapid web app development teck stackWebBee rapid web app development teck stack
WebBee rapid web app development teck stack
 
AppScale Talk at SBonRails
AppScale Talk at SBonRailsAppScale Talk at SBonRails
AppScale Talk at SBonRails
 
Introduction To J Boss Seam
Introduction To J Boss SeamIntroduction To J Boss Seam
Introduction To J Boss Seam
 
Community Code: Pega Mobile
Community Code: Pega MobileCommunity Code: Pega Mobile
Community Code: Pega Mobile
 
2011 June - Singapore GTUG presentation. App Engine program update + intro to Go
2011 June - Singapore GTUG presentation. App Engine program update + intro to Go2011 June - Singapore GTUG presentation. App Engine program update + intro to Go
2011 June - Singapore GTUG presentation. App Engine program update + intro to Go
 
Making Portals Cool: The Compelling Advantages of a Portlet Bridge
Making Portals Cool: The Compelling Advantages of a Portlet BridgeMaking Portals Cool: The Compelling Advantages of a Portlet Bridge
Making Portals Cool: The Compelling Advantages of a Portlet Bridge
 
node.js for front-end developers
node.js for front-end developersnode.js for front-end developers
node.js for front-end developers
 
HTML XHTML HTML5
HTML XHTML HTML5HTML XHTML HTML5
HTML XHTML HTML5
 
Tim stone.html5.rjug.20110316
Tim stone.html5.rjug.20110316Tim stone.html5.rjug.20110316
Tim stone.html5.rjug.20110316
 

Groke

  • 1. REST Inspired Code Partitioning with a JavaScript Middleware Janne Kuuskeri, Tommi Mikkonen Tampere University of Technology Monday, April 11, 2011
  • 2. Motivation Web pages are now web applications Web application are too complex to build How to make it easier? Monday, April 11, 2011
  • 3. Current State Browser Server Controller View Model JavaScript, CSS, HTML, JSP, Kid, Ajax, XML, JSON eRuby Java, Python, Ruby Monday, April 11, 2011
  • 4. Problems Applications are fragmented over many different technologies Responsibilities are difficult to assign Traditional software engineering principles are difficult to apply Monday, April 11, 2011
  • 5. How to Make It Easier? One language to rule them all Fat client Automatic and more importantly dynamic code partitioning Monday, April 11, 2011
  • 6. Groke Internet Web Application Web Application Groke Client Groke Server Browser Web Server Monday, April 11, 2011
  • 7. Implementation Groke Client Groke Server JavaScript CommonJS Ajax Narwhal JSGI Jack Middleware Monday, April 11, 2011
  • 8. Implementation Groke Server Expose interface in terms of resources Modules : /groke/module/[module] Functions : /groke/module/[module]/[function] Constructors : /groke/ctor/[module]/[function] Objects : /groke/obj/[obj-id]/[property] Anonymous functions : /groke/func/[func-id] Monday, April 11, 2011
  • 10. REST? Functions as resources RESTful interface is data (resource) driven Parameters are always POSTed to resources The platform cannot have any understanding about the semantics of the resources (possibly functions) it exposes Monday, April 11, 2011
  • 11. Future Work Make Groke symmetric by utilizing Comet or WebSockets Make client side wrapper cacheable Garbage collection Monday, April 11, 2011
  • 12. Questions? http://github.com/wuher/groke Monday, April 11, 2011