I am working on the next release, which will be heavily refactored thanks also to Jerome's input. The current unstable of WPFF is little more than a proof of concept, it works and powers a few sites, but is difficult to customize and not flexible at all. It's impossible or very hard to do things like adding a page with custom logic, which displays the main sidebar or uses a posts list in a non-standard way. And code or template upgrades on an existing site are a pain.
So in the next release I am sacrificing some speed in favour of code encapsulation, and flexibility. I am writing a new class (surprisingly named Frontend) which will encapsulate most operations in easily accessible methods. Apart from the class constructor which just stores the config options, there are: a bootstrap() method which encapsulates all the setup stuff (localization, locale, db and templating class instances); a series of get() methods for categories, archives, and posts which (get, cache, and) return ready-made structures with all the contained entities (categories, posts, etc.) having all the needed attributes (formatted dates, number of comments, number of posts, etc.); a series of parse() methods which will parse and output the main page components (header, content, sidebar, footer), calling the appropriate get() methods where needed. The class will be used by different pages (index, feeds, archives, post, etc.), which will contain the few lines of code needed to instantiate it and call its methods with the appropriate parameters.
WPFF will be a bit slower than it is now, but much more flexible. You could use it in totally different ways than the ones I built it for with little coding. Or you could add useful extensions and new pages that I haven't thought of. I expect to have something usable in two or three days.
Sounds good, Ludo. An extra layer of encapsulation should have minimal impact on speed - the Zend optimizer will keep things snappy as long as the code base doesn't expand dramatically. Looking forward to your next release!
Unfortunately I think an extra layer of encapsulation will make a difference in terms of speed. But you're right, WPFF as it is is a big lump of code, and customizing it requires proficiency with PHP, and a good understanding of my templating class.
But I'm confident the speed reduction will be compensated by caching, which will be quite easy to implement.