[development] Extend database abstraction layer, to include table creation.

Gary (Lists) listout at accidentaltechie.org
Sat May 13 16:28:42 UTC 2006

"Adrian Rossouw" wrote:

> ---
> The original (55 lines long)
> ---

> ---
> the new version (28 lines)
> ---

;)  Okay, lines is perhaps not the best quantitative statistic to compare
code length.  These data give the impression that 'new' is about 1/2 the
size of 'old'.

But if we consider character count (perhaps a better measure of human effort
considering the keystrokes, anyway):

new = 1319
old = 1886

Not much of a difference on that level, or not 'as much' of a difference.

On the other -- qualitative level -- frankly the 'new' version is much more
complicated to read, to my eye.

Also, it introduces a greater amount of complexity just to _type_ that 'new'
code model.

The good thing about the 'old' sample is that the SQL queries represented
there are actually transportable -- one can easily copy and paste that DB
creation statement, for example, for testing elsewhere, and vice versa.

The 'new' form suggestion seems, to me, very much more cumbersome to read,
debug and transport.

Granted, I am not speaking to any notion of code efficiency regarding
run-time execution or even to any notion of what is more "standard" or
practical over the long term.


...who really would love to see Drupal made easier to use, for the actual
end user.  PHP programmers love to tweak, change, experiment, and shave
micro-seconds off of things, so that's great.  But none of that is really
making Drupal itself any _easier_ and _more attractive_ to actually use.

Lurking and reading the recent discussion has been very useful.  There
clearly are some very divergent energies about the vision of the future of
Drupal, and I am squarely in the "make it easier, improve themes" camp.

More information about the development mailing list