Re: [pgsql-www] PostgreSQL.org Design Proposal

From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: Alexey Borzov <borz_off(at)cs(dot)msu(dot)su>
Cc: Josh Berkus <josh(at)agliodbs(dot)com>, pgsql-advocacy(at)postgresql(dot)org
Subject: Re: [pgsql-www] PostgreSQL.org Design Proposal
Date: 2004-11-02 11:16:17
Message-ID: 41876C81.2040007@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-advocacy pgsql-www

>
>
>>
>>
>> BTW I don't know if anyone noticed but FrameWerk was a prizewinner with
>> the PHP 5 coding contest.. so go Gavin.
>
>
> Yes, it has achieved a whopping 18th place (out of 50).

I am sorry, did you have an entry in the contest that placed?

>
> I've downloaded Framewerk and gave it a quick review. There are some
> Bad Code Smells that will make it hard to manage in the long run:
>
> 1) HTML generated as PHP strings;
> It is not necessary to use some "template engine" but code
> generating data structures for output should be separate from code
> outputting this data which can be e.g. HTML file with minimal PHP.
> Changing the design done in the following way is *extremely* difficult:
>
> $ret .= "\n<form name='edit' action='$this->action'
> method='$this->method'>\n";
> $ret .= "<blockquote><table class='form' width='98%'
> border='0'>\n";
> foreach($this->fields as $field)
> {
> $ret .= " <tr valign='top'>\n";
> $ret .= " <td class=\"formitem\"";

Yea I would have to agree with this one, but I am sure that Gavin
appreciates the feedback.

>
> 2) Usage of homegrown i18n solution rather than some established ones
> Isn't it obvious from the first glance what this string does?
> {!i18n:visitors:{(at)visitors}}

Well there may actually be a good reason for this.

>
> 3) Abstraction of DB API rather than usage of proper data access layer
> This is BTW the reason for poor PostgreSQL support in most PHP
> applications: their authors use such "abstraction layers", but design
> schema for MySQL and then just do minimal "translation" of queries
> they do. Upper levels should know nothing about SQL and just call
> lower level to fetch some data.

Well I am sure Gavin isn't suffering from the translation of queries
issue but there is a lot of good reasons to abstract the DB API.

>
> 4) Lack of consistent coding standards.
> One can say many bad things about PEAR, but its code is at least
> readable and one always knows where to find things.

The product isn't even 1.0 yet and very few people are using it. If you
are unhappy with it, why not donate some resources
and help make it a better product?

Sincerely,

Joshua D. Drake

>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: the planner will ignore your desire to choose an index scan if
> your
> joining column's datatypes do not match

--
Command Prompt, Inc., home of Mammoth PostgreSQL - S/ODBC and S/JDBC
Postgresql support, programming shared hosting and dedicated hosting.
+1-503-667-4564 - jd(at)commandprompt(dot)com - http://www.commandprompt.com
PostgreSQL Replicator -- production quality replication for PostgreSQL

Attachment Content-Type Size
jd.vcf text/x-vcard 285 bytes

In response to

Responses

Browse pgsql-advocacy by date

  From Date Subject
Next Message Robert Treat 2004-11-02 15:25:05 Re: creating an informix job bank
Previous Message Robert Bernier 2004-11-02 10:41:38 creating an informix job bank

Browse pgsql-www by date

  From Date Subject
Next Message Martín Marqués 2004-11-02 11:25:25 No link
Previous Message Joshua D. Drake 2004-11-02 11:06:32 Re: Inadequate hosting for www.postgresql.org?