new MVC web framework

new MVC web framework

am 20.12.2007 19:46:43 von mdipierro

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

Re: new MVC web framework

am 21.12.2007 10:48:28 von Erwin Moller

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


Gluon vs PHP

In PHP:

1.

Records

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 "$name
Phone:$phone



";
12. $i++;
13. }
14. ?>


In Gluon (<-- their system):
1. def contacts():
2. return
HTML(BODY(H1('Records'),SQLTABLE(db().select(db.contacts.ALL )))).xml()




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

Re: new MVC web framework

am 22.12.2007 09:31:23 von mdipierro

Sorry, it really was not my intention to spam. I assumed PHP programmers are
interested in new frameworks for web devlopment even if not in PHP. I also
wanted to give you a chance to reply to my criticism of PHP. If you want to
send me a better piece of code to compare with the Gluon one, I will use it.
Anyway, I agree this discusson does not belog here so I am dropping it.

Re: new MVC web framework

am 24.12.2007 18:59:15 von nc

Back in the old days, everyone wanted the world to see their CMS; now
everyone wants to write an MVC framework...

On Dec 20, 10:46 am, 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

OK, but give me a reason to bother... Why do you think you product is
better than, say, CakePHP, Symfony, or CodeIgniter?

Cheers,
NC

Re: new MVC web framework

am 25.12.2007 10:33:08 von mdipierro

Gluon was originally developed as a teaching tool with emphasys on
easy to use, although it evolved beyond that and it has some unique
feaures:

1) no installation (it is a single executable), no configuration
files, no shell commands, and all developement, deployment and
maintenance is done via a web interface (see screencast)
2) has a ticketing system. if your app has a bug it is logged, the
user is notified and ticket is issued so hat administrator can analyze
the log via the administrative interface.
3) Try the following complete code:

db=SQLDB('sqlite://file.db')
db.define_table('images',SQLField('file','upload'))
def index():
form=SQLFORM(db.images)
if form.accepts(request.vars,session): response.flash='image
uploaded'
return dict(form=form)

what does it do?
creates the database, creates the table (if it does not exists) or
alters the table (if description does not match), creates a web page
called index with an upload form for the image. When the visitor
clicks submit, the file is uploaded, renamed in a safe way, stored in
a file serverside, the name is stored in the database, and the user is
a notified. It also creates a session and handles it via a cookie.

Anyway, as I said, I agree with a previous post that this discussion
does not belong here. I am ansewring your post but I invite you to
submit further posts on the subject to the google gluon group list.

Merry Christmas.