Re: "pybloxsom"??

Dieter Plaetinck <dieter-7FYLOmueu/[email protected]> Wed, 23 Feb 2011 21:26:09 +0100
Newsgroups gmane.comp.web.pyblosxom.user
Message-ID <20110223212609.5fb1315d@dieter-ws>
Hi Sean,
small world (madduck vcs-home list)..

On Wed, 23 Feb 2011 20:20:52 +0000
seanh <[email protected]> wrote:

> The pyblosxom core should just have a simple
> algorithm to decide which template file to render based on the URL
> requested, then it should render the template code passing the requested
> URL into it.
> 
> User requests /foo, /foo.jinja template is rendered and the URL request
> "/foo" is passed to the template code as argument. Users requests
> /foo/bar, /foo.jinja template is rendered and "/foo/bar" is the
> argument. Unless the flavourdir actually contains a subdir foo with a
> bar.jinja template in it, in which case that template file would be
> rendered instead.
> 
> So for example a year.jinja template would get rendered for a URL like
> /year/2011. The template code inside year.jinja could parse the
> "/year/2011" string it gets as its argument and make a request to
> pyblosom for all entries from 2011 and render them.
> 
> So pyblosxom core would know nothing about front page, archive page,
> permalink page, category page etc templates. It only knows that there
> are template files, it has an algorithm for deciding which template file
> to render based on the requested URL, and it passes the URL string into
> the template code.

interesting. reminds me a bit of the routing feature in CakePHP/RoR, but using the filesystem instead of a config file.

> But this breaks the current feature where the path to the file for an
> entry is the permalink URL to that entry.

not if you reintroduce it with a plugin.

I'm all in favor of making the core more generic and giving more power to plugins.
However, I wonder how such an approach affects the interfaces between plugins. if more and more of the main functionality goes into plugins, that might mean compatibility between plugins becomes tricky/complicated.

Dieter

------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev