Re: Frameworks



On Oct 19, 9:01 am, flebber <flebber.c...@xxxxxxxxx> wrote:
In short it seems to me that Django and Web2py include more "magic" in
assisting oneself to create you web/application, whilst Pylons and
Werkzueg leave more control in the users hands hopefully leading to
greater expression and power.

it depends on how one defines "magic". web2py provides a DAL, not an
ORM. DAL expressions translate one-to-one into SQL statements in the
appropriate dialect (or GQL on GAE), no more, without additional
superstructure. The basic API are

db.tablename.insert(filename=value)
db(query).select(...)
db(query).update(...)
db(query).delete()
db(query).count()

an example of query is

query=(db.tablename.fieldname=='value')|(db.tablename.fieldname.like
('A%'))

which translates into

WEHERE tablename.fieldname = 'value' OR tablename.fieldname LIKE 'A
%'

with the appropriate escaping for security or course.


Of course you can more complex expressions for nested selects, joins,
left joins, aggregates, etc. but the general principle stands. Here is
an example:


db().select(db.table1.field1,db.table1.field2.sum
(),groupby=db.table1.field1)

and another (which does a nested select, a join and a left join):

db((db.table1.field1.belongs(db(db.table2.field2.id>0)._select
(db.table2.field3)))&
(db.table1.field4==db.table3.field5)).select
(
db.table1.ALL,db.table2.field6,
left=db.table4.on
(db.table4.field6==db.table1.field7),
orderby=db.table1.field8)



.



Relevant Pages

  • Re: Moving controls programatially
    ... also down loaded the font that you suggested just in case I need it. ... (I know I need to iterate though the controls, but how do I get to the one I ... Also I am having no success with moving the control left or right. ... expressions can do a lot so you mightbe able to ...
    (microsoft.public.access.formscoding)
  • Re: Moving controls programatially
    ... I have built a form that is a working two week time span ... Also I am having no success with moving the control left or right. ... expressions can do a lot so you mightbe able to ... That depends on setting the text box's Font to a fixed width ...
    (microsoft.public.access.formscoding)
  • Re: Making Lines and design boxes visible on printing in word
    ... expressions to control the data.Now my question is What is the right syntax ... the syntax of that expression. ... effect on other areas of a report. ...
    (microsoft.public.access.reports)
  • RE: Percentages...gone awry.
    ... those record sources." ... Right Click on a control you want to show as ... Select the Format property. ... > Let me know if this helps, then we can get on to the expressions. ...
    (microsoft.public.access.forms)
  • [PATCH] Add BUILD_BUG_ON_NOT_POWER_OF_2()
    ... and risking gcc warts about constant expressions, ... be a power of two is a very common one in the kernel. ... specific helper macros, so I guess this fits right in. ... /* Force a compilation error if condition is true, ...
    (Linux-Kernel)