You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by js...@apache.org on 2002/05/31 12:48:29 UTC

cvs commit: jakarta-commons-sandbox/jelly/xdocs todo.xml overview.xml index.xml

jstrachan    2002/05/31 03:48:29

  Modified:    jelly/xdocs todo.xml overview.xml index.xml
  Log:
  Updated the documentation to describe more precisely how Jelly relates to Ant, how its different but not a competitor and the two can work very nicely together.
  
  Revision  Changes    Path
  1.4       +3 -1      jakarta-commons-sandbox/jelly/xdocs/todo.xml
  
  Index: todo.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/xdocs/todo.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- todo.xml	30 May 2002 18:23:59 -0000	1.3
  +++ todo.xml	31 May 2002 10:48:29 -0000	1.4
  @@ -20,8 +20,10 @@
           <li>autogenerate tag library documentation, in a kinda javadoc style, showing all tag libraries, 
   			their tags and descriptions of their tags</li>
           <li>Develop a http tag library, probably based on commons-httpclient, that can be used for scripting web services</li>
  -        <li>Patch TagLibrary to alias all &lt;mixedCase&gt; tags to &lt;mixed-case&gt;  tags</li>
   		<li>Add tags &lt;copy&gt; &lt;copyOf&gt; &lt;element&gt; &lt;attribute&gt; to JSL </li>
  +        <li>An XML validating tag library using MSV to validate XML against DTDs, RelaxNG, XML Schema etc</li>
  +        <li>Implement a Schematron tag library for validing XML using a path based approach, rather than schema based.</li>
  +        <li>Patch TagLibrary to alias all &lt;mixedCase&gt; tags to &lt;mixed-case&gt;  tags</li>
   		<li>Add JSL test cases to test for ordering of patterns and that the correct output comes out.</li>
   		<li>Rename the DynaTag interface to be DynamicAttributes along with JSP1.3, 
   			also add a namespace URI parameter
  
  
  
  1.4       +59 -6     jakarta-commons-sandbox/jelly/xdocs/overview.xml
  
  Index: overview.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/xdocs/overview.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- overview.xml	30 May 2002 19:22:36 -0000	1.3
  +++ overview.xml	31 May 2002 10:48:29 -0000	1.4
  @@ -20,7 +20,7 @@
       public void setCount(int count) {
           this.count = count;
       }
  -    public void run(XMLOutput output) throws Exception {
  +    public void doTag(XMLOutput output) throws Exception {
           for ( int i = 0; i &lt; count; i++ ) {
               // evaluate body
               getBody().run( context, output );
  @@ -66,7 +66,7 @@
   engine that could be extended to support various custom actions. A fully 
   qualified XML element name can be mapped to a Java Bean (or DynaBean), the 
   attributes map to bean properties, once the bean is constructed and the 
  -properties set it is executed via the Tag interfaces run() method. So custom 
  +properties set it is executed via the Tag interfaces doTag() method. So custom 
   actions can perform all kinds of processing from lower level looping, 
   conditional logic and expression evaluations to higher level actions like post 
   processing their bodies, making 
  @@ -99,7 +99,7 @@
     IterationTag) to implement based on the kind of tag you are writing, together 
     with a fairly complex set of event-based methods that are called by the page 
     container. Jelly tags are very easy - just derive from TagSupport and 
  -  implement the run() method. Really simple!</li>
  +  implement the doTag() method. Really simple!</li>
     <li>Jelly is XML native both as the format of the scripts and the output 
     format, so its ideal for work with XML and XML based applications and web 
     services</li>
  @@ -137,16 +137,69 @@
   </ul>
   
   </section>
  +
  +
  +<section name="Jelly versus Ant">
  +
  +<p>
  +Ant is a truly awesome build system which has always resisted 'scripting'. 
  +Jelly has never tried to be a build system but instead has just focussed on 'scripting'.
  +However Jelly is alot like Ant in many ways. 
  +</p>
  +<p>
  +The two can work hand in hand together very nicely. 
  +Jelly could be thought of as a scripting plugin for Ant. 
  +Jelly can be called from inside Ant as an Ant Task, then the Jelly script can script other Ant tasks,
  +access Ant properties and using all other Jelly tags such as for logic, looping, working with beans, XPath, SQL etc.
  +</p>
  +
  +<p>Similarities</p>
  +<ul>
  +  <li>Both use an XML format for the script with an expression language like ${foo.bar}</li>
  +  <li>XML elements are mapped to a Java object, so its easy to extend both Ant and Jelly with simple Java code.</li>
  +</ul>
  +
  +<p>Differences</p>
  +<ul>
  +  <li>Jelly has full support for pluggable expression languages. The default expression language is a superset of the one
  +  	used in JSP, JSTL and JSF which supports conditional expresssions, navigating bean properties, 
  +  	and working with Maps, Collections, Lists, arrays etc. 
  +  	Jexl is the current implementation which adds some Velocity-like enhancements like method calls on beans etc.
  +  	Jelly supports other expression and scripting languages like Velocity, beanshell, JavaScript, Jython, pnuts, BSF etc in seperate tag libraries
  +  </li>
  +  <li>Jelly has native XML support. Jelly can parse XML and process it using XPath expresssions (via the JSTL tags). 
  +  	Also Jelly supports a declarative model of processing XML (via the JSL tags) which is simillar to XSLT 
  +  	but can use Jelly tags, beans and Ant tasks inside the XML template in a similar way to DVSL.</li>
  +  <li>
  +  	Jelly has a much more powerful collaboration mechanism for passing information between tags/tasks. 
  +  	In Jelly variables can be any object plus variable scopes can be nested to allow nested scripts to work together neatly.
  +  	A tag/task can be customized with beans as well as being able to consume, emit, filter and transform XML.
  +  	So Jelly tags can be configured from and can collaborate with beans and XML.
  +  </li>
  +  <li>Jelly supports dynamic tags. Tags can be defined in Jelly script to avoid repetitive typing 
  +	such as to wrap up most of the complexity of making a SOAP call. So Jelly has an integrated tag based macro facility.
  +  </li>
  +  <li>
  +  	Jelly uses XML namespaces to allow lots of different tag libraries to work together seamlessly in the same 
  +  	XML document. This means you can mix and match Ant tasks with JSTL and Jelly tag libraries. 
  +  	All can use their own expression languages, so one script could mix and match the expression languages 
  +  	from Ant and JSTL as well as XPath and Jython.
  +  </li>
  +  <li>There is a clear difference of emphasis. Ant is a build system, Jelly is a scripting engine.
  +  </li>
  +</ul>
  +
  +</section>
   </section>
   
   <section name="Possible uses for Jelly">
   
   <p>Jelly has various possible uses. Here's a few to think about</p>
   <ul>
  -  <li>SOAP scripting engine</li>
  -  <li>HTTP and/or JMS based scripting and unit testing framework similar to Latka and AntEater</li>
  +  <li>An additional tool for Ant users to provide Ant scripting</li>
  +  <li>SOAP scripting or XML processing engine</li>
  +  <li>HTTP and JMS based scripting and unit testing framework similar to Latka and AntEater</li>
     <li>XML or page templating system</li>
  -  <li>Ant scripting</li>
     <li>Alternative (very lightweight) implementation of JSTL that can be run from 
     Ant to generate static content</li>
     <li>A workflow, EAI or integration, maybe integrated into commons-workflow</li>
  
  
  
  1.6       +3 -3      jakarta-commons-sandbox/jelly/xdocs/index.xml
  
  Index: index.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/xdocs/index.xml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- index.xml	30 May 2002 18:23:59 -0000	1.5
  +++ index.xml	31 May 2002 10:48:29 -0000	1.6
  @@ -72,13 +72,13 @@
   <p>
   There is a JellyTask for calling Jelly from 
   <a href="http://jakarta.apache.org/ant/">Ant</a> 
  -as well as a Jelly tag library for  calling Ant Tasks from inside a Jelly script!
  +as well as a Jelly tag library for using any Ant Tasks inside a Jelly script!
   Jelly's support for the Expresssion Language in JSTL, which looks very like Ant's 
  -own expresssion language, means that Ant properties can be used inside Jelly scripts seamlessly.
  +own expresssion language (but much more poweful), means that Ant properties can be used inside Jelly scripts seamlessly.
   </p>
   
   <p>
  -So Jelly can be a scripting engine for Ant tasks which can be easily integrated into your Ant build. 
  +So Jelly can be thought of as a scripting engine plugin for Ant tasks which can be easily integrated into your Ant build.
   </p>
   </section>
   
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>