Server-Side JavaScript with jQuery and AOLserver - PowerPoint PPT Presentation

About This Presentation
Title:

Server-Side JavaScript with jQuery and AOLserver

Description:

dossy_at_panoptic.com. Why Use JavaScript on the Server. Leverage web developer's mandatory skill-set ... Increase code reuse on client and server. Lots of good ... – PowerPoint PPT presentation

Number of Views:146
Avg rating:3.0/5.0
Slides: 12
Provided by: dossysh
Learn more at: http://static.dossy.org
Category:

less

Transcript and Presenter's Notes

Title: Server-Side JavaScript with jQuery and AOLserver


1
Server-Side JavaScriptwith jQuery and AOLserver
  • jQueryCamp07October 27, 2007
  • Dossy Shiobaradossy_at_panoptic.com

2
Why Use JavaScript on the Server
  • Leverage web developers mandatory skill-set
  • HTML, JavaScript
  • Increase code reuse on client and server
  • Lots of good documentation and examples
  • Stable and mature implementations available

3
How to Use jQuery on the Server
  • JavaScript interpreter
  • SpiderMonkey (in C), Rhino (in Java)
  • John Resigs env.js
  • http//ejohn.org/blog/bringing-the-browser-to-the-
    server/
  • Integrate into web server request processor

4
Our Example
  • jQuery env.js
  • SpiderMonkey
  • AOLserver
  • Tcl
  • nsjsapi module
  • tDOM

5
How AOLserver integrates SpiderMonkey
  • nsjsapi module
  • Wraps SpiderMonkey with a js Tcl command
  • Exposes Tcl interp. as tcl JS function

nscp 1gt set js js create js0xad19ad8 nscp 2gt js
eval js "new Date(0)" Wed Dec 31 1969 190000
GMT-0500 (EST) nscp 3gt js eval js "tcl('info
patchlevel')" 8.4.12 nscp 4gt js destroy js
6
How nsjsapi Loads env.js and jQuery
  • nsjsapi.js provides JavaScript implementation of
    java., javax. and org.w3c.dom. APIs
  • Uses Tcls tDOM module for XML parsing
  • Calls back into AOLserver/Tcl using the JS tcl
    function

7
nsjsapi.js Code Snippet
8
Example
9
Challenges
  • nsjsapi module still very incomplete
  • No clear vision for or good examples of a
    server-side JavaScript web framework
  • Hard to debug lots of moving parts
  • AOLserver, nsjsapi, SpiderMonkey, nsjsapi.js,
    env.js, jQuery

10
TODO
  • Automated test suite
  • Simple web development framework
  • Better documentation, with examples
  • More evangelism

11
Questions?
Write a Comment
User Comments (0)
About PowerShow.com