|
Posted by Erwin Moller on 12/21/07 09:48
mdipierro wrote:
> I apologize for the intrusion but I thought you may be interested in
> this: http://mdp.cti.depaul.edu
> Here is a creencast: http://www.vimeo.com/428474
LOL, Bad spam.
I had a look at the site for you all and here is my impression.
1) It is written in Python, not PHP
2) It contains totally unfair comparisons to PHP in a desperate attempt
to look more cool/advanced than PHP.
Only newbies/idiots program PHP in the way they use in their comparison.
An example:
from http://mdp.cti.depaul.edu/examples/default/gluon_vs_php
<quote>
Gluon vs PHP
In PHP:
1. <html><body><h1>Records</h1><?
2. mysql_connect(localhost,username,password);
3. @mysql_select_db(database) or die( "Unable to select database");
4. $query="SELECT * FROM contacts";
5. $result=mysql_query($query);
6. mysql_close();
7. $i=0;
8. while ($i < mysql_numrows($result)) {
9. $name=mysql_result($result,$i,"name");
10. $phone=mysql_result($result,$i,"phone");
11. echo "<b>$name</b><br>Phone:$phone<br><br><hr><br>";
12. $i++;
13. }
14. ?></body></html>
In Gluon (<-- their system):
1. def contacts():
2. return
HTML(BODY(H1('Records'),SQLTABLE(db().select(db.contacts.ALL)))).xml()
</quote>
Have a look at the silly PHP-code.
I like the handling of $i the best. ;-)
Also the $name=mysql_result($result,$i,"name"); is very usefull in this
context.
Why not use it at once in the echo?
They really did a good job increasing the number of lines needed.
They also left conveniently out their own db-connection stuff.
Last observation: They are very proud of their SQLTABLE-function, that
parses any resultset in a table! WOW! How many seconds does an
experienced PHP programmer need to build such a function against mysql?
five? 10 max?
If that piece of PHP-code is a sample of their codequality, I don't have
to see their Python-code.
Really, if you want to push your MCV thingy in a php newsgroup, at least
make a fair comparison.
LOL.
Regards,
Erwin Moller
Navigation:
[Reply to this message]
|