struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Hill" <andrew.david.h...@gridnode.com>
Subject RE: My View Is Messy
Date Wed, 18 Jun 2003 13:37:02 GMT
<snip>
(serializing to XML just to reserialize to HTML seems like an unnecessary
performance hit)
</snip>

Yeh, Id imagine it can get pretty expensive when the server is under heavy
load.

I wouldnt want to do that for amazon.com type sites ... although actually
for xslt, I think the modern browsers can understand it, so you could just
write the xml to the response from jsp and whatever it is you need to do
tell the browser where to pull the stylesheet and let it do the grunt
work... havent tried it myself though. Have you looked at the stxx extension
yet?

Really though I reckon what you want to look at is the tiles extension, and
for smaller 'fiddly bits' that reoccur a lot banging together your own jsp
tags.

oh yeah! - The other thing you should look at (first!) is JSTL and/or the
struts-el tags as I believe they support a somewhat more concise (and
certainly less ugly) syntax for what your doing in that example.

-----Original Message-----
From: Aaron Longwell [mailto:listservs@newmedialogic.com]
Sent: Wednesday, 18 June 2003 21:27
To: Struts-User
Subject: My View Is Messy


Morning everyone,

I have been working on an event manager application in Struts for about
3 days. I'm just getting to the point of displaying a monthly calendar
full of events. I finished up the JSP last night, and it's a mess.
First, there's a lot of code in it. For example, to print out the event
time, name, and description looks like this:

<dt:format date="<%= event.getStartDate() %>" pattern="hh:mma"/> -
<dt:format date="<%= event.getEndDate() %>" pattern="hh:mma"/> :
<bean:write name="event" property="title"/><br/>
<bean:write name="event" property="description"/>

All that code just to print this:

4:00pm - 5:00pm : Watch TV<br/>
Watch TV event description

Cold Fusion salespeople always tout the fact that Cold Fusion is
"tag-based." I've always thought markup tags for dynamic content took up
way too much space in the HTML.... I don't like Cold Fusion. My view is
starting to look like Cold Fusion.

I've looking for some recommendations for better view frameworks. Do you
use Velocity? Do you use an implementation of XSLT? How do these affect
application performance (serializing to XML just to reserialize to HTML
seems like an unnecessary performance hit)? How do they affect
development time (all of them seem to require extra effort to develop
(i.e. compiling a new servlet for each view, etc)?

Thanks for the recommendations,
Aaron


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message