savannah-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Savannah-hackers] submission of Server Side JavaScript Servlets - s


From: Elfyn McBratney
Subject: Re: [Savannah-hackers] submission of Server Side JavaScript Servlets - savannah.gnu.org
Date: Wed, 8 Sep 2004 00:05:54 +0100
User-agent: Mutt/1.5.6i

Hi,

I'm evaluating the project you submitted for approval in Savannah.

On Tue, Sep 07, 2004 at 07:43:57AM -0400, address@hidden wrote:
> A package was submitted to savannah.gnu.org
> This mail was sent to address@hidden, address@hidden
> 
> 
> Andrew Madigan <address@hidden> described the package as follows:
> License: gpl
> Other License: 
> Package: Server Side JavaScript Servlets
> System name: ssjs
> Type: GNU

Your project is not part of the GNU project, so we cannot accept its current 
type.
We want to maintain the distinction between 'GNU' and 'non-GNU' projects. If 
your
project is approved for inclusion into Savannah, we will set its type to 
'non-GNU'.

If your project is accepted into the GNU project you may change its type.  You 
can
do this by asking us.

> Description:
> This project involves a way of creating servlets in JavaScript rather than 
> Java.
> I got the idea to do this because of two reasons:
> 1. Neither JSP nor Servlets have any good method for separation of concerns.
> 2. Development time for JSP and Serlvets is slow because both most be 
> compiled to
> class files first, and the java compiler is to slow for this to be acceptable 
> on
> a web server.
> 
> My first solution to this was to allow for XSLT in a servlet, I did this by
> creating an abstract servlet that would perform the transform for the servlet 
> that
> extended it. This meant that changes to the design, or any 
> database-independent
> content could happen very quickly. This solved problem 1, but wasn't a perfect
> solution to problem 2. Note that this also still allows for HTML data to be 
> sent,
> or even binary data.
> 
> I then discovered the Mozilla Rhino project (http://www.mozilla.org/rhino), I 
> made
> some modifications to the XSLT setup (which also improved speed) and created a
> (concrete) servlet that performed a multi-step process to use javascript to 
> generate
> XML.
> 
> 1. A request comes in for a file, the servlet is generally mapped to *.ssjs
> (Server-Side JavaScript), the file might be called index.ssjs.
> 2. index.ssjs is actually an XML file, containing instructions for the servlet
> telling it which XSLT stylesheets to use, and which script to execute.
> 3. The script must contain a getContentType() method, which specifies which 
> (of
> several previously specified stylesheets) the servlet is to use, the method is
> passed the request object for this purpose.
> 4. doGet or doPost is called in the script, note that three parameters are 
> passed:
> request,response, and the writer to write to (if the content type sepecified 
> matches
> no stylesheet, this is request.getWriter(), otherwise it's a PipedWriter). 
> This
> function is expected to generate XML.
> 5. While the XML is being generated, a DOM is built, this DOM is transformed 
> to the
> output.
> 
> This solved problem 2 because Rhino, while still creating classes, executes 
> faster
> than any java compiler could even dream of. This also had the added benefit 
> that
> many web developers know at least some JavaScript.
> 
> Two enhancements are planned: 
> 1. A nicer binding to the servlet api, currently it relies on Rhino's ability 
> to work
> with Java Classes. I plan to make the interface more JavaScript-like. (e.g.
> request.parameters["key"] should return the value of that parameter. 
> 2. JSD (named to avoid confusion w/ JSP) meaning JavaScript documents. This 
> would allow
> the use of pseudo-tags in XML to create the XML. This would add a step of 
> translation
> to JavaScript before it could be executed. This wouldn't be intended to act 
> like JSP,
> but it would allow for a great amount of developer control. I already have 
> simple parser
> for parsing pseudo tags and sending them to handler, I also have a handler for
> translation to JavaScript. The parser follows the general idea of SAX.
> 
> I will be posting the source code as it stands at 
> www.geocities.com/andymadigan
> momentarily (probably before you see this.) Note that the sources do not yet 
> have GPL
> notices on them. They will be put in later.   
> 
> Note: I have already tested this project because I actually used for a 
> sumemer job (no
> dev of this code was on the company's payroll, I wrote it because when I 
> wrote a demo
> for the proposal, it took so long I decided I needed a better way of doing 
> it. I had
> already been thinking about it, this just got me going.)

Please reply and include an (temporary) URL pointing to the source code.  The 
description
you gave when registering will not be read by the general public. If you are 
still
concerned with privacy, however, you can forward the code to me by email (to
address@hidden).

We wish to review your source code, even if it is not functional, to catch 
potential legal
issues early.  

For example, to release your program properly under the GPL you must include a 
copyright
notice and permission-to-copy statements at the beginning of every file of 
source code.
This is explained in http://www.gnu.org/licenses/gpl-howto.html.  Our review 
would help
catch potential omissions such as these.

> Other Software Required:
> This is a java project. The dependencies are as follows: 
> -Mozilla Rhino (NPL/GPL)
> -JAXP (aelfred is used, so this must be GNU JAXP, see note below)
> -A Servlet Container (I am currently trying to make it work in paperclips, it 
> works
> perfectly in tomcat) Tomcat is Apache though, so I obviously want this to 
> work with a
> GPL'd container.
> -Everything listed above is available in SableVM, and can also be compiled 
> using GCJ.
> 
> Note that while one goal of this project is to ame it work perfectly on a 
> Free OS, I
> also don't want to make a java project that can't work in a non-free OS, or 
> that might
> be hard to make GPL. Since I can't seem to get GNU JAXP's XSLT support to 
> work under
> windows, future versions may use James Clark's XT (I am beginning changes 
> now, I have
> already tested (and modified) XT for this purpose) at least until GNU JAXP is 
> truly
> cross-platform. XT is under the MIT license.

If you are willing to make the changes mentioned above, please provide
us with an URL to an updated tarball of your project.  Upon review, we
will reconsider your project for inclusion in Savannah.

Regards,

-- 
Elfyn McBratney
beu on irc.freenode.net/savannah.[non]gnu.org

PGP Key ID: 0x456548B4
PGP Key Fingerprint:
  29D5 91BB 8748 7CC9 650F 31FE 6888 0C2A 4565 48B4

Attachment: pgpCjkfN48Qak.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]