[EMAIL PROTECTED] wrote:

On 24 Sep 2004 at 13:52, Also Sprach Kjetil Kjernsmo:

On fredag 24. september 2004, 11:20, [EMAIL PROTECTED] wrote:

The question is, should I stick with the cgi approach or use the
content provider class? Which offers more flexibility?
Any caveats/experiences appreciated.

I'd not think twice about writing a Provider.... :-) CGI is 1996-style technology, and I wouldn't be using it at all.


Hmm. Well I've looked into it a bit and the Provider method
seems a bit weighty resource wise, especially for large xml files.
With the simple perl scripts I can just print to stdout, no probs.

Actually, you'll be using a Provider in either case. By using a CGI script or mod_perl Handler to "just print" the XML content you will have to use Apache::AxKit::Provider::Filter, which uses Apache::Filter to capture the content and feed it into AxKit. Of these two choices, the mod_perl handler will probably be the least expensive, performance-wise, but even that will have a greater penalty than a custom ContentProvider class.


However, I think you might be interested in SAWA, which is currently being developed. It sounds like exactly the right thing for you.


Ah, I had a look at that, once I'd found it, (it's not on CPAN), and it made
my eyes bleed :)
Tho as you recommend it I'll look into it some more.

I'm curious, what about it made your eyes bleed? I realize that the docs on the sourceforge site are, um, less than helpful and clear and I'm in the process of doing new ones. Is that what turned you away?


I'm not quite positive the SAWA hackers are going to recommend it yet, but if they are, I'm sure they will speak up.

Two things have kept me from putting SAWA on CPAN and/or generally beating the drum about it at every available opportunity: 1) the lack of good, complete docs and 2) the risk of adding to the confusion for Perl n00bs with Yet Another Webapp Framework. The first of these I'm working on as time allows but, as usual I've got 57 irons in the fire at once and progress isn't what I might hope. The second is out of my control, I guess, so I shouldn't worry (but I still do).


This said, given what you're described, I think SAWA would be a natural fit for what you need, and, as penance for being slow with the updated docs I'd be willing to help you get up to speed with it.

Here's a short list of why I use SAWA every time I'm given a choice:

* I like MVC-style development. I like thinking about things in terms of Finite State Machines. I like pipeline-based application development, where smaller classes do one thing well. SAWA gives me all three in a way that helps me where I need it but gets the Hell out of the way when its *my* turn to be the smart one.

* Thinking about an application as a series of "states" from the beginning helps me to organize my thoughts and tends to make me more productive, faster.

* SAWA basically works just same inside and outside of AxKit, as well as under mod_perl1/Apache1 and modperl2/Apache2 and even plain CGI. I can start an app on my laptop under Apache2 and move it into Axkit on the server and all i need to change is 2-3 lines in the .conf file.

* When running inside AxKit as an Application ContentProvider, SAWA gets special powers to control the stylesheets applied, including the ability to simply pass the name of an AxKit Named Style block. or prepend to/append to/replace the chain of styles that Axkit would normally apply to that resource by default.

* Virtual URIs. I'm free to use <Location> blocks to define my public interfaces, rather than being tied to the filesystem.

* The "intangibles". SAWA just "feels right" to me. Its a tool that fits my hand. I don't really know how to say it more concretely than that.

* I'm not just scratching my own itch. *Every single* developer that has given SAWA an honest try so far has adopted it. Despite the fact that it has gotten little or no "buzz", I've already gotten feature patches and some pretty significant contributions from others that are using it. This makes me a proud papa and drives me to make SAWA better and better.

I could really go on and on here, but that's enough of a "sales pitch", I think. Rest assured that I'll be trumpeting the virtues of SAWA loud and long once the docs are in a fit state for public consumption. :-)

Anyway, thanks for buying The Book :-) and I meant what I said about helping you get up to speed it you find that SAWA is something that you're interested in for generating dynamic content under AxKit.

Cheers,
-kip

--
XML Publishing with AxKit,
http://www.axkitbook.com/
** Buy Yours Today! **

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



Reply via email to