SlideShare a Scribd company logo
1 of 36
Download to read offline
Server-Side JavaScript
 with Project Phobos

 Roberto Chinnici

 Senior Staff Engineer
 Sun Microsystems, Inc.

 http://phobos.dev.java.net
JavaScript is a real language




                                2
Small, terse language
          Closures
     Functional style OK
Prototype-based object model
        Object literals
     Creative DSL uses

                               3
JavaScript in the browser
    JSON on the wire
             +
cross-tier JavaScript code
 JavaScript on the server
JavaScript in the database
                             4
JavaScript On All Tiers




                          5
What is Phobos?
●   Lightweight web application framework
●   Running on the Java™ platform
●   All application logic is JavaScript
●   Most of the framework itself is in JavaScript
●   Deploy to any servlet container
●   IDE support for ease of development



                                                    6
Client Architecture

       JAVASCRIPT APPLICATION CODE



             JAVASCRIPT / AJAX
                LIBRARIES




                BROWSER




                                     7
Server Architecture

       JAVASCRIPT APPLICATION CODE



     JAVASCRIPT /         PHOBOS
         AJAX           JAVASCRIPT
      LIBRARIES          LIBRARIES

      MOZILLA RHINO      JAVA™
                       LIBRARIES   RDBMS
     PHOBOS RUNTIME

              JAVA™ PLATFORM

                                           8
Core Phobos Functionality
●   URL mapping/dispatching
●   Request/session/application contexts
●   Asynchronous script execution
●   Container independence
●   Full-featured debugger
●   JSR-223 scripting engine integration



                                           9
Development Process
1. Start NetBeans
2. Create skeleton application using wizard
3. Run it in debug mode
4. Map out the URLs for pages, services, Ajax
5. Attach logic to them
6. Test out interactively
7. Go back to step 4, repeat
8. Stop the application, you're done
                                            10
Tool Support
●   Phobos ships as NetBeans plugins
●   Project and component wizards
●   jMaki widget palette
●   Multithreaded debugger
    –   Breakpoints, inspectors, watches, ...
●   Server runs embedded in the IDE



                                                11
URL Design
●   Plain scripts       /doSomething.js
●   Controller/action   /store/display_cart
●   Resource            /book/isbn/1234-5678
●   User-defined        any regexp




                                               12
Defining New Patterns
●   Add new rules at startup or on the fly

    application.mapping.rules.push({
          url: ”/feed/@id”,
          factory: quot;module.atom.createFeedResourcequot;,
          fn: quot;library.mapping.maybeRESTquot;
    });



    Named functions in yellow
                                                       13
Application Layout
/application          /static
  /controller           /resources
     test.js               ...jMaki...
  /dynamic              /css
     sample.ejsp           main.css
  /module
                        faq.html
     application.js
                        release_notes.html
  /script
     index.js
                      /environment
  /template
                        development.js
  /view
                        startup-webapp.js
     test.ejs
                                             14
Plain Scripts
●   Servlet-like
●   request/response objects bound in context

response.status = 200;
response.contentType = “text/html”;
var writer = response.writer;
writer.println(“<html><head>....</body></html>”);
writer.flush();


/sample.js         /application/script/sample.js
                                                    15
Controllers
●     JavaScript “classes” with “methods”
// package
library.common.define(controller, quot;mainquot;, function() {
      function Main() { } // class
      Main.prototype.show = function() { // method
          library.view.render(“show.ejs”);
      }
      this.Main = Main; // export
});
/@controller/@action                    /main/show
                                                         16
Using JavaScript Libraries
●   No special treatment for built-in libraries
●   Dojo 0.9, Prototype, YUI all usable
●   Load them in a controller (or using an
    event handler)
    library.dojo.load(“/application/dojo0.9”);
    library.scripting.run(“prototype.js”);
●   Be careful in modifying Object.prototype
    and friends in the presence of pooling
●   Other globals OK
                                                  17
Scripting Engine Integration
●   Optional compilation to bytecode
●   Compiled scripts are cached
●   Engines are pooled
●   Works with any JSR-223 engine
●   JavaScript engine hooked to debugger API




                                               18
Using Java Libraries
●   Complete interoperability
    –   Call into any Java libraries
    –   Implement any Java interfaces
    –   Subclass any Java classes
●   Phobos can coexist with regular servlets
    and any Java web framework
●   Tap into any Java libraries you need



                                               19
Mozilla Rhino + Extensions
●   Dynamic objects via JSAdapter
●   E4X
●   property get/set with Rhino 1.6R6
●   Lots of constructs become possible:
    –   autoloaded modules
    –   builders
    –   multiple inheritance
    –   missing_method / doesNotUnderstand:

                                              20
E4X
●   ECMA 357
●   XML support at the language level
    –   literals, namespaces, interpolation
●   XPath like syntax
    doc..*::customer.@name
●   for each construct
●   Powerful, not entirely intuitive


                                              21
