On Mar 23, 12:24 pm, Olivier Lauzanne <[email protected]>
wrote:

> I think the main problem is extensibility.

I agree, which is why I developed pysmvt and pysapp:

http://pypi.python.org/pypi/pysapp
http://pypi.python.org/pypi/pysmvt

The idea is that pysmvt is a framework similar to Pylons (in fact I
took a lot of development ideas from Pylons), except that it is built
with the idea that a web application is made up of a single or
multiple applications stacked on top of each other with each
application having its own modules (i.e. what Django would call an
"app").  So, a typical web project for me consists of the following
apps with the following modules:

-examplewebsite (an application that represents the customer's
website)
 - navigation (a custom navigation module for this customer)
 - pyspages (overrides to the sharedmod's pyspages)
 - home (a custom home module which handles the home page)
 - emergencyannouncements (another custom module for this customer.
Like announcements, but significant enough changes that we didn't want
to inherit from announcements)
-sharedmods (an application in the virtualenv's path that is simply a
placeholder for modules I have built that get used on multiple
projects)
 - announcements (news items)
 - contactform (for a "Contact Us" page)
 - contentbase (supports anything with "content" (i.e. announcements)
and provides CMS like functionality that other modules can use to do
work)
 - filemanager
 - newsletter (sends bulk emails, used by announcements and
emergencyannouncements to send emails when an announcement is made)
 - pyspages (a simple module that we use for "static" pages so that
they are a part of our templating system)
-pysapp (a base application that handles DB setup, authentication,
default CSS, default templates, default error handling, etc.)
 - users (a simple users module for authentication.  Can be extended
by any module if you needed a "customer" for instance that would also
be a logged in user)
 - apputil (some basic views/templates and other utilities for error
handling

The idea is that pysmvt simply provides a framework for easily
building applications on top of each other.  pysapp provides basic
functionality and defaults for the way I like to build webapps.  If
you don't like my way, no problem, just implement your own basic
application to replace pysapp and build all your applications on top
of that instead.  The key part of pysmvt is a python-path like lookup
sequence that determines, down to the object, where something gets
imported from.  So, when the view Users:Login is requested, pysmvt
first looks in examplewebsite, then sharedmods, and then pysapp for a
module named Users with a view named Login.  The first place it is
found is used (an cached for the life of the app).  This allows you to
override functionality in the apps higher in the stack.  If I needed
to do a custom Users:Login view, I would just create a Users module in
examplewebsite with a Login view and the framework would automatically
use that instead.

The whole point of my framework is to be able to eventually build a
CMS application on top of it, while still retaining a good framework
for other needs.  I had actually started my framework by trying to
modify Pylons, but some of the core concepts were too different.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" 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/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to