On Wed, 3 Jul 2002, John Yu wrote:

> Date: Wed, 03 Jul 2002 10:43:01 +0800
> From: John Yu <[EMAIL PROTECTED]>
> Reply-To: Struts Developers List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: [OFF-TOPIC] JSP 2.0 and Tiles
>
> I spent some time skimming through the JSP 2.0 draft spec. (Close to 400
> pages! It makes my head spin... I may not know what I'm talking about.)
>
> It seems to me the new "Simple Tag Extension + Jsp Fragment" is Tiles on
> steroid. Is my impression close enough to the reality? Or I'm completely off?
>

Well, sort of, I guess.

> Besides, the spec says the major version upgrade implies a shift in
> programming mode. It's over my head. What paradigm is it?
>

JSP 2.0 breaks several old assumptions about how JSPs can be used.  My
favorite ones:

* "I need scriptlets" - The advent of the expression language, which is
  available in your template text, eliminates the last few cases where
  anyone can legitimately claim this.  As a matter of fact, JSP 2.0 lets
  you declare that scriptlets are not allowed -- among other things, this
  is going to let containers be *much* smarter/faster about the code
  they generate for a page (for example, you can go directly to bytecode
  without having to create Java source and compile it).

* "You have to be a Java deveper to create custom tags" - JSP Fragments
  let a page author do this themselves.  There's no more excuse not
  to create reusable chunks of your user interface.

* "Custom tags in Java are hard to write" - The new SimpleTag interface
  is about as simple as it can get to create dynamic behavior.

* "Custom tags only take a fixed set of attributes" - the new facilities
  let you write polymorphic custom tags using <jsp:attribute> to define
  names and values, somewhat like what <set-property> lets you do in
  struts-config.xml files.  This works for custom tags created from
  JSP fragments or from Java code using the new invocation protocol.

* "I need to use some sort of templating to incorporate standard
  header of footer text on all my pages" - The new "include-prelude"
  and "include-coda" configuration properties let you declare this
  (for all pages that match a particular URL pattern) external to the
  pages themselves.



> --
> John Yu                       Scioworks Technologies

Craig


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

Reply via email to