You could definitely use Jinja2 if you so desired, but honestly I do not see
any reason why you would, you lose the ability to byte compile your views.
(well technically, you would end up having to write your own middleware that
would compile the jinja2 templates into bytecode....) but then you get away
from the whole reason of using web2py in the first place... which is to have
all of the tools in one box designed to work together seamlessly.

As far as the ORM vs DAL argument is concerned, it really depends on your
situation. Firstly, I think the Django ORM sucks... if I were to use a
python ORM it will be SQLAlchemy hands down. I think the django "admin"
interface is just some fluff that is used for marketing. I know some people
use it in production, but you can create a custom admin interface in web2py
faster than you can "hack" the django admin do what you need it to do. I
don't think it is a matter of "syntatic sugar"... there is a real difference
in maintaining 70+ models in web2py vs SQLAlchemy... especially when these
models need to be shared between external scripts.

And for the situations...

If you have alot of complex models that require many to many relationships
and lots of joins... use an ORM, it is designed to handle complex
relationships between records.
If you have a few models, but lots of data that can be used directly... use
the DAL, it is memory/cpu efficient.



--
Thadeus




On Wed, Jan 26, 2011 at 2:05 PM, Albert Abril <albert.ab...@gmail.com>wrote:

> Just for embroil more...
> ...is possible in some way to use django template system, or jinja2 in
> web2py?
>
>
> On Wed, Jan 26, 2011 at 8:54 PM, cjrh <caleb.hatti...@gmail.com> wrote:
>
>> On Jan 26, 8:19 pm, VP <vtp2...@gmail.com> wrote:
>> > To be fair, the most popular option right now is SQLAlchemy, an ORM.
>> > DAL appears to be a minority approach.  So, ORM must be good at
>> > something right?
>>
>> No.  The number of people that support a thing has no bearing on that
>> thing's correctness.   None whatsoever.  Very large numbers of people
>> have supported really bad ideas throughout history, and even still
>> today.  Only the merits of the specific case before us matter, not how
>> much support can be found for various options.
>>
>> > To get web2py out of the PR's ditch, I think it's best to refrain from
>> > commenting on perceived weaknesses of Django and other technologies.
>>
>> Agreed.   All we need to do is build great sites.  And anyway, I don't
>> see why we need to care about Django *at all*.   Or any other
>> framework for that matter.   Why care?   Focus on the platform
>> available to us, i.e. HTTP (5?), CSS (3?), XML, Python (3?), and build
>> the best web development framework for that.   It doesn't hurt to
>> consult the open literature (Django, Flask, Pyramid, Pylons, web.py,
>> etc.), but the existing software is only a landmark on the route, not
>> a stumbling block in the road.
>
>
>

Reply via email to