Scratchpad
Template Engines
As an initial proposal i would suggest starting out with Genshi as a template engine. It's quite clean and lean in it's implementation and according to AlexanderSchremmer the genshi guys seem to be working on additional speedups1. There are many other template engines out there, some with similar approaches. Some comments from the community on what style of engine they would prefer would be really nice here. I have a small list of engines i already worked with below, each one with a small comment according to my experience:
Genshi: It's mostly pure XML (has a more text-style parser), stream-driven, and very easy to extend through the means of stream filters and output encoders (could be useful for the different output-formats of MoinMoin). The markup for common templating operations consists of a small set of directives, stated as tag attributes in a special XML namespace. Everything that's inserted on rendering the template is automagically HTML-escaped (in the HTML output encoders), so one doesn't has to worry much about that.
Myghty: Myghty uses special linestarts ('%' if i remember correctly) and PHP-style markup for embedding control code into the templates. The code can be pretty anything python. Output encoding for the web has to be done manually. It's a flexible approach, but the templates will often fail for validation in html/xhtml scenarios.
Kid: There is not much to say here, because basically it's a predecessor to Genshi. The genshi guys wanted a speedier version of Kid with a cleaner separation of different aspects of templating. So i just include it for reference, because i encountered it after Myghty and before Genshi.
Other engines, i heard about but didn't take a look at myself include Mako, which seems to be a successor to Myghty, and Cheetah, which i currently do not know enough about to state an impression.
See also TemplateSystems
I added there some notes too I hope you dont mind if I write somethin also in here. I would suggest Genshi too, because there you have the flexibility to choose between XML-based and text-based templates. The textbased templates can be used to parse other things then the websites, if perhaps some other stuff will be redone with Genshi too. I heard from you that you use the xml-based part for the html, thats good, here are some good points why. If the performance isnt good at all, and if you want to use text-based templating altough instead, the most benchmarks point out that the templating from django and mako are the fastest. Also I want to point you that Genshi, who was done by Edgewall especially for future use in Trac. Trac uses a old version of Moin for its wiki. Perhaps you find some useful patterns for your project, because they have to solve some similar problems. Also thinking the use of the Sanitizer of Genshi could be worth to have proper output easily.
Templating in MoinMoin
Currently themes for MoinMoin are classes that implement a whole lot of methods that return HTML-snippets for different parts of the page (navigation, headers, footers, etc.). The methods get called by many parts of MoinMoin, though for representation most of those calls come from the Page module and class.
The first idea behind this SoC-project was to try out template-engines by creating a new MoinMoin theme leveraging the power of a template engine beneath it's surface. Although that would be a nice starting point, i currently doubt that there will be a real benefit here. Because of the call structure of theme code (from all over place, you remember?) and the fact that rendering out partials of templates is not intendend in most of these engines (apart from Genshi perhaps), the user/html-coder of this theme would end up creating several files, each containing little html snippets.
On the other hand, putting templates directly into MoinMoin will require major changes to the core codebase, especially the Page-related modules and classes, which currently drive output.
- How is the page contents generation related to theming?
So currently i am mostly thinking about, if i should start with the theme-based approach or start aiming directly at the codebase, since this is going to be crucial for templating anyway?
I personally dont know but if you want to try out some things, you perhaps could parse the complete output again trough genshi. Altough that would be a only a quick solution while developing on this part of your project - because it will be not very performant to do this in on a productive wiki.
CSS Frameworks
http://www.yaml.de: English version to appear soon; good cross-browser compatibility; nice design; drawback: cc-license
http://developer.yahoo.com/yui/grids: offers a gui to layout new themes; BSD license; support of "class 'A' browsers" only; no nice standard design
No, they are not - nobody really knows how to speed it up significantly, the task would be hard enough for a bachelor thesis -- AlexanderSchremmer (1)