> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of lloyd
> Sent: Saturday, January 29, 2005 12:30 PM
> To: webware-discuss@lists.sourceforge.net
> Subject: [Webware-discuss] several questions about webware
> 
> 
> hello all -
> 
> 
> these questions are based on my recent experiences with webware 0.8.1
> 
> 1) is there a facility for running code on server start-up, 
> and storing 
> application-wide data (eg, say, a database connection pool manager)?

There is a database connection manager, but I've not used it before, sorry
not much help on this point
> 
> 2) in a java servlet container like tomcat, each context is 
> analagous to 
> a separate application.  in webware, this separation doesn't seem to 
> exist.  each context appears to be, basically, just a mapping 
> of a URL 
> segment to a directory.  should i run a separate application server 
> instance for each application that needs "separation" from other 
> applications?

This is one of the big differences between a java servlet container and
webware (beside the fact that its python and not java).  Essentially if you
want to isolate your "applications" form each other, then yes you need to
run multiple App servers from different applications directories.  That is
essentially what Makeappdir is for.  Basically what I do is keep related
applications together in a given app server, this way if for some reason I
have to restart a particular server not all of my webkit servlets need to go
down, only those in that particular group.  It really is a very nice feature
once you start using it
> 
> 3) are there examples or documentation for using webware, 
> formkit, and 
> cheetah together in an optimal way?

Sorry no single source of documentation, this list is probably the best
single place to look, I've gotten lots of very good advice just by trolling
this list.  As for Cheetah, the point it is, is that there is no single best
way to use it.  It is a very good template engine and can be integrated with
Webware very nicely in a number of ways
> 
> 4) if one is using cheetah, are the separate writeXXX() methods in a 
> servlet really useful, considering that most of that 
> information may be 
> in the templates?
> 
> 

I can only tell you what I did, and it is only one way to use cheetah with
webware.  What I did was write my own cheetahPage which inherits from Page.
To it I added all the "special" methods that I use to make cheetah work the
way I think it should.  I also added some things to the basic Page which
also make my life easier.  Then I have all my servlets inherit from my
cheetahPage (or I have a sitePage inherit from cheetahPage first, you get
the idea) and my servlet then calls the compiled template.  I try to put
most of my code in the servlets and then call what I need in the template,
as a result my compiled templates will not run by themselves most of the
time, because they would be missing many of the methods and variables that
the servlets expose to them.  I find that this keeps my presentation code
nicely separated from my program code, and keeps the templates very clean.
I would be happy to share my cheetahPage with anyone if there is interest.

To answer your question about the writexxx methods, I have writeTemplate
(basically just an overwrite of writeContent, I could have use writeContent,
but didn't) and then I have a method called
cheetahTemplate('templatename').render() which returns the rendered template
as a string.  I usually pass that to write in my servlet.  This way I never
use the template directly but indirectly though my servlets.  This way works
very well for me.  Like I said above there is no single best way to do it,
and lots of ways that work well.

Jose

> thanks!
> 
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by: IntelliVIEW -- Interactive 
> Reporting Tool for open source databases. Create drag-&-drop 
> reports. Save time by over 75%! Publish reports on the web. 
> Export to DOC, XLS, RTF, etc. Download a FREE copy at 
> http://www.intelliview.com/go/osdn_nl
> _______________________________________________
> Webware-discuss mailing list Webware-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/webware-discuss
> 
> 



-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to