Chris Curvey
ccurvey at earthlink.net
Mon Aug 16 21:21:59 EDT 2004
I've recently been working on integrating owlfish's implementation of TAL (Template Attribute Language) with mod_python servlets. I like that model, because it lets me separate all the HTML from the Python code (so that I can't get sloppy and mix Python with my HTML). I can then implement controller classes by subclassing mod_python servlets, and keep those separate from my entity classes (which are straight python). I have a feeling that this solution may be slow-performing, but that doesn't matter for what I'm doing now. The only other problem is that you are replacing all of the servlet's handling of HTML, and there are some patterns that you have to follow to keep the whole thing working. If there's any interest, I can post an annotated example. -Chris Miles K. Forrest wrote: >>I would also really like to see more examples. And get some advice :)! >> >> > >Glad I'm not alone :) Thanks everyone for your feedback and links to >working mod_python sites. I'm beginning to see that mod_python's >ability to open up the insides of apache is something really powerful. > I also get the sense that it's not meant for "newbies" like me who >are used to building webpages with Windows tools like Dreamweaver and >putting in the dynamic plumming with PHP. > >But I _want_ to learn. And I'd like to seperate the HTML and Python >code so I can still rely on HTML designers who, unlike myself, know >how to build nice looking pages. And I'd like to use Python. But I >can't seem to get a platform working. > >I figure I need to use templating to seperate the HTML and Python >code. I've read Grisha's article at onlamp.com: > >http://www.onlamp.com/pub/a/python/2004/02/26/python_server_pages.html > >I suppose having lots of choices when it comes to templating if you >know what you're doing, but for someone like me the choice is >difficult: which _should_ I choose? Being told "it depends on what >you're doing" doesn't help because I'm not sure what I'm going to do, >I'm still learning. I'm leaning towards PSP because it's built-in to >mod_python, so it seems to me it will become a standard way of >templating because it's already there. > >Can any gurus out there help guide this neophyte? (wincing a bit as I >click send in fear of a "RTFM" retaliation - I've read so much my >eyeballs are beginning to glaze over) > >Miles >_______________________________________________ >Mod_python mailing list >Mod_python at modpython.org >http://mailman.modpython.org/mailman/listinfo/mod_python > > >
|