I want to second this sentiment. We looked at JSP, Cocoon, Struts, and all
of the other so-called "logic/presentation separation schemes". However,
every time I looked at the pages of those schemes I saw code embedded in
there. That did not look like separation to me.

So, we built a simple servlet that invokes lightweight command objects that
talk to session beans for the business logic. The command objects are selected
by the servlet's pathInfo, and they simply build an XML document that represents
the results of the business logic.

The XML is then handed to XSLT along with the XSL page for the command, and
HTML is sent to the client. The commands and pages are all specified by a
simple XML configuration document that the server reads at startup time.

The commands know nothing about the page. The pages know nothing about the
commands. I even have the option of sending the XML and XSL to the client's
browser and offloading the XSLT processing.

Also, I can easily hand a simple example XML document to a webpage designer,
and they can code the XSL without ever having to connect to the live system
to run the logic! This is a hueg win.

So far, this approach has worked well and feels far superior to JSP or its
ilk.

The most significant downside that I see is that XSLT support is scarce in
webpage development tools such as DreamWeaver and its kind. I expect this
to improve over time, but it is an important consideration. The only other
complaint I have is that XSL is not a pretty language.

tim.

> In my opinion the best template solution is one
> based on xsl and xml; with the best separation
> information, display. And is very easy to use if
> you know little xslt;
> 
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Robert S.
> Sfeir
> Sent: mardi 9 janvier 2001 23:46
> To: Orion-Interest
> Subject: Dynamic JSP in Orion
> 
> 
> Hello folks.
> 
> Still on the path of getting to know JSP and Orion, and was wondering how
> (hopefully without using cocoon) can I get to the point of serving dynamic
> JSP files.
> 
> What I'm tying to do is serve up templates which are stored in the DB.  The
> templates contain html which forms the look and feel of a site, and the
> different features available in a certain section of the site.
> 
> These Templates also return the content for the site, the content itself
> may or may not contain more dynamic data.
> 
> Ultimately those templates and content would contain some JSP code or XML
> code which gets changed based on the user, location, template, content, the
> content type etc...
> 
> I'm coming from a Cold Fusion / Tango environment, and I can see that
> things are a little different with JSP, and the rules change
> dramatically.  it's pretty easy to do this stuff in those environments.  It
> doesn't seem as obvious in JSP since the pages are pre compiled and any JSP
> code which might exists in the Templates or content will be ignored.  What
> I need to do is parse that code, or write something which will allow me to
> parse that code.
> 
> I don't mind so much putting in the coding time, but I am concerned about
> maintaining top serving speed, and still allow me the freedom of being as
> dynamic as my clients want to be.
> 
> So with that in mind, I was wondering if Orion had any internal facilities
> to support some kind of dynamic JSP pages.  If not what do you folks
> recommend to use for such applications?
> 
> Thanks much in advance, and sorry if this subject has already come up
> before.
> 
> 
> Robert S. Sfeir
> Director of Software Development
> PERCEPTICON corporation
> San Francisco, CA 94123
> w - http://www.percepticon.com/
> e- [EMAIL PROTECTED]
> t - (415) 749-2900 x205
> 
> 


Reply via email to