On Fri, 15 Mar 2002, Steve Willer wrote:

>
> On Fri, 15 Mar 2002, Fisher, James wrote:
>
> > So am I.  It seems as though we are trying to code in XML.  I don't know
> > about you but I don't want to write code in XML.  I would much prefer to
> > write perl modules along with CGI/Apache::ASP/HTML::Mason to generate the
> > XML that is then passed to AxKit.
>
> Using HTML::Mason or whatever is at least conceivable, but really when it
> comes down to the difficulty of writing code in XSP my simple answer is:
> Don't do that.
>
> I look at XSP as an implementation of the high-level "business logic" or
> "page flow" associated with your site. The core libraries do all the heavy
> lifting and have little knowledge of XML or even Web, and the XSL files
> of course have presentation and content.
>
> Here's an example XSP file from some of my own code:
>
> <?xml version="1.0"?>
> <xsp:page
>     xmlns:xsp="http://www.apache.org/1999/XSP/Core";
>     xmlns:f="res:perl/VR/Kernel/FirstTime"
>     xmlns:p="res:perl/VR/Kernel/Package"
>     language="perl"
> >
> <response>
>     <f:bootstrap-database/>
>     <!--
>         We install the kernel's package.xml file now because it has
>         to run during the request's cleanup process. So we need to get
>         everything prepared in time for the actual parameter reading.
>     -->
>     <p:save-temp-package-from-temp-file install-from-kernel="1"/>
> </response>
> </xsp:page>
>
>
> This file generates not one, but two databases on two different servers,
> then bootstraps a few core tables into those databases, then loads up an
> XML-based package description file into the database.
>
> How does it do all this? Who cares! There could be 200 or more lines of
> code hidden in those calls, with complicated logic and whatnot. This is
> the beauty of XSP and taglibs: The taglibs do all the freaky complex
> stuff, with no knowledge that they're in a web environment, and the XSP
> files just describe what an individual page should do.

Seems to me like we need to add a task to the TODO list - an XSP "Best
Practices" document, that covers this sort of thing.

I consider the taglibs on CPAN (and thus the ones we're using in the demo
site) excellent for quickly hacking together single purpose throwaway
scripts, but not useful for large applications. That is, in my opinion,
why TaglibHelper and SimpleTaglibHelper kick ass, and make AxKit's XSP
much better than Cocoon's (even though they're ultimately the same beast).

-- 
<!-- Matt -->
<:->Get a smart net</:->


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

Reply via email to