Difference between revisions of "Modjs"

From Fernseher
Jump to navigationJump to search
Line 11: Line 11:
Things we should have:
Things we should have:
*Class for MIME objects and MIME headers.
*Class for MIME objects and MIME headers.
*Object with server info (environment, log functionality) [[server API]]
*Object with server info (environment, log functionality)
*Object with request info (request string (full and broken up), incoming mime object, maybe cookies already broken up, etc.) [[request API]]
*Object with request info (request string (full and broken up), incoming mime object, maybe cookies already broken up, etc.)
*Object with response info (outgoing mime object, print functionality, obstack stuff, way to set headers, etc) [[response API]]
*Object with response info (outgoing mime object, print functionality, obstack stuff, way to set headers, etc)
*File class extensions, if needed [[File API]]
*File class extensions, if needed
*Better include support (add to File)
*Better include support (add to File)
*MySQL/SQLite classes and support (new classes probably needed here)
*MySQL/SQLite classes and support (new classes probably needed here)
Line 22: Line 22:
*curl support (new class probably, using MIME stuff to send and receive, probably wrapped by request/response like objects.. maybe they should be classes, too.)
*curl support (new class probably, using MIME stuff to send and receive, probably wrapped by request/response like objects.. maybe they should be classes, too.)
*Instead of bothering with curl, maybe just have a way to open a socket and read/write to it for now.
*Instead of bothering with curl, maybe just have a way to open a socket and read/write to it for now.
*Classes: [[HTTPRequest API]], [[HTTPResponse API]], [[MailMessage API]], [[HTTPMessage API]], [[MimeEntity API]], [[MimeHeader API]]
 
*Classes: [[Socket API]], [[DbConnection API]], [[DbStatement API]]
JS Class APIs:
*File (see [[File API]])
*server object (see [[server API]])
*[[TCPConnection]]
*[[TCPConnection]]
*[[DbConnection]]
*[[DbConnection]]
*DbStatement (see [[DbStatement]])
*[[ProcessConnection]]
*[[ProcessConnection]]
*[[MimeHeader]]
*[[MimeEntity]]
*[[MailMessage]]
*[[HTTPRequest]]
*[[HTTPResponse]]
*global object (see [[global object extensions]])


Things the module should do if it can:
Things the module should do if it can:

Revision as of 16:41, 21 January 2009

modjs.org has the rudiments of an apache module to handle server side javascript using SpiderMonkey.

SpiderMonkey APIs and a tutorial. Apache Module APIs and a tutorial.

Would like MIME support, a global request/response object (both MIME trees I think), SQLite and MySQL support, and File IO Support (if its not already there). Also should have support for including other javascript sources. mod_js has an example for includes and some of the request/apache stuff. SpiderMonkey has an example shell that shows some support for File objects I think.

Would be nice to have libGD and/or ImageMagick support (EXIF too, if possible), as well as some sort of curl library to get to other sites to do stuff.


Things we should have:

  • Class for MIME objects and MIME headers.
  • Object with server info (environment, log functionality)
  • Object with request info (request string (full and broken up), incoming mime object, maybe cookies already broken up, etc.)
  • Object with response info (outgoing mime object, print functionality, obstack stuff, way to set headers, etc)
  • File class extensions, if needed
  • Better include support (add to File)
  • MySQL/SQLite classes and support (new classes probably needed here)
  • system call support (put this on server)
  • image manipulation support (new classes probably needed here)
  • json support (maybe just some quick functions on the response (encode) /request (decode) ? or maybe better as a global)
  • curl support (new class probably, using MIME stuff to send and receive, probably wrapped by request/response like objects.. maybe they should be classes, too.)
  • Instead of bothering with curl, maybe just have a way to open a socket and read/write to it for now.

JS Class APIs:


Things the module should do if it can:

  • Cache compiled javascript code?
  • Stay alive? Might already do this...
  • Cached javascript context? Would this make sense?
  • Cached session stuff? Do I really want/need this?