Hi Glenn,

Thanks for the excellent feedback. I will integrate your statements and my
responses into the document. :-)

on 3/3/01 7:15 AM, "Glenn Nielsen" <[EMAIL PROTECTED]> wrote:

> Jon,
> 
> That is an interesting read.  I have a few comments.
> 
> 1. You did not address the issue of web publishing tool support for
> JSP and JSP taglibs.
> 
> Your argument concerning the amount of typing it takes to accomplish
> the same task only has merit if someone is editing an application directly.
> 
> A web publishing tool would hide the scripting language from the user,
> how wordy the scripting language is wouldn't matter then.

<http://jakarta.apache.org/velocity/ymtd/ymtd-javabeans.html>

"Above, we have a very simple example of using a bean in a page. Pass it
some properties and then retrieve the results. This is the right way to do
things when using JSP. However, if we look at an example of doing the same
exact thing in Velocity, the extra amount of needless typing that one needs
to perform to simply retrieve a property seems a just bit absurd. Of course
there are always GUI based drag and drop tools to make typing a thing of the
past. Really."

My point here (and I will expand more in the essay) is that the drag/drop
tools are not only commercial (and fairly expensive) products, but the
history of these type of products is strongly biased towards only being
partial solutions. As soon as you need something more complex than the
product offers, they tend to fall down and you are back to hand editing the
pages.

> 2. Syntax of JSP taglibs vs Velocity
> 
> JSP taglib syntax is similar to that of HTML, this syntax will be easier
> for non programmers to pick up.
> 
> Velocity syntax is more like programming, great for programmers, perhaps
> not so easy for web publishers to use.

That is your opinion. Thank you.

I have seen (with my own two eyes) HTML designers pick up and use Velocity
without any problem. The WebMacro project has been around for ages and there
are TONS of reports on the mailing list of people being able to deal with
the syntax. This is really a moot point because, as I say in my essay, it
really comes down to preferences. Personally, I find Velocity's syntax much
easier to read (and write) than HTML'ish syntax. That is why I also give
several examples of this in the essay.

You make the decision.

> 3. Extending or adding new features
> 
> JSP 1.1 with taglibs allows web publishers to add new features and capabilites
> to their web application by installing a tag lib that implements what they
> want to do.  And there are more and more taglibs every day.  For example,
> the new Jakarta-taglibs scrape taglib.  Those taglibs can be imported into
> web publishing tools for easy incorporation into a web application.

Same with Velocity. In fact, with Velocity there is no need to define a
namespace at the top of the file before you need to use the tags nor write
Java code to expand it because you can use Velocimacro's. You can also
define your own #directives that are backed by Java code as well.

You are also missing the point that *any* Object can be placed into the
Context. By doing this, you are developing a more Pull oriented application.
My argument is that this is a more strictly MVC design and therefore is a
better design.

> 4. Velocity has its place along with other technologies such as Cocoon,
> Web Macro, etc. as a tool to use for developing web applications. JSP
> with taglibs also has its place.  From my perspective, where we support
> 100's of virtual hosted sites and over a thousand web publishers (most of
> whom think HTML is programming), JSP with taglibs is the best solution.
> For internal applications we develop we will choose what we think is the
> best tool.

How do you know if you haven't tried it? :-)

In fact, I assert that Velocity is safer to use in that type of an
application (ie: hosted) because it is impossible to do things in the
templates like spawn new threads (of course which can be controlled by Java
Security) and create a tight infinite while loop that could potentially take
down the entire server as a DoS attack (which can't be controlled with JSP).

while (true)
{
    Hashtable strings = new Hashtable();
    while (true)
    {
        strings.put ("dead", new StringBuffer(9999999));
    }
}

-jon

-- 
If you come from a Perl or PHP background, JSP is a way to take
your pain to new levels. --Anonymous
<http://jakarta.apache.org/velocity/> && <http://java.apache.org/turbine/>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to