groke
DESCRIPTION
The Groke server experimentTRANSCRIPT
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
View
Model
Controller
Browser Server
JavaScript, CSS, HTML, JSP, Kid,
eRuby Java, Python, RubyAjax, XML, JSON
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
Web Application Web Application
Groke Client Groke Server
Web ServerBrowser
Internet
Monday, April 11, 2011
Implementation
Groke Client Groke Server
JavaScript
Ajax
CommonJS
Narwhal
JSGI
Jack
Middleware
Monday, April 11, 2011
Implementation
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]
Groke Server
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