help with architecture

47 views
Skip to first unread message

Leandro Severino

unread,
May 8, 2012, 3:31:06 PM5/8/12
to web.py
Friends,

Since the version 0.34 of web.py, I have used it to build the
websites of my customers.
This websites have a admin module, where I used the 'subapps'
concept and this works fine, works very well.

Now, I think about transform commons tasks (or portion of code) in
components (or widget) of a website as: news, RSS, banner publication,
agenda/calendar, polls, photo gallery and video gallery.

Then, my main doubt is: How to do this ?

In my crazy brain, I think that in my admin module I can have a
section called: 'modules' and this section I can select which one or
ones modules are active(s) for this customer.

Well, I don't know, but I think that this architecture can work as
plugins, for example, in JQuery there are plugins.

Any tips or suggestions are very important to me.

ps: Sorry by my terrible english.

thanks,
Leandro


Leandro Severino

unread,
May 15, 2012, 9:36:09 PM5/15/12
to web.py
any idea, tip or suggestion ?

best regards,
Leandro.

Ryan Sears

unread,
May 15, 2012, 9:48:23 PM5/15/12
to we...@googlegroups.com
I dunno, it sounds like you have a good understanding of how Webpy is
put together, so if you want to offload portions of your code, I'd say
write them as modules and import them. I think that's what you're
getting at, though I may be mistaken.

On May 15, 2012, at 9:36 PM, Leandro Severino
> --
> You received this message because you are subscribed to the Google Groups "web.py" group.
> To post to this group, send email to we...@googlegroups.com.
> To unsubscribe from this group, send email to webpy+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/webpy?hl=en.
>

Leandro Severino

unread,
May 15, 2012, 10:21:56 PM5/15/12
to web.py
Ryan,

You're right !, I want to do this, or be, modules, but I think that
plugins can be a best approach. IMHO a plugin architecture can
aggregate more value to web.py
For example, a plugin to RSS, a plugin to gallery, a plugin to
polls, a plugin to calendar/agenda, a plugin to banner publication,
but I know that this approach isn't the main goal of this framework.
The main goal of web.py to be simple and easy, but looking in the
cookbook section I see that it's so complete, ever that I seek about a
example code (to solve a problem that I have)... I have a answer in
the cookbook.

In my country (Brazil) many python developers think that the web.py
is a mini-framework, but I don't agree with this opinion, I think that
it's very complete.

IMHO, to be better ... it needs two things:

1) A standard way to develop a project with web.py, by looking in
the sources in various projects that I found in GIT(or another repo)
each project developed witg web.py follow a way, a structure, no there
a standard in the structure of a project.
2) A plugin architecture.

But, thank you so much !

Ryan Sears

unread,
May 15, 2012, 10:35:58 PM5/15/12
to we...@googlegroups.com
Ahh I think I see what you're saying. It really isn't easy to develop
plugins per se for web.py, but it also isn't really that easy to
offload code in seperate modules (you have to hook and declare session
as part of web.ctx) I do see this as more of a mini-framework, because
there are things that you do end up having to figure out yourself, or
modifying part of the framework not to do dumb things (like start a
session/send a set-cookie header for every request, or have the db
clear out only stale un-authenticated sessions).

My point is, there's a lot of stuff you do end up having to figure out
for yourself, as the documentation is pretty spotty, and the results
will tell you a few different ways to do any one thing depending on
how old that particular revision. You really can't be afraid to get
your hands dirty if you want this framework to work they way you want,
and IMHO it needs more polishing. Something like django you would
never dream of messing with the internals, but what drove me to web.py
is the fact that it was way simpler to get something up and running.
Though some things do require expierementation, like running a WSGI
interface on both SSL and non-SSL ports, then adding debug interfaces
to manage it from there. I don't mind though, this is the sort of
thing I enjoy :), and I feel that's really in the spirit of Python in
general.

Ryan

On May 15, 2012, at 10:21 PM, Leandro Severino

Tomas Schertel

unread,
May 29, 2012, 2:37:03 PM5/29/12
to we...@googlegroups.com
Leandro,

I was thinking about your doubt and remembered that Editra, a WXPython based code editor, uses egg files to add functionalities to main app.
Take a look on Editra's code and even mail his coder, Cody.
You can find everything here: http://editra.org/

Of course, post your results here.
Reply all
Reply to author
Forward
0 new messages