With models, grid and smartgrid you can prototype an application very
quickly and know that the database works the way it should.

That's the main attraction of these three things, at least for me.

On Mar 12, 3:16 pm, Pepe Araya <pepea...@gmail.com> wrote:
> With all the post arguing about no models... I'm asking myself: why web2py
> have "models" folder if it isn't the best way to do the work? only for
> background compatibility?
>
> what's the reason to load the models every time you make a request? is
> because the automatic migrations?
>
> are only questions, and why not made a huge change and optimization in a
> brand new version of web2py?
>
> best regards,
>
>
>
>
>
>
>
> On Thursday, March 8, 2012 12:45:41 PM UTC-3, rochacbruno wrote:
>
> > another advantage is the fact that you can import modules, you cannot
> > import models. it is very nice to import your tables on external scripts.
>
> >http://zerp.ly/rochacbruno
> > Em 08/03/2012 12:11, "Anthony" escreveu:
>
> >> I think an additional advantage of the module approach is that the module
> >> only has to be loaded once (when it is first imported), but the model files
> >> have to be read on every request.
>
> >> Anthony
>
> >> On Thursday, March 8, 2012 10:04:11 AM UTC-5, Cliff wrote:
>
> >>> Certainly we want to avoid processing unnecessary table definitions
> >>> with every request.
>
> >>> It seems to me that the simplest solution is something like this:
>
> >>> if request.controller=='foo':
> >>>   db.define_table('foo', Field...) # main table
> >>>   db.define_table('foo_one_to_**many', Field(foo_id, db.foo...)...)
> >>>   ...
>
> >>> What is the advantage of the no models architecture over this?

Reply via email to