E4X - Examples
// HTML
var doc = <html/>;
doc.head.title = “Hello, world!”;
doc.body.@bgcolor = “#224466”;
doc.body.p = “What's up, doc?”;

// ATOM
var nsATOM = new Namespace(quot;atomquot;, quot;http://www.w3.org/2005/Atomquot;);
default xml namespace = nsATOM;
var doc = <entry><title>{args.title}</title><summary>{args.summary}
   /summary></entry>;

                                                                      22
Views / Templating with EJS
●   PHP / ASP / RHTML-like syntax

    <html>
      <head>
        <title><%= model.title %></title>
      </head>
      <body>
         <% generateBody() %>
      </body>
    </html>
                                            23
Response Post-Processing
●   Capture rendered page
●   HTML parsed to DOM via TagLib
●   Post-processing stage is similar to the
    browser model
    –   scripts traverse/modify the document object
●   Unified programming model




                                                      24
jMaki
●   Lightweight JavaScript framework
●   Spans multiple widget libraries
●   Unified interface to widgets
●   Event-based component “glueing”
●   CSS-based layouts
●   Server-agnostic: JSP, JSF, Phobos, PHP



                                             25
jMaki Support in Phobos
●   Built-in library.jmaki
●   Configured with JSON
●   Use common resource layout
●   Widget palette in NetBeans
●   Small footprint
    –   Widget libraries added on first use




                                              26
REST Support
●   Not controller-based
●   Resources are classes
●   Methods are HTTP methods
●   Code deals with HTTP entities
●   Framework takes care of HTTP details
    .e.g. ETags, conditional operations, etc.
●   Sample AtomPub server


                                                27
Asynchronous Tasks
●   Multithreaded runtime
●   Schedule scripts for execution in the
    background
●   Pass arguments in JSON format
●   library.lang.invokeAsync calls a named
    function in a new thread
●   Currently prototyping an Actor library
●   Alternative: XMLHttpRequest-like object

                                              28
Persistence Options
●   Java solutions more mature
    –   JavaScript wrapper for Java Persistence
    –   Native JavaScript DB API on top of JDBC
●   Pure JavaScript solutions being developed
    –   ActiveRecord port to JavaScript
    –   Port of low-level Gears API
    –   Port of GearsORM**



                                                  29
“Soft” Scripting Engines
●   Non-embedded DSL facility
●   Translate to favorite target language
●   Plug new languages
●   Implemented by one JavaScript function
●   Inherit debugging support from lower layer
●   Example: Narrative JavaScript (.njs files)



                                                 30
Narrative JavaScript
●   New “yield” operator (->) for async calls
●   Implemented as a preprocessor
●   Separate browser/server runtime
●   End goals:
    –   Painless asynchronous processing
    –   Continuation-like behavior without the cost




                                                      31
IDE in the Browser
●   Ongoing work
●   Started with the “system apps” concept
●   In-browser debugger prototype
●   Running in the same space as the
    debuggee
●   Some careful separation is in order...



                                             32
Demo




       33
GlassFish V3
●   Next-generation application server
●   Open source, open development process
●   Small footpring, fast startup
●   Modular, extensible
●   Ideal container for scripting applications




                                                 34
Conclusions
●   JavaScript is a real language
●   Dynamic characteristics valuable on the
    server too
●   Implementations getting more
    sophisticated every day
●   Great integration with Java libraries and
    frameworks
●   The question is: why not?

                                                35
Server-Side JavaScript
 with Project Phobos

 Roberto Chinnici

 roberto.chinnici@sun.com

 http://phobos.dev.java.net




                              36

More Related Content

What's hot

Enabling White-Box Reuse in a Pure Composition Language
Enabling White-Box Reuse in a Pure Composition LanguageEnabling White-Box Reuse in a Pure Composition Language
Enabling White-Box Reuse in a Pure Composition Languageelliando dias
 
Node.js Development with Apache NetBeans
Node.js Development with Apache NetBeansNode.js Development with Apache NetBeans
Node.js Development with Apache NetBeansRyan Cuprak
 
Developing Plug-Ins for NetBeans
Developing Plug-Ins for NetBeansDeveloping Plug-Ins for NetBeans
Developing Plug-Ins for NetBeanselliando dias
 
Crash Course HTML/Rails Slides
Crash Course HTML/Rails SlidesCrash Course HTML/Rails Slides
Crash Course HTML/Rails SlidesUdita Plaha
 
Lecture 2: Servlets
Lecture 2:  ServletsLecture 2:  Servlets
Lecture 2: ServletsFahad Golra
 
Exploring Java Heap Dumps (Oracle Code One 2018)
Exploring Java Heap Dumps (Oracle Code One 2018)Exploring Java Heap Dumps (Oracle Code One 2018)
Exploring Java Heap Dumps (Oracle Code One 2018)Ryan Cuprak
 
Jaoo Michael Neale 09
Jaoo Michael Neale 09Jaoo Michael Neale 09
Jaoo Michael Neale 09Michael Neale
 
50 New Features of Java EE 7 in 50 minutes
50 New Features of Java EE 7 in 50 minutes50 New Features of Java EE 7 in 50 minutes
50 New Features of Java EE 7 in 50 minutesArun Gupta
 
Innoplexia DevTools to Crawl Webpages
Innoplexia DevTools to Crawl WebpagesInnoplexia DevTools to Crawl Webpages
Innoplexia DevTools to Crawl Webpagesd0x
 
Apache Camel: The Swiss Army Knife of Open Source Integration
Apache Camel: The Swiss Army Knife of Open Source IntegrationApache Camel: The Swiss Army Knife of Open Source Integration
Apache Camel: The Swiss Army Knife of Open Source Integrationprajods
 
Faster Java EE Builds with Gradle
Faster Java EE Builds with GradleFaster Java EE Builds with Gradle
Faster Java EE Builds with GradleRyan Cuprak
 
XPages Workshop: Concepts And Exercises
XPages Workshop:   Concepts And ExercisesXPages Workshop:   Concepts And Exercises
XPages Workshop: Concepts And Exercisesddrschiw
 
JSP - Part 2 (Final)
JSP - Part 2 (Final) JSP - Part 2 (Final)
JSP - Part 2 (Final) Hitesh-Java
 
NetBeans Plugin Development Workshop
NetBeans Plugin Development WorkshopNetBeans Plugin Development Workshop
NetBeans Plugin Development Workshopelliando dias
 
Lecture 5 JSTL, custom tags, maven
Lecture 5   JSTL, custom tags, mavenLecture 5   JSTL, custom tags, maven
Lecture 5 JSTL, custom tags, mavenFahad Golra
 
Modularize JavaScript with RequireJS
Modularize JavaScript with RequireJSModularize JavaScript with RequireJS
Modularize JavaScript with RequireJSMinh Hoang
 

What's hot (20)

Enabling White-Box Reuse in a Pure Composition Language
Enabling White-Box Reuse in a Pure Composition LanguageEnabling White-Box Reuse in a Pure Composition Language
Enabling White-Box Reuse in a Pure Composition Language
 
Node.js Development with Apache NetBeans
Node.js Development with Apache NetBeansNode.js Development with Apache NetBeans
Node.js Development with Apache NetBeans
 
Developing Plug-Ins for NetBeans
Developing Plug-Ins for NetBeansDeveloping Plug-Ins for NetBeans
Developing Plug-Ins for NetBeans
 
Open Social Summit Korea
Open Social Summit KoreaOpen Social Summit Korea
Open Social Summit Korea
 
Jsp(java server pages)
Jsp(java server pages)Jsp(java server pages)
Jsp(java server pages)
 
Crash Course HTML/Rails Slides
Crash Course HTML/Rails SlidesCrash Course HTML/Rails Slides
Crash Course HTML/Rails Slides
 
Lecture 2: Servlets
Lecture 2:  ServletsLecture 2:  Servlets
Lecture 2: Servlets
 
Exploring Java Heap Dumps (Oracle Code One 2018)
Exploring Java Heap Dumps (Oracle Code One 2018)Exploring Java Heap Dumps (Oracle Code One 2018)
Exploring Java Heap Dumps (Oracle Code One 2018)
 
Java EE 8
Java EE 8Java EE 8
Java EE 8
 
Jaoo Michael Neale 09
Jaoo Michael Neale 09Jaoo Michael Neale 09
Jaoo Michael Neale 09
 
50 New Features of Java EE 7 in 50 minutes
50 New Features of Java EE 7 in 50 minutes50 New Features of Java EE 7 in 50 minutes
50 New Features of Java EE 7 in 50 minutes
 
Ajax basics
Ajax basicsAjax basics
Ajax basics
 
Innoplexia DevTools to Crawl Webpages
Innoplexia DevTools to Crawl WebpagesInnoplexia DevTools to Crawl Webpages
Innoplexia DevTools to Crawl Webpages
 
Apache Camel: The Swiss Army Knife of Open Source Integration
Apache Camel: The Swiss Army Knife of Open Source IntegrationApache Camel: The Swiss Army Knife of Open Source Integration
Apache Camel: The Swiss Army Knife of Open Source Integration
 
Faster Java EE Builds with Gradle
Faster Java EE Builds with GradleFaster Java EE Builds with Gradle
Faster Java EE Builds with Gradle
 
XPages Workshop: Concepts And Exercises
XPages Workshop:   Concepts And ExercisesXPages Workshop:   Concepts And Exercises
XPages Workshop: Concepts And Exercises
 
JSP - Part 2 (Final)
JSP - Part 2 (Final) JSP - Part 2 (Final)
JSP - Part 2 (Final)
 
NetBeans Plugin Development Workshop
NetBeans Plugin Development WorkshopNetBeans Plugin Development Workshop
NetBeans Plugin Development Workshop
 
Lecture 5 JSTL, custom tags, maven
Lecture 5   JSTL, custom tags, mavenLecture 5   JSTL, custom tags, maven
Lecture 5 JSTL, custom tags, maven
 
Modularize JavaScript with RequireJS
Modularize JavaScript with RequireJSModularize JavaScript with RequireJS
Modularize JavaScript with RequireJS
 

Viewers also liked

CON6423: Scalable JavaScript applications with Project Nashorn
CON6423: Scalable JavaScript applications with Project NashornCON6423: Scalable JavaScript applications with Project Nashorn
CON6423: Scalable JavaScript applications with Project NashornMichel Graciano
 
Turbo Enterprise Web 2.0 Ajax World 20081
Turbo Enterprise Web 2.0 Ajax World 20081Turbo Enterprise Web 2.0 Ajax World 20081
Turbo Enterprise Web 2.0 Ajax World 20081rajivmordani
 
Sue Googe Spice Up Ux
Sue Googe Spice Up UxSue Googe Spice Up Ux
Sue Googe Spice Up Uxrajivmordani
 
Tripit Ajaxworld V5
Tripit Ajaxworld V5Tripit Ajaxworld V5
Tripit Ajaxworld V5rajivmordani
 
The Beauty Of Java Script V5a
The Beauty Of Java Script V5aThe Beauty Of Java Script V5a
The Beauty Of Java Script V5arajivmordani
 
Practical Thin Server Architecture With Dojo Peter Svensson
Practical Thin Server Architecture With Dojo Peter SvenssonPractical Thin Server Architecture With Dojo Peter Svensson
Practical Thin Server Architecture With Dojo Peter Svenssonrajivmordani
 
Web 2 0 Data Visualization With Jsf
Web 2 0 Data Visualization With JsfWeb 2 0 Data Visualization With Jsf
Web 2 0 Data Visualization With Jsfrajivmordani
 
X Aware Ajax World V1
X Aware Ajax World V1X Aware Ajax World V1
X Aware Ajax World V1rajivmordani
 
Thin Server Architecture SPA, 5 years old presentation
Thin Server Architecture SPA, 5 years old presentationThin Server Architecture SPA, 5 years old presentation
Thin Server Architecture SPA, 5 years old presentationDavid Amend
 

Viewers also liked (10)

CON6423: Scalable JavaScript applications with Project Nashorn
CON6423: Scalable JavaScript applications with Project NashornCON6423: Scalable JavaScript applications with Project Nashorn
CON6423: Scalable JavaScript applications with Project Nashorn
 
Turbo Enterprise Web 2.0 Ajax World 20081
Turbo Enterprise Web 2.0 Ajax World 20081Turbo Enterprise Web 2.0 Ajax World 20081
Turbo Enterprise Web 2.0 Ajax World 20081
 
Designing Rich Web Experience
Designing Rich Web ExperienceDesigning Rich Web Experience
Designing Rich Web Experience
 
Sue Googe Spice Up Ux
Sue Googe Spice Up UxSue Googe Spice Up Ux
Sue Googe Spice Up Ux
 
Tripit Ajaxworld V5
Tripit Ajaxworld V5Tripit Ajaxworld V5
Tripit Ajaxworld V5
 
The Beauty Of Java Script V5a
The Beauty Of Java Script V5aThe Beauty Of Java Script V5a
The Beauty Of Java Script V5a
 
Practical Thin Server Architecture With Dojo Peter Svensson
Practical Thin Server Architecture With Dojo Peter SvenssonPractical Thin Server Architecture With Dojo Peter Svensson
Practical Thin Server Architecture With Dojo Peter Svensson
 
Web 2 0 Data Visualization With Jsf
Web 2 0 Data Visualization With JsfWeb 2 0 Data Visualization With Jsf
Web 2 0 Data Visualization With Jsf
 
X Aware Ajax World V1
X Aware Ajax World V1X Aware Ajax World V1
X Aware Ajax World V1
 
Thin Server Architecture SPA, 5 years old presentation
Thin Server Architecture SPA, 5 years old presentationThin Server Architecture SPA, 5 years old presentation
Thin Server Architecture SPA, 5 years old presentation
 

Similar to Server Side Javascript

How to make Ajax Libraries work for you
How to make Ajax Libraries work for youHow to make Ajax Libraries work for you
How to make Ajax Libraries work for youSimon Willison
 
Java Script recruiting
Java Script recruitingJava Script recruiting
Java Script recruitingIhor Odynets
 
End-to-end HTML5 APIs - The Geek Gathering 2013
End-to-end HTML5 APIs - The Geek Gathering 2013End-to-end HTML5 APIs - The Geek Gathering 2013
End-to-end HTML5 APIs - The Geek Gathering 2013Alexandre Morgaut
 
Dynamic Languages Web Frameworks Indicthreads 2009
Dynamic Languages Web Frameworks Indicthreads 2009Dynamic Languages Web Frameworks Indicthreads 2009
Dynamic Languages Web Frameworks Indicthreads 2009Arun Gupta
 
Frost - W3C Mobile Ajax Workshop 2007
Frost - W3C Mobile Ajax Workshop 2007Frost - W3C Mobile Ajax Workshop 2007
Frost - W3C Mobile Ajax Workshop 2007Rocco Georgi
 
BaseX user-group-talk XML Prague 2013
BaseX user-group-talk XML Prague 2013BaseX user-group-talk XML Prague 2013
BaseX user-group-talk XML Prague 2013Andy Bunce
 
(2018) Webpack Encore - Asset Management for the rest of us
(2018) Webpack Encore - Asset Management for the rest of us(2018) Webpack Encore - Asset Management for the rest of us
(2018) Webpack Encore - Asset Management for the rest of usStefan Adolf
 
Galaxy
GalaxyGalaxy
Galaxybosc
 
What is Mean Stack Development ?
What is Mean Stack Development ?What is Mean Stack Development ?
What is Mean Stack Development ?Balajihope
 
Lecture 8 - Qooxdoo - Rap Course At The University Of Szeged
Lecture 8 - Qooxdoo - Rap Course At The University Of SzegedLecture 8 - Qooxdoo - Rap Course At The University Of Szeged
Lecture 8 - Qooxdoo - Rap Course At The University Of SzegedFabian Jakobs
 
eXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework IntroductioneXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework Introductionvstorm83
 
Beginning MEAN Stack
Beginning MEAN StackBeginning MEAN Stack
Beginning MEAN StackRob Davarnia
 
qooxdoo - Open Source Ajax Framework
qooxdoo - Open Source Ajax Frameworkqooxdoo - Open Source Ajax Framework
qooxdoo - Open Source Ajax Frameworkecker
 
Introduction to node js - From "hello world" to deploying on azure
Introduction to node js - From "hello world" to deploying on azureIntroduction to node js - From "hello world" to deploying on azure
Introduction to node js - From "hello world" to deploying on azureColin Mackay
 
Application Architecture Trends
Application Architecture TrendsApplication Architecture Trends
Application Architecture TrendsSrini Penchikala
 

Similar to Server Side Javascript (20)

Node.js an Exectutive View
Node.js an Exectutive ViewNode.js an Exectutive View
Node.js an Exectutive View
 
JavaScript-Core
JavaScript-CoreJavaScript-Core
JavaScript-Core
 
JavaScript-Core
JavaScript-CoreJavaScript-Core
JavaScript-Core
 
How to make Ajax Libraries work for you
How to make Ajax Libraries work for youHow to make Ajax Libraries work for you
How to make Ajax Libraries work for you
 
Java Script recruiting
Java Script recruitingJava Script recruiting
Java Script recruiting
 
End-to-end HTML5 APIs - The Geek Gathering 2013
End-to-end HTML5 APIs - The Geek Gathering 2013End-to-end HTML5 APIs - The Geek Gathering 2013
End-to-end HTML5 APIs - The Geek Gathering 2013
 
Dynamic Languages Web Frameworks Indicthreads 2009
Dynamic Languages Web Frameworks Indicthreads 2009Dynamic Languages Web Frameworks Indicthreads 2009
Dynamic Languages Web Frameworks Indicthreads 2009
 
Frost - W3C Mobile Ajax Workshop 2007
Frost - W3C Mobile Ajax Workshop 2007Frost - W3C Mobile Ajax Workshop 2007
Frost - W3C Mobile Ajax Workshop 2007
 
BaseX user-group-talk XML Prague 2013
BaseX user-group-talk XML Prague 2013BaseX user-group-talk XML Prague 2013
BaseX user-group-talk XML Prague 2013
 
(2018) Webpack Encore - Asset Management for the rest of us
(2018) Webpack Encore - Asset Management for the rest of us(2018) Webpack Encore - Asset Management for the rest of us
(2018) Webpack Encore - Asset Management for the rest of us
 
Galaxy
GalaxyGalaxy
Galaxy
 
What is Mean Stack Development ?
What is Mean Stack Development ?What is Mean Stack Development ?
What is Mean Stack Development ?
 
Lecture 8 - Qooxdoo - Rap Course At The University Of Szeged
Lecture 8 - Qooxdoo - Rap Course At The University Of SzegedLecture 8 - Qooxdoo - Rap Course At The University Of Szeged
Lecture 8 - Qooxdoo - Rap Course At The University Of Szeged
 
eXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework IntroductioneXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework Introduction
 
The Java alternative to Javascript
The Java alternative to JavascriptThe Java alternative to Javascript
The Java alternative to Javascript
 
Beginning MEAN Stack
Beginning MEAN StackBeginning MEAN Stack
Beginning MEAN Stack
 
qooxdoo - Open Source Ajax Framework
qooxdoo - Open Source Ajax Frameworkqooxdoo - Open Source Ajax Framework
qooxdoo - Open Source Ajax Framework
 
Advanced JavaScript
Advanced JavaScriptAdvanced JavaScript
Advanced JavaScript
 
Introduction to node js - From "hello world" to deploying on azure
Introduction to node js - From "hello world" to deploying on azureIntroduction to node js - From "hello world" to deploying on azure
Introduction to node js - From "hello world" to deploying on azure
 
Application Architecture Trends
Application Architecture TrendsApplication Architecture Trends
Application Architecture Trends
 

More from rajivmordani

Social Networking Intranet
Social Networking IntranetSocial Networking Intranet
Social Networking Intranetrajivmordani
 
Slow Cool 20081009 Final
Slow Cool 20081009 FinalSlow Cool 20081009 Final
Slow Cool 20081009 Finalrajivmordani
 
Pushing Datatothe Browserwith Comet Ajax W
Pushing Datatothe Browserwith Comet Ajax WPushing Datatothe Browserwith Comet Ajax W
Pushing Datatothe Browserwith Comet Ajax Wrajivmordani
 
I Phone Dev Summit Prezo Guy Naor Final
I Phone Dev Summit Prezo Guy Naor FinalI Phone Dev Summit Prezo Guy Naor Final
I Phone Dev Summit Prezo Guy Naor Finalrajivmordani
 
Netapp Michael Galpin
Netapp Michael GalpinNetapp Michael Galpin
Netapp Michael Galpinrajivmordani
 
Laird Best Practices Ajax World West2008
Laird Best Practices Ajax World West2008Laird Best Practices Ajax World West2008
Laird Best Practices Ajax World West2008rajivmordani
 
Mike Grushin Developing Ugc Sites That Scale
Mike Grushin    Developing Ugc Sites That ScaleMike Grushin    Developing Ugc Sites That Scale
Mike Grushin Developing Ugc Sites That Scalerajivmordani
 
Java Fx Ajaxworld Rags V1
Java Fx Ajaxworld Rags V1Java Fx Ajaxworld Rags V1
Java Fx Ajaxworld Rags V1rajivmordani
 
Good Parts of JavaScript Douglas Crockford
Good Parts of JavaScript Douglas CrockfordGood Parts of JavaScript Douglas Crockford
Good Parts of JavaScript Douglas Crockfordrajivmordani
 
Flying Pixels Ent Apps Jeremy Chone
Flying Pixels Ent Apps Jeremy ChoneFlying Pixels Ent Apps Jeremy Chone
Flying Pixels Ent Apps Jeremy Chonerajivmordani
 
I Phone Presentation Jan Linden Gips
I Phone Presentation Jan Linden GipsI Phone Presentation Jan Linden Gips
I Phone Presentation Jan Linden Gipsrajivmordani
 
Flex Flash And On Demand
Flex Flash And On DemandFlex Flash And On Demand
Flex Flash And On Demandrajivmordani
 
I Phone Dev Summit Lefty 03 07 08
I Phone Dev Summit Lefty 03 07 08I Phone Dev Summit Lefty 03 07 08
I Phone Dev Summit Lefty 03 07 08rajivmordani
 
I Phone Summit Dmeeker Final
I Phone Summit Dmeeker FinalI Phone Summit Dmeeker Final
I Phone Summit Dmeeker Finalrajivmordani
 
Digital Jacknife Aja Xevangerber
Digital Jacknife Aja XevangerberDigital Jacknife Aja Xevangerber
Digital Jacknife Aja Xevangerberrajivmordani
 

More from rajivmordani (20)

Social Networking Intranet
Social Networking IntranetSocial Networking Intranet
Social Networking Intranet
 
Ssjs Presentation
Ssjs PresentationSsjs Presentation
Ssjs Presentation
 
Jsf Ajax
Jsf AjaxJsf Ajax
Jsf Ajax
 
Ria Enterprise
Ria EnterpriseRia Enterprise
Ria Enterprise
 
Slow Cool 20081009 Final
Slow Cool 20081009 FinalSlow Cool 20081009 Final
Slow Cool 20081009 Final
 
Pushing Datatothe Browserwith Comet Ajax W
Pushing Datatothe Browserwith Comet Ajax WPushing Datatothe Browserwith Comet Ajax W
Pushing Datatothe Browserwith Comet Ajax W
 
I Phone Dev Summit Prezo Guy Naor Final
I Phone Dev Summit Prezo Guy Naor FinalI Phone Dev Summit Prezo Guy Naor Final
I Phone Dev Summit Prezo Guy Naor Final
 
Netapp Michael Galpin
Netapp Michael GalpinNetapp Michael Galpin
Netapp Michael Galpin
 
Laird Best Practices Ajax World West2008
Laird Best Practices Ajax World West2008Laird Best Practices Ajax World West2008
Laird Best Practices Ajax World West2008
 
Mike Grushin Developing Ugc Sites That Scale
Mike Grushin    Developing Ugc Sites That ScaleMike Grushin    Developing Ugc Sites That Scale
Mike Grushin Developing Ugc Sites That Scale
 
Java Fx Ajaxworld Rags V1
Java Fx Ajaxworld Rags V1Java Fx Ajaxworld Rags V1
Java Fx Ajaxworld Rags V1
 
Good Parts of JavaScript Douglas Crockford
Good Parts of JavaScript Douglas CrockfordGood Parts of JavaScript Douglas Crockford
Good Parts of JavaScript Douglas Crockford
 
Flying Pixels Ent Apps Jeremy Chone
Flying Pixels Ent Apps Jeremy ChoneFlying Pixels Ent Apps Jeremy Chone
Flying Pixels Ent Apps Jeremy Chone
 
I Phone Dev
I Phone DevI Phone Dev
I Phone Dev
 
I Phone Presentation Jan Linden Gips
I Phone Presentation Jan Linden GipsI Phone Presentation Jan Linden Gips
I Phone Presentation Jan Linden Gips
 
Flex Flash And On Demand
Flex Flash And On DemandFlex Flash And On Demand
Flex Flash And On Demand
 
I Phone Dev Summit Lefty 03 07 08
I Phone Dev Summit Lefty 03 07 08I Phone Dev Summit Lefty 03 07 08
I Phone Dev Summit Lefty 03 07 08
 
I Phone Summit Dmeeker Final
I Phone Summit Dmeeker FinalI Phone Summit Dmeeker Final
I Phone Summit Dmeeker Final
 
Digital Jacknife Aja Xevangerber
Digital Jacknife Aja XevangerberDigital Jacknife Aja Xevangerber
Digital Jacknife Aja Xevangerber
 
Ilog Ria2
Ilog Ria2Ilog Ria2
Ilog Ria2
 

Recently uploaded

Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
"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
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate AgentsRyan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate AgentsRyan Mahoney
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
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
 
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
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 

Recently uploaded (20)

Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
"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
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate AgentsRyan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
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!
 
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
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 

Server Side Javascript

  • 1. Server-Side JavaScript with Project Phobos Roberto Chinnici Senior Staff Engineer Sun Microsystems, Inc. http://phobos.dev.java.net
  • 2. JavaScript is a real language 2
  • 3. Small, terse language Closures Functional style OK Prototype-based object model Object literals Creative DSL uses 3
  • 4. JavaScript in the browser JSON on the wire + cross-tier JavaScript code JavaScript on the server JavaScript in the database 4
  • 6. What is Phobos? ● Lightweight web application framework ● Running on the Java™ platform ● All application logic is JavaScript ● Most of the framework itself is in JavaScript ● Deploy to any servlet container ● IDE support for ease of development 6
  • 7. Client Architecture JAVASCRIPT APPLICATION CODE JAVASCRIPT / AJAX LIBRARIES BROWSER 7
  • 8. Server Architecture JAVASCRIPT APPLICATION CODE JAVASCRIPT / PHOBOS AJAX JAVASCRIPT LIBRARIES LIBRARIES MOZILLA RHINO JAVA™ LIBRARIES RDBMS PHOBOS RUNTIME JAVA™ PLATFORM 8
  • 9. Core Phobos Functionality ● URL mapping/dispatching ● Request/session/application contexts ● Asynchronous script execution ● Container independence ● Full-featured debugger ● JSR-223 scripting engine integration 9
  • 10. Development Process 1. Start NetBeans 2. Create skeleton application using wizard 3. Run it in debug mode 4. Map out the URLs for pages, services, Ajax 5. Attach logic to them 6. Test out interactively 7. Go back to step 4, repeat 8. Stop the application, you're done 10
  • 11. Tool Support ● Phobos ships as NetBeans plugins ● Project and component wizards ● jMaki widget palette ● Multithreaded debugger – Breakpoints, inspectors, watches, ... ● Server runs embedded in the IDE 11
  • 12. URL Design ● Plain scripts /doSomething.js ● Controller/action /store/display_cart ● Resource /book/isbn/1234-5678 ● User-defined any regexp 12
  • 13. Defining New Patterns ● Add new rules at startup or on the fly application.mapping.rules.push({ url: ”/feed/@id”, factory: quot;module.atom.createFeedResourcequot;, fn: quot;library.mapping.maybeRESTquot; }); Named functions in yellow 13
  • 14. Application Layout /application /static /controller /resources test.js ...jMaki... /dynamic /css sample.ejsp main.css /module faq.html application.js release_notes.html /script index.js /environment /template development.js /view startup-webapp.js test.ejs 14
  • 15. Plain Scripts ● Servlet-like ● request/response objects bound in context response.status = 200; response.contentType = “text/html”; var writer = response.writer; writer.println(“<html><head>....</body></html>”); writer.flush(); /sample.js /application/script/sample.js 15
  • 16. Controllers ● JavaScript “classes” with “methods” // package library.common.define(controller, quot;mainquot;, function() { function Main() { } // class Main.prototype.show = function() { // method library.view.render(“show.ejs”); } this.Main = Main; // export }); /@controller/@action /main/show 16
  • 17. Using JavaScript Libraries ● No special treatment for built-in libraries ● Dojo 0.9, Prototype, YUI all usable ● Load them in a controller (or using an event handler) library.dojo.load(“/application/dojo0.9”); library.scripting.run(“prototype.js”); ● Be careful in modifying Object.prototype and friends in the presence of pooling ● Other globals OK 17
  • 18. Scripting Engine Integration ● Optional compilation to bytecode ● Compiled scripts are cached ● Engines are pooled ● Works with any JSR-223 engine ● JavaScript engine hooked to debugger API 18
  • 19. Using Java Libraries ● Complete interoperability – Call into any Java libraries – Implement any Java interfaces – Subclass any Java classes ● Phobos can coexist with regular servlets and any Java web framework ● Tap into any Java libraries you need 19
  • 20. Mozilla Rhino + Extensions ● Dynamic objects via JSAdapter ● E4X ● property get/set with Rhino 1.6R6 ● Lots of constructs become possible: – autoloaded modules – builders – multiple inheritance – missing_method / doesNotUnderstand: 20
  • 21. E4X ● ECMA 357 ● XML support at the language level – literals, namespaces, interpolation ● XPath like syntax doc..*::customer.@name ● for each construct ● Powerful, not entirely intuitive 21
  • 22. E4X - Examples // HTML var doc = <html/>; doc.head.title = “Hello, world!”; doc.body.@bgcolor = “#224466”; doc.body.p = “What's up, doc?”; // ATOM var nsATOM = new Namespace(quot;atomquot;, quot;http://www.w3.org/2005/Atomquot;); default xml namespace = nsATOM; var doc = <entry><title>{args.title}</title><summary>{args.summary} /summary></entry>; 22
  • 23. Views / Templating with EJS ● PHP / ASP / RHTML-like syntax <html> <head> <title><%= model.title %></title> </head> <body> <% generateBody() %> </body> </html> 23
  • 24. Response Post-Processing ● Capture rendered page ● HTML parsed to DOM via TagLib ● Post-processing stage is similar to the browser model – scripts traverse/modify the document object ● Unified programming model 24
  • 25. jMaki ● Lightweight JavaScript framework ● Spans multiple widget libraries ● Unified interface to widgets ● Event-based component “glueing” ● CSS-based layouts ● Server-agnostic: JSP, JSF, Phobos, PHP 25
  • 26. jMaki Support in Phobos ● Built-in library.jmaki ● Configured with JSON ● Use common resource layout ● Widget palette in NetBeans ● Small footprint – Widget libraries added on first use 26
  • 27. REST Support ● Not controller-based ● Resources are classes ● Methods are HTTP methods ● Code deals with HTTP entities ● Framework takes care of HTTP details .e.g. ETags, conditional operations, etc. ● Sample AtomPub server 27
  • 28. Asynchronous Tasks ● Multithreaded runtime ● Schedule scripts for execution in the background ● Pass arguments in JSON format ● library.lang.invokeAsync calls a named function in a new thread ● Currently prototyping an Actor library ● Alternative: XMLHttpRequest-like object 28
  • 29. Persistence Options ● Java solutions more mature – JavaScript wrapper for Java Persistence – Native JavaScript DB API on top of JDBC ● Pure JavaScript solutions being developed – ActiveRecord port to JavaScript – Port of low-level Gears API – Port of GearsORM** 29
  • 30. “Soft” Scripting Engines ● Non-embedded DSL facility ● Translate to favorite target language ● Plug new languages ● Implemented by one JavaScript function ● Inherit debugging support from lower layer ● Example: Narrative JavaScript (.njs files) 30
  • 31. Narrative JavaScript ● New “yield” operator (->) for async calls ● Implemented as a preprocessor ● Separate browser/server runtime ● End goals: – Painless asynchronous processing – Continuation-like behavior without the cost 31
  • 32. IDE in the Browser ● Ongoing work ● Started with the “system apps” concept ● In-browser debugger prototype ● Running in the same space as the debuggee ● Some careful separation is in order... 32
  • 33. Demo 33
  • 34. GlassFish V3 ● Next-generation application server ● Open source, open development process ● Small footpring, fast startup ● Modular, extensible ● Ideal container for scripting applications 34
  • 35. Conclusions ● JavaScript is a real language ● Dynamic characteristics valuable on the server too ● Implementations getting more sophisticated every day ● Great integration with Java libraries and frameworks ● The question is: why not? 35
  • 36. Server-Side JavaScript with Project Phobos Roberto Chinnici roberto.chinnici@sun.com http://phobos.dev.java.net 36