lloyd wrote:
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)?

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?

3) are there examples or documentation for using webware, formkit, and cheetah together in an optimal way?

Hi lloyd,

I'm still pretty green with webware, and python as well, so I can't say much about your first two questions.

As far as documenting the webware/formkit/cheetah convergence, I find bits and pieces here and there between manuals, tutorials, wikis and the mailing list archives, but no silver bullet. Bringing the tech together is a "creative" thing at this point ;-). That's not to say that it doesn't all fit well and work great together, just that there are so many ways to use these tools together, but no clear resounding 'right way'.

One 'issue' is that cheetah recommends that you inherit from a cheetah template. This is incompatible (I can't remember exactly how) with the normal webkit Page inheritance system. Inheriting from Page is one of my favorite things about webkit, so I don't use that method. Instead I call templates from different levels of my Webkit->Page->SitePage->etc. hierarchy. The thing is there are so many different ways you can use cheetah, it seems hard (i.e. takes a long time) to settle into a well rounded sensible system.

> 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?

This is the trickiest thing for me: how to keep my apps sensible while mixing Page inheritance with cheetah templates. Here are some starting points from the mailing lists:

https://sourceforge.net/mailarchive/message.php?msg_id=5624068
http://sourceforge.net/mailarchive/message.php?msg_id=8736015
https://sourceforge.net/mailarchive/message.php?msg_id=7728701%3E

Personally, I'm still experimenting. So far I'm finding that having two parallel inheritance trees (one for webkit servlets, one for cheetah templates) is too confusing. I think for bigger projects, that I'll continue to control layout from Servlets, and build Controller objects to offload the 'business logic'.

I'll still use cheetah templates, but only for layout intensive sections. Cheetah provides a friendly fast clean and compact way to write text output of all kinds, which is very handy, but I prefer to keep my logic and control in webware. Cheetah is so flexible that it works great either way.

BTW, if you haven't used SQLObject (sqlobject.org), I highly recommend it. For me, it is an incredible framework, and it is only getting better.

Good luck,
- Sam


------------------------------------------------------- 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