On Friday 15 April 2005 22:17, Ian Bicking wrote: > > In a way, I think this is up to the framework -- frameworks tend to have > opinions or policy on how files and code is layed out. Templates have > opinions on how site look is separate from the layout of individual > pages, and stuff like that.
It's certainly more comforting to have conventions around where you put your files - I know that some of the small applications I've been writing end up with files in a fairly rigid directory hierarchy. But then we (meaning those of us who wish to somehow make frameworks and APIs "Pythonic" - how I hate to use that word) should at least try and make use of the way Python itself manages its resources. It's no good having packages in Python, for example, if you're not going to use them for organising resources. > Ideally, for a significant class of frameworks it would be nice if they > could all be interfaced in the same way. I.e., you pass in a namespace, > and maybe a "template space" as well, when templates look up up other > templates (as with ZPT macros, standard headers/footers in other other > languages, etc). There's small but subtle differences between > templates, but maybe those could be papered over. The complexities might arise in callbacks and what kind of data those callbacks operate on. I've found that various XSLT templating experiments have been made much more interesting with the use of extension functions. That said, I don't think anyone can really accuse XSLT of being framework-specific. > Then docs would be two-fold -- the framework would describe how it loads > and populates templates (generically) and templates would describe what > they do with the values given to them. I think that could be workable. Paul _______________________________________________ Web-SIG mailing list Web-SIG@python.org Web SIG: http://www.python.org/sigs/web-sig Unsubscribe: http://mail.python.org/mailman/options/web-sig/archive%40mail-archive.com