On Nov 3, 8:02 pm, "Mark Ramm" <[EMAIL PROTECTED]> wrote:
> > It seems like TG makes modular design
> > pretty much impossible, you can't build an application and then
> > package up add-ons and skins that people could install without hacking
> > code, at least not easily. That to me seems like a major hurdle to
> > adoption depending on what you're doing.
>
> I don't think this is true. Our problem is that we haven't created
> the "one right way" to do any of this stuff, and we haven't documented
> the myriad ways that it can be done now, so it seems less promising
> than Django, but really it's not.
>
> You can create TG plugins using setuptools and entry points, you can
> skin things using conditional xincludes in genshi, or by adding
> something like Deliverance middleware to your stack (allowing you to
> compose apps into a unified site and skin it all even if the
> components aren't all python apps).
>
> And the Django way of doing reusable component apps requires at least
> a little bit of hacking code if I'm not mistaken. So, I don't think
> the two are as far apart as it looks. It's just a matter of
> documentation and of making some decisions about the "right" way to
> tell people to do this.
>
> --Mark
Working with Joomla while thinking about the Python-based offerings
out there makes me ask myself "could you implement Joomla on platform
X." Not saying that you *should*, but it's an interesting exercise.
One of the things that makes Joomla attractive as an application is
that you can package up components and themes and users can install
them through the admin without knowing *anything* about how it works
(calls to mind Firefox a little). The design of the underlying
framework specifically facilitates that kind of packaging.
>From my reading, yes it is true that in Django you have to edit a
couple of files in order to plug in a new app (you have to include the
URLs for your new app, plus list it in the apps to load if I'm not
mistaken), so it would not be possible to implement Joomla per se, but
you can design your app in single-purpose modules, which I like.
When I was designing my little personal app and writing the model for
in in SQLObject for TG I consistently had the impulse to want to chunk
it into independent applications that get hooked together without
having to merge great gobs of code into single files. Chunking
promotes order, gobbing is inherently messy.
>From trying to work with TG it seems like it would be very nice for
making a single coherent application like a wiki, a BB or a blog and
bloody awkward for designing a multi-purpose container like a CMS.
Django seems like it would be better for designing something more
sprawling and creates much more convenience and order for plugging
things in after the fact, but, and this is just me, except for that
one major flaw (to me) I like what I see as the elegance and
flexibility of TG a lot more.
I wonder if you could do something like e.g. write code into the TG
controller to have it search for apps in a hierarchy of directories,
find controller classes, and merge their attributes into itself
dynamically, extending that idea out to models and templates somehow
to create a system where you could build an app-based design and plug
in new apps just by dropping the files in and restarting TG. Would you
likely harm performance a lot doing it that way?
I'll tell you the truth, the app-based design is a big deal to me, so
much so that I'm strongly leaning towards moving to Django even though
in most other ways I prefer TG. I really think that TG very strongly
needs a clear, easy and well-documented way to plug in functionality
in packages to existing projects. I feel that it's a sin for something
that works so smoothly in using a PHP framework to be so hard to do in
a Python framework unless you have an excellent reason not to build in
the functionality.
Stephen
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---