Eric Walstad
eric at ericwalstad.com
Fri Jun 25 09:23:56 EDT 2004
Hi Daniel, On Friday 25 June 2004 07:57 am, Daniel J. Popowich wrote: > Eric Walstad writes: > > ... Daniel Popowich, in the Servlets tutorial, advocates using > > HyperText (I think), which seems to embed the presentation pretty > > firmly into the logic of the web app. I like keeping the > > presentation separate from the logic as much as possible. > > I quote the tutorial: "True confessions: I hate writing HTML. So, I > have always used packages like HTMLgen or HyperText." [...] I meant no offense, nor was I inferring poor design. I'm sorry if it sounded that way. I took a cursory look at Sharky's copy of your tutorial, liked your work and wanted to find out if others were using it in the way I was considering. > > I'm curious to know if anyone has used SimpleTAL with Servlets or > > can offer insight on this mixture to someone with no Python Servlet > > experience. > > Anyway, as to your question about using a templating tool with > Servlets. Why not? You can store your content anywhere and using, > perhaps, PATHINFO as a lookup key, retrieve your content from a > database or directory hierarchy which is removed from your application > files. [...] > I should perhaps add a templating example to the tutorial; it would be > something like this: a file would exist (exmple.tpl) with the content > of the BODY and have tags or some such which would be replaced with > information collected from a form. The servlet (template.mps) would, > on a GET, produce a form (HyperText widgets) and on a POST would read > the example.tpl, apply the data collected from the POST and return the > processed template as the content. > > Hope this helps. It does, thank you. I'm going to give Servlets a whirl. Best regards, Eric.
|