phpgroupware-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [phpGroupWare-developers] Google Summer of Code


From: Dave Hall
Subject: Re: [phpGroupWare-developers] Google Summer of Code
Date: Wed, 27 Feb 2008 15:23:25 +1100

On Tue, 2008-02-26 at 14:27 +0100, christian bac wrote:
> Le mardi 26 février 2008 à 22:42 +1100, Dave Hall a écrit :
> > Hi all,
> > 
> 
> > The ideas should be for generic API functionality which is useful across
> > modules or a new feature for a module which should be attractive to a
> > broad section of our user base.  
> > 
> > So start thinking and suggesting :)
> > 
> for picoforge v2, I have writen a generic classe called sqltable that
> manages any sqltable. 
> My first aim was to avoid errors in insert or select clauses, when one
> asks for a bad field.

this is something that I have thought about for phpgw, but never got
much further than the ideas phase.  We already have a bad implementation
of this is in eTemplates.

> This sqltable, provides sql statements (select, insert) and other
> methods like count.

I had a look at it, a problem which lept out at me was that there didn't
appear to be any support for joins.  I think joins are becoming
increasingly important with phpgw.  Without them we have to make php do
too much of the heavy lifting.

> Soclasses then derives from this class, with a generic way of calling
> function (see bits of code).
> 
> Advantages: this is very simple to add a table and manage it with a
> soclass, there is only one class to fix when there is a sql bug.

Very true - the same could be said for a form builder, handle
validation, security and rendering in 1 place :)

> Potential problems: this class introduces an overhead due to the parsing
> of parameters, it has only be tested with mysql even though it uses the
> db class of phpgroupware.

I think it should "automagically" handle escaping/casting based on the
schema (or some other data source).  This would help improve security.

> Now an idea for a summer of code: try to integrate that generic class to
> some soclasses in phpgroupware.

I think that would work for a simple module - like say notes, but not
something complex like say addressbook.

I think something along the lines of improved db handling would be a
worthwhile project, with some of the sqltable code being used as the
basis for it.

Cheers

Dave





reply via email to

[Prev in Thread] Current Thread [Next in Thread]