- for the record, SkeletonPage is a quick hack that I created years ago for
generating simple, and relatively static, websites. It wasn't designed for
MVC style applications. I haven't used it in a long time and really should
update the docs to make its purpose more explicit.
When creating MVC style applications with Cheetah and Webware it's best to use
a pure python servlet as your controller. It should import or create one
more Cheetah templates for the view portion.
On Thursday 24 November 2005 10:56, Dirk van Oosterbosch, IR labs wrote:
> Hi All,
> I am trying to design the structure of my web application. But I
> stumbled on some issues, which I don't exactly know how to solve.
> I have experience with (stand-alone) application design, but not so
> much with web application design. This whole web application thing
> confronts me with some serious issues, which I will not tire you with
> extensively. But I do want to shortly address a few points. Maybe the
> biggest problem I am having that a web-application does not really
> function as an application, having a run-loop and a state and such. In
> the end it just comes down to delivering a page to a client.
> One of the specific strange things I am finding with working with
> cheetah, is that the inheritance of (template) classes should jump
> across the controller-view border, over and over. I like to make a
> clear separation in my code and modules, between model, controller and
> view. But cheetah doesn't really let me (if I want to use the neat
> inheritance feature of it).
> 1. SiteLogic.py (... from Cheetah.Template import Template, class
> 2. FrameworkViewComponents.tmpl/py (... #from SiteLogic import
> SiteLogic, #extends SiteLogic)
> 3. Framework.py (... from FrameworkViewComponents import
> FrameworkViewComponents, class Framework(FrameworkViewComponents):)
> 4. CustomTemplate.tmpl/py (... #from Framework import Framework,
> #extends Framework, #implents respond)
> The neat aspect of this arrangement is that the CustomTemplate can
> –from its main body– call a framework component, say $breadcrumb, which
> is a method defined in Framework.py, which on its turn can can call the
> view implementation of this breadcrumb component through
> self.breadcrumbview(), which then can be defined in
> FrameworkViewComponents –using #def breadcrumbview– or overridden in
> Now there is a separation between model, controller and view in the
> files and modules, but unfortunately the inheritance cuts right through
> this separation.
> For In this example
> 1. SiteLogic.py is a controller or even a model
> 2. FrameworkViewComponents.tmpl/py is a view
> 3. Framework.py is a controller
> 4. CustomTemplate.tmpl/py is a view
> Now I guess I'll just have to cope with this unclearness. But there is
> another issue, which is really the why I am writing this mail in the
> first place. So if you are still reading ...
> Lets say I put the SkeletonPage template on the top of this inheritance
> hierarchy. What I really would like is for the Framework.py
> As an example:
> I could put $slideshow in the page content of CustomTemplate. Then
> Framework.py's method slideshow would be called, which knows exactly
> how to make a slideshow in html. The slideshow method would call a
> Template's slideshowview view implementation through
> self.slideshowview(). But it would also have to add the special
> Here the problem is showing: if Framework.py would add "slideshow.js"
> contents, for this gets written before the CustomTemplate gets parsed.
> CustomTemplate (or it underlaying Framework) asks for that.
> Is there a best-practices solution for this problem? Or would there be
> some hack, through which I still could use Skeleton?
> Dirk van Oosterbosch
> de Wittenstraat 225
> 1052 AT Amsterdam
> the Netherlands
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log
> files for problems? Stop! Download the new AJAX search engine that makes
> searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
> Cheetahtemplate-discuss mailing list
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
Cheetahtemplate-discuss mailing list