Brad Cox wrote:

> I've uploaded an early rough draft of a pair of articles that boils
> down to a critique of the JSP approach plus source code for a quite
> different approach. I'd be very interested in feedback... of the
> constructive variety, of course ;)
>
> The articles are at http://virtualschool.edu/wap
>

I didn't (and won't) have time to study the article in depth, but would make the
following observations:

* I don't see any reasoning for why HTML-in-Java is better
  than any of the alternatives -- just a presumptive conclusion.
  The vast majority of the article is simply a description of your
  recommended approach.

* The Multi-line Strings style will certainly appeal to PERL
  developers, but to me it is YATL (yet another template language)
  and does nothing to improve the expressive abilities or
  productivity of a page designer.

* Worse, this approach does other things:

    * Embeds presentation and business logic in one class,
      which is not a particularly scalable approach

    * Requires a Java developer to do your page development

    * Makes it difficult to leverage page authoring tools

* My personal preference for the presentation layer is JSP (and has
  been since long before I adopted a "sun.com" email address :-), for
  several reasons:

    * Separation of concerns - Mixing business logic and presentation
      logic in one file (no matter what the syntax) works OK for simple
      applications, but is not a particularly flexible long term approach.
      All of the alternatives you compare yourself to have learned (and
      implemented) this lesson.  Is there perhaps a message here that
      you are missing?

    * Custom tags - can be used to encapsulate sophisticated
      functionality in a variety of ways, including smarter generation
      of HTML to configuring application functionality).  See the
      Struts Framework project <http://jakarta.apache.org/struts>
      to get a feel for what's possible.  (And Struts/Turbine/Barracuda
      each offers an alternative approach to the organization of the
      business logic as well.)

    * Development tools - Watch what tools like Macromedia Ultradev
      do for page developers (*not* Java developers!!!) who want to
      author pages that use custom tags for dynamic pages.  I do
      not see a big future in hand coded HTML.

    * Alternative implementations - If Tomcat doesn't generate "good
      enough" or "fast enough" code for you (and it's pretty minimally
      acceptable at the moment), you've got choices of other vendors,
      with a reasonable shot at your pages being portable if you take
      care not to use platform-specific features.  If I like a template
      language, but don't like the one and only implementation, what
      can I do?  (NOTE:  Yes, Jon, I recognize that Velocity and
      WebMacro intend to implement common features -- "two" is
      better than "one" but still not as good as "many".)

    * Wide acceptance - Go onto monster.com etc. and see how many
      jobs want JSP experience nowdays.  If I have a project that is due
      next month, do I really want to have to take the time to train my
      developers on the details of the template approach being used?  And
      know that I'm going to have to do that *every* time I hire someone
      new from now on?

I'm not going to have time to get into any extended discussion on this, but it
was worth a cup of coffee to write down some quick thoughts.

> --
> ---
> Dr. Brad Cox; [EMAIL PROTECTED]

Craig McClanahan



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

Reply via email to