[csw-maintainers] A place for other project-related code

Maciej (Matchek) Blizinski maciej at opencsw.org
Fri Mar 27 18:36:54 CET 2009


On Thu, Mar 26, 2009 at 10:50 AM, William Bonnet <william at wbonnet.net> wrote:
> It is based on wordpress for the main pages.

This means, there has to be MySQL installation already.

> I am integrating dokuwiki, and
> it will be used for pages dedicated to packagess. Dokuwiki is interesting
> because it does not use a DBRM backend, but a file backend.

What's the problem with having a database backend?

> So it is easy to
> generated automatically some  of the pages.

It shouldn't be that hard with a database either... I think.

> There will be also some custom
> php pages for package list, etc.

I've given it some thought. There's Wordpress already, which means
there's MySQL with some tables and there's also a list of users who
are registered in Wordpress. I suspect Wordpress users aren't
integrated with users in other places (Mantis, SourceForce, Trac,
etc.) Wordpress has very nice features, where you can create both
blog-like news and static pages.

Your plan is to have additional custom PHP pages. How about... using a
web framework? I'm mostly accustomed with Python and Django, and I
know that it's fairly easy to marry Django with other authentication
backends. Users can be shared between Django and Wordpress, I've done
that between Django and phpBB. When you have an application powered by
a framework with ORM, you can easily navigate relationships between
objects. For instance, you can say:

pkg = Package.objects.get(name="CSWcommon")
dependent_packages = pkg.dependentpackage_set.all()

And then in your HTML template, you can say

<h3>{{ pkg }}</h3>

<ul>
{% for dep_pkg in dependent_packages %}
  <li>{{ dep_pkg }}</li>
{% endfor %}
</ul>

This gives you a HTML page with a list of packages depending on
CSWcommon. All the SQL magic is happening under the hood.

To recap, I think that if you plan to have custom dynamic pages, a web
framework with an ORM is the way to go. If you decide to use Django,
I'll be happy to get involved. If you tell me what kind of stuff you
would like the application to do, tell me, and I'll write a proof of
concept.

Maciej



More information about the maintainers mailing list