jon * wrote:
> Paul Philion (I think) wrote:
> > I ask simply because I--personally--would use template engines and try
> > to seperate my HTML from my servlet as much as possible (keep my
> > servlets as simply the bridge between presentation [HTML] and the
> > business logic).
>
> There is no reason why this can't be done using a framework that loads the
> "parts" of a page via Class.forName().
>
> For example, you can have a class which defines a Template. This template
> loads other parts of the page (ie: the top navigation, the bottom navigation
> and the body of the page) (via Class.forName()) depending on data sent to
> your servlet in the request.
[Note: I've got to make assumptions here. Please excuse any
misunderstandings.]
Based on this, it would seem to me that I would a classes for
PageHeader, PageFooter, AccountSummaryBody and
AccountDetailBody. But if I have a requirement to make my "gold account"
pages look different from my normal accounts, then it seems that I would
have to write GoldPageHeader, GoldPageFooter, etc.
Rather, I would choose to use a system that would allow me to have both
an acctSummaryPg_gold.html and acctSummaryPg_std.html. Each template
contains the same basic references back to the business logic (get list
of accounts, for each account display name, balance and link to a
details page, display customer name in header, etc.) My goal is that the
"dynamic markup" on the templates should be simple enough for normal
HTML/designer types (and not developers) to maintain them. Then the
development staff can focus on making the system fast, robust and
scalable; and the creative/design staff can focus on those endless HTML
tweaks to make the customer happy.
>From my point of view (and this is speaking from direct experience),
HTML changes are responsible for most of the churn on the web apps I've
developed. I want to make sure that I can tweak the look of a page
without recompiling any code. Just my two cents.
> I will have a framework that implements these ideas available soon. There is
> almost a complete separation of HTML code from "logic" code.
Sounds interesting. Is it safe to assume you'll announce it here?
- Paul Philion
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html