I'd use folders inside models.
I think I'd use web2py infrastructure that's already available to me.

And, AFAIK, /modules were not planned for that. Except for pluggable apps.

--
Vinicius Assef.



On Fri, Jan 27, 2012 at 10:35 PM, Bruno Rocha <[email protected]> wrote:

> I am using /models just to define small global functions and to set some
> response and request keys.
>
> All my code including datamodels I  am putting into /modules
>
> In my mind I changed the /models to /scripts or /batches so it is more
> easy to understand why avoiding it.
>
> my current structure is:
>
> /modules/datamodels/someentity.py - Database definitions
>
> /modules/handlers/someentity.py - my code logic and template rendering
>
> /modules/helpers/* - miscelanious
>
> /modules/myappname.py - My.custom Auth, db, Mail, Service etc..
>
> /controllers/someentytity.py - it will just be a point of entry, here I do
> selective imports, intantiate the entities and call the template rendering.
>
> views files can be stored anywhere filesystem or database.
>
> http://zerp.ly/rochacbruno
> Em 27/01/2012 17:48, "Magnitus" <[email protected]> escreveu:
>
> >This is very good advice. I have moved many of my plugins and apps from
>> using models to modules because of the performance gain. There is nothing
>> wrong with the models implementation, but it's really meant to define
>> tables and that's it. Functionality that doesn't belong in a controller
>> should go to modules.<
>>
>> Interesting, so to clarify: are you minimizing the amount of code into
>> the model (limiting it to table definitions) or you avoid using a model at
>> all?
>>
>

Reply via email to