Thread: Web application: Programming language/Framework
Hi all This is a bit off topic but I don't know where else to ask (please tell me if you know). I'm going to build a web application. The choice of the underlying database wasn't difficult. After a few preliminary tests I'm confident that PostgreSQL is absolutely up to the task. But I'm at a loss regarding the "middleware". I know Apache quite well, so I wouldn't mind continuing using it. But what language/application server/whatever do you recommend? Java/J2EE/JBoss, Struts, Perl, Python/Zope, PHP 5, XYZ...? There are a few prerequisits such a framework would have to meet: * Reasonably scalable. * Works well together with PostgreSQL. An abstraction layer which separates the SQL stuff from the rest probably wouldn't be bad either. * Security: * I don't like to worry to much about buffer overflows, SQL injections and the like when coding. * The framework shouldn't need a security update every few days. * Support for encryption at the web frontend side and possibly on the DB end (OpenSSL being my favorite). * Well established: Nothing that vanishes after a few months just because it was the latest craze. Something where you find documentation, mailing lists and a community. * Free (open source) and free (or reasonably priced with the possibility to change the provider). I've had my share of vendor lock-in. * Support for handling XML data as in- and output. * Separation of web frontend logic and web frontend design. * Ease of use is never bad. ;) I'm looking forward to your suggestions. Thanks Arthur
Hi, I am working on web applications based on PostgreSQL, Apache and PHP4 and Perl (and even in C/C++ sometimes). I prefer Perl, because it is easy to use and has lots and lots of ready-to-use modules for nearly any purpose. At the moment I am working on XML interfaces for data exchange between our customers and our application using an Apache webserver - pure perl (XML::Simple, XML::SAX, DBI and some other modules), and works like a charm. PHP seems to me to be not very open to third-party-modules, and sometimes not as reliable as Perl, and the buglist custodians of PHP do not convince me really. For web applications I usually use the following technique: My CGIs are rather complete serving applications which stay resident due to the use of FastCGI. They receive requests (by Apache), dispatch them to the appropriate subroutines, do some work with the request and deliver the results. Design is (nearly) completely separated from logic due to the use of CGI::FastTemplate. HTML is developed as pure HTML Template with variables which are filled by the CGI application in a very convenient and easy-to-use way. All parts I use are quite mature and available since several years. With Java I do not have lots of experience, so I cannot compare. Your and other people´s mileage may of course vary. Regards, Frank On Sat, 14 Aug 2004 15:10:48 +0200 Arthur van Dorp <arthur_vd@gmx.net> sat down, thought long and then wrote: > Hi all > > This is a bit off topic but I don't know where else to ask (please tell > me if you know). I'm going to build a web application. The choice of the > underlying database wasn't difficult. After a few preliminary tests I'm > confident that PostgreSQL is absolutely up to the task. But I'm at a > loss regarding the "middleware". I know Apache quite well, so I wouldn't > mind continuing using it. But what language/application server/whatever > do you recommend? Java/J2EE/JBoss, Struts, Perl, Python/Zope, PHP 5, > XYZ...? There are a few prerequisits such a framework would have to meet: > > * Reasonably scalable. > * Works well together with PostgreSQL. An abstraction layer which > separates the SQL stuff from the rest probably wouldn't be bad either. > * Security: > * I don't like to worry to much about buffer overflows, SQL > injections and the like when coding. > * The framework shouldn't need a security update every few days. > * Support for encryption at the web frontend side and possibly > on the DB end (OpenSSL being my favorite). > * Well established: Nothing that vanishes after a few months just > because it was the latest craze. Something where you find documentation, > mailing lists and a community. > * Free (open source) and free (or reasonably priced with the possibility > to change the provider). I've had my share of vendor lock-in. > * Support for handling XML data as in- and output. > * Separation of web frontend logic and web frontend design. > * Ease of use is never bad. ;) > > I'm looking forward to your suggestions. > Thanks > Arthur > > > ---------------------------(end of broadcast)--------------------------- > TIP 3: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly -- Frank Finner Invenius - Solutions in Linux Köpfchenstraße 36 57072 Siegen Telefon: 0271 231 8606 Mail: frank.finner@invenius.org Telefax: 0271 231 8608 Web: http://www.invenius.org Key fingerprint = 6A60 FA85 F670 4FC3 CD7C CED5 4F4C 72B1 54AC 165E
Attachment
Hi Arthur; Ah, the topic of flame wars. I program in Perl, Python, and PHP. I use them for different applications, but they are all good. Usually I use PHP for web apps, Perl and Python for other apps. But these are not hard and fast rules. Best Wishes, Chris Travers Metatron Technology Consulting ps Additional comments inline. Arthur van Dorp wrote: > Hi all > > This is a bit off topic but I don't know where else to ask (please tell > me if you know). I'm going to build a web application. The choice of the > underlying database wasn't difficult. After a few preliminary tests I'm > confident that PostgreSQL is absolutely up to the task. But I'm at a > loss regarding the "middleware". I know Apache quite well, so I wouldn't > mind continuing using it. But what language/application server/whatever > do you recommend? Java/J2EE/JBoss, Struts, Perl, Python/Zope, PHP 5, > XYZ...? There are a few prerequisits such a framework would have to meet: > > * Reasonably scalable. > * Works well together with PostgreSQL. An abstraction layer which > separates the SQL stuff from the rest probably wouldn't be bad either. > * Security: > * I don't like to worry to much about buffer overflows, SQL > injections and the like when coding. Buffer overruns are prevented in Perl, Python, and PHP. SQL injection attacks are a much larger issue though. > * The framework shouldn't need a security update every few days. > * Support for encryption at the web frontend side and possibly > on the DB end (OpenSSL being my favorite). > * Well established: Nothing that vanishes after a few months just > because it was the latest craze. Something where you find documentation, > mailing lists and a community. > * Free (open source) and free (or reasonably priced with the possibility > to change the provider). I've had my share of vendor lock-in. > * Support for handling XML data as in- and output. > * Separation of web frontend logic and web frontend design. > * Ease of use is never bad. ;) Otherwise, I like PHP, Perl, and Python.
Chris Travers wrote: > Hi Arthur; > > Ah, the topic of flame wars. > My company also does a great deal of web application programming. Rule of thumb for us is: Anything system/administrative level goes in Perl. Anything application/oo or server level (triggeres for example, or processes) go in Python Anything Web goes in PHP (Although we are rethinking that do to the constant OO issues with PHP). Sincerely, Joshua D. Drake > I program in Perl, Python, and PHP. I use them for different > applications, but they are all good. Usually I use PHP for web apps, > Perl and Python for other apps. But these are not hard and fast rules. > > Best Wishes, > Chris Travers > Metatron Technology Consulting > > ps Additional comments inline. > > Arthur van Dorp wrote: > >> Hi all >> >> This is a bit off topic but I don't know where else to ask (please tell >> me if you know). I'm going to build a web application. The choice of the >> underlying database wasn't difficult. After a few preliminary tests I'm >> confident that PostgreSQL is absolutely up to the task. But I'm at a >> loss regarding the "middleware". I know Apache quite well, so I wouldn't >> mind continuing using it. But what language/application server/whatever >> do you recommend? Java/J2EE/JBoss, Struts, Perl, Python/Zope, PHP 5, >> XYZ...? There are a few prerequisits such a framework would have to >> meet: >> >> * Reasonably scalable. >> * Works well together with PostgreSQL. An abstraction layer which >> separates the SQL stuff from the rest probably wouldn't be bad either. >> * Security: >> * I don't like to worry to much about buffer overflows, SQL >> injections and the like when coding. > > > Buffer overruns are prevented in Perl, Python, and PHP. SQL injection > attacks are a much larger issue though. > >> * The framework shouldn't need a security update every few days. >> * Support for encryption at the web frontend side and possibly >> on the DB end (OpenSSL being my favorite). >> * Well established: Nothing that vanishes after a few months just >> because it was the latest craze. Something where you find documentation, >> mailing lists and a community. >> * Free (open source) and free (or reasonably priced with the possibility >> to change the provider). I've had my share of vendor lock-in. >> * Support for handling XML data as in- and output. >> * Separation of web frontend logic and web frontend design. >> * Ease of use is never bad. ;) > > > > Otherwise, I like PHP, Perl, and Python. > > > > ---------------------------(end of broadcast)--------------------------- > TIP 5: Have you checked our extensive FAQ? > > http://www.postgresql.org/docs/faqs/FAQ.html -- 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@commandprompt.com - http://www.commandprompt.com PostgreSQL Replicator -- production quality replication for PostgreSQL
On Sat, 2004-08-14 at 11:02, Joshua D. Drake wrote: > Chris Travers wrote: > > > Hi Arthur; > > > > Ah, the topic of flame wars. > > > My company also does a great deal of web application programming. Rule > of thumb for us is: > > Anything system/administrative level goes in Perl. > Anything application/oo or server level (triggeres for example, or > processes) go in Python > Anything Web goes in PHP (Although we are rethinking that do to the > constant OO issues with PHP). > That's why PHP 5 exists. :-) -Robby -- /*************************************** * Robby Russell | Owner.Developer.Geek * PLANET ARGON | www.planetargon.com * Portland, OR | robby@planetargon.com * 503.351.4730 | blog.planetargon.com * PHP/PostgreSQL Hosting & Development ****************************************/
Attachment
>That's why PHP 5 exists. :-) > > > When it proves stable ;). Although it still does have some issues with Apache 2. Which is a shame. To be fair, it isn't really PHP that has the problems but some of the libraries it uses are thread safe. Sincerely, Joshua D. Drake >-Robby > > > > -- 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@commandprompt.com - http://www.commandprompt.com PostgreSQL Replicator -- production quality replication for PostgreSQL
On Sat, 2004-08-14 at 12:18, Joshua D. Drake wrote: > >That's why PHP 5 exists. :-) > > > > > > > When it proves stable ;). Although it still does have some issues with > Apache 2. Which is a shame. But your OO problems exist in a *stable* 4.x? I'm running with Apache 2 and haven't come across any issues yet. (perhaps i haven't tapped into those bad libs yet). The benefits of the new OO functionality is definitely a huge improvement and that makes it more *stable* than 4.x in my opinion. > To be fair, it isn't really PHP that has the problems but some of the > libraries it uses are thread safe. From what I recall these same issues existed in 4.x as well, so 5 shouldn't make much of a difference. -Robby -- /*************************************** * Robby Russell | Owner.Developer.Geek * PLANET ARGON | www.planetargon.com * Portland, OR | robby@planetargon.com * 503.351.4730 | blog.planetargon.com * PHP/PostgreSQL Hosting & Development ****************************************/
Attachment
On Sat, 2004-08-14 at 12:37, Robby Russell wrote: > On Sat, 2004-08-14 at 12:18, Joshua D. Drake wrote: > > >That's why PHP 5 exists. :-) > > > > > > > > > > > When it proves stable ;). Although it still does have some issues with > > Apache 2. Which is a shame. > > But your OO problems exist in a *stable* 4.x? I'm running with Apache 2 > and haven't come across any issues yet. (perhaps i haven't tapped into > those bad libs yet). The benefits of the new OO functionality is > definitely a huge improvement and that makes it more *stable* than 4.x > in my opinion. > > > To be fair, it isn't really PHP that has the problems but some of the > > libraries it uses are thread safe. > > From what I recall these same issues existed in 4.x as well, so 5 > shouldn't make much of a difference. > > -Robby Also, prefork exists for this problem as well: http://httpd.apache.org/docs-2.0/mod/prefork.html -Robby -- /*************************************** * Robby Russell | Owner.Developer.Geek * PLANET ARGON | www.planetargon.com * Portland, OR | robby@planetargon.com * 503.351.4730 | blog.planetargon.com * PHP/PostgreSQL Hosting & Development ****************************************/
Attachment
PHP is a very weak language... I'd advise mod_python or skunkweb, if you don't know Python, learn it, you won't be disappointed !
Off course PHP is a very weak language... Is than weak that SF.net have 9144 PHP projects and 3292 Python projects. Python is a very good language, but is discourteous (or that is a signal of knowledge lack) to speak that 'php is a very weak language', when knows that exist so many PHP programmers in this list. Futhermore, this subject is not part of this list. Pierre-Frédéric Caillaud wrote: > > PHP is a very weak language... I'd advise mod_python or skunkweb, > if you don't know Python, learn it, you won't be disappointed ! > > > > ---------------------------(end of broadcast)--------------------------- > TIP 2: you can get off all lists at once with the unregister command > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org) > > -- Gustavo Franklin Nóbrega Infra Estrutura - Banco de Dados Planae - Tecnologia Da Informação Fone/Fax +55 14 3224-3066 Ramal : 210 http://www.planae.com.br
By "weak", I meant "lack of expressive power", not "weakly supported". That PHP has a huge community is obvious. It's everywhere. The list of broken things in PHP is too long to mention, just think about namespaces for instance. I have no bad feelings towards people who use PHP, rather I wonder why so many people waste their time with such a badly designed tool. I did not intend to be discourteous, my excuses if I was, rather, I wanted to help the OP out of the PHP mess. I have had to code in PHP and always hated it. I know this is off-topic so... snip. On Tue, 17 Aug 2004 11:15:18 -0300, Gustavo Franklin Nóbrega - PLANAE <gfnobrega@planae.com.br> wrote: > Off course PHP is a very weak language... Is than weak that SF.net have > 9144 PHP projects and 3292 Python projects. Python is a very good > language, but is discourteous (or that is a signal of knowledge lack) to > speak that 'php is a very weak language', when knows that exist so many > PHP programmers in this list. Futhermore, this subject is not part > of this list.
Just a little on the history of the tools might be helpful. I think that these environments are easy to criticize by people who are not really aware of what the tools are really good for. PHP: This is worth noting in the context of this thread though fairly off-topic for the list. PHP was designed initially to be a sort of preprocessor for arbitrary document types. I don't really use it for much system scripting (Perl is better for that) but for web applications, it works extremely well. After all, most of your content may be static, and you are really interested in modifying the static content by preprocessing it. I prefer PHP because it can easily be embedded in arbitrary document types and used to modify them. I am starting to use it more and more for LaTeX documents as well (though I have some automated tools which can do more simple manupulations using Perl). This is what the tool is designed for. Complaining about PHP's namespaces seems to me to be complaining about the fact that a crescent wrench doesn't pound nails very well.... Not that you can't pound nails with a crescent wrench but there are more efficient ways to do it. Perl: Perl was originally designed as a tool for processing text files on a UNIX system. Bear in mind that this is an incredibly useful concept as everything is a file :-). It is also designed to take the information and generate reports. So early on, people discovered that Perl made a pretty useful CGI programming environment because these tools make it easy to generate HTML. Like PHP, it has an extensive community and a lot of add-on modules. However, it is fundamentally different. For an extremely complex web app I might consider using Perl if I needed some sort of exotic functionality, like Kerberos integration. Such is usuallly cleaner than PHP extensions. Perl also makes a wonderful language for automates system administration tasks because of its text parsing capabilities and the fact that these are integrated into the language as operators rather than functions. Python: Python is a generic programming environment. I really like it where I am not doing automated document preparation, or where I need something far more general than automated document generation (PHP or Perl). In general, I prefer Python for interactive (non-web) applications. Each of these environments has good PostgreSQL support. Pierre-Frédéric Caillaud wrote: > > By "weak", I meant "lack of expressive power", not "weakly > supported". That PHP has a huge community is obvious. It's > everywhere. The list of broken things in PHP is too long to mention, > just think about namespaces for instance. I have no bad feelings > towards people who use PHP, rather I wonder why so many people waste > their time with such a badly designed tool. I did not intend to be > discourteous, my excuses if I was, rather, I wanted to help the OP > out of the PHP mess. > I have had to code in PHP and always hated it. > > I know this is off-topic so... snip. > > On Tue, 17 Aug 2004 11:15:18 -0300, Gustavo Franklin Nóbrega - PLANAE > <gfnobrega@planae.com.br> wrote: > >> Off course PHP is a very weak language... Is than weak that SF.net >> have 9144 PHP projects and 3292 Python projects. Python is a very >> good language, but is discourteous (or that is a signal of knowledge >> lack) to speak that 'php is a very weak language', when knows that >> exist so many PHP programmers in this list. Futhermore, this >> subject is not part of this list. > > > ---------------------------(end of broadcast)--------------------------- > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org > >
Hi all I've got a lot of feedback to my question about the ideal web application framework on- and off-list and would like to summarize it a bit for future reference. But first thank you all very much for your help. You've made a blissfully ignorant and indecisive person a somewhat better informed and indecisive person. ;) Java/Perl/Python/PHP based frameworks all exist and every language is used somewhere in a big project with huge numbers of dynamic content generated. So all of them are quite powerful. I'll just put all the projects that got named in a list, everything is easily found with google. Not all of them are frameworks in themselves, some even use other projects named here, some are just useful tools. Sorry for not giving any details about each framework. For java www.waferproject.org has a nice overview. Java: Struts / Faces / Cocoon / WebWork / Tapestry / Turbine / Velocity / Jakarta/Tomcat / Webobjects(proprietary) / Expresso / JPublish / Sofia A nice overview is here at http://www.waferproject.org/feature-matrix2.html Perl: Mason / Bricolage / mod_perl / Fast_CGI / bivio / openframe A good starting point is http://perl.apache.org/products/app-server.html Python: Zope / Quixote / mod_python / skunkweb PHP: phpwebapp / horde / logicreate Thanks again and have fun Arthur
Maybe I missed something, but why isn't postgreSQL,aolserver,tcl on your list? That will be my choice to deliver web applications in the near future. Brgds --- Arthur van Dorp <arthur_vd@gmx.net> wrote: > Hi all > > I've got a lot of feedback to my question about the > ideal web > application framework on- and off-list and would > like to summarize it a > bit for future reference. But first thank you all > very much for your > help. You've made a blissfully ignorant and > indecisive person a somewhat > better informed and indecisive person. ;) > > Java/Perl/Python/PHP based frameworks all exist and > every language is > used somewhere in a big project with huge numbers of > dynamic content > generated. So all of them are quite powerful. > > I'll just put all the projects that got named in a > list, everything is > easily found with google. Not all of them are > frameworks in themselves, > some even use other projects named here, some are > just useful tools. > Sorry for not giving any details about each > framework. For java > www.waferproject.org has a nice overview. > > Java: > Struts / Faces / Cocoon / WebWork / Tapestry / > Turbine / Velocity / > Jakarta/Tomcat / Webobjects(proprietary) / Expresso > / JPublish / Sofia > A nice overview is here at > http://www.waferproject.org/feature-matrix2.html > > Perl: > Mason / Bricolage / mod_perl / Fast_CGI / bivio / > openframe > A good starting point is > http://perl.apache.org/products/app-server.html > > Python: > Zope / Quixote / mod_python / skunkweb > > PHP: > phpwebapp / horde / logicreate > > Thanks again and have fun > Arthur > > > > > ---------------------------(end of > broadcast)--------------------------- > TIP 4: Don't 'kill -9' the postmaster > __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail
> Maybe I missed something, but why isn't > postgreSQL,aolserver,tcl on your list? > That will be my choice to deliver web applications in > the near future. Because nobody told me about it. ;) And I can assure you that there are many many more frameworks around. So many that I wonder whether I shouldn't just write my own, it must be very simple that almost everyone has done so. Arthur
Re: Web application: Programming language/Framework: Summary
From
merlyn@stonehenge.com (Randal L. Schwartz)
Date:
>>>>> "Arthur" == Arthur van Dorp <arthur_vd@gmx.net> writes: Arthur> And I can assure you that there Arthur> are many many more frameworks around. So many that I wonder whether I Arthur> shouldn't just write my own, it must be very simple that almost Arthur> everyone has done so. If I can give you some insight from the Perl world (where there are 57 different templating systems and counting)... It's very *easy* to start a framework. It gets harder to hit that 80/20 point, where you're using it more than fiddling with it. It gets *really* hard to make it general enough for others to use it outside your direct range of experience. For example, TemplateToolkit (on which OpenFrame is based, and Bricolage will at least nod to, and on which Slashcode depends) took a hella lot of work, and thus begins to be the thing everyone can use. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 <merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/> Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
I can heartily recommend the Template Toolkit if you go with a perl based solution. I also strongly suggest not writing your own from scratch. It's not simple at all to build a web based application server. We used the Template Toolkit as the base for an ecommerce centric application server (shopping cart) and it took us 6 months of development to add on everything we needed (granted we added quite a bit). If we had not started with a solid base like Template Toolkit, we could have added on another year easily by the time all the bugs were worked out. Mason is the other perl application platform I would suggest, and it's actively developed and used on some very large sites. The main reason we chose the Template Toolkit is because the template language is more similar to php/asp, so our clients that use it don't have as much of a learning curve. I wasn't personally impressed with the remaining perl based web application frameworks when compared to Template Toolkit and Mason. They seem to be pretty far ahead of the rest in most areas. Personally I just don't like PHP compared to the alternatives, but that's my own bias which is probably rooted in misinformatin, but I can live with that:) I do like Python. We dont' use it that much at, but we have used Zope which is a very nice platform and it is written in Python. Java is just too much for most small/medium sized applications. I like Java, but it requires more resources all the way around. Java programmers charge more, it takes more development time than say php, perl, or python to accomplish the same thing, and in my experience it's just flat out more expensive to develop and maintain a java application. aolserver and tcl are nice, but there are a lot more people using perl/python/php, which means more resources are available for those languages any way you look at it. Chris > Arthur> And I can assure you that there > Arthur> are many many more frameworks around. So many that I wonder whether I > Arthur> shouldn't just write my own, it must be very simple that almost > Arthur> everyone has done so. > > If I can give you some insight from the Perl world (where there are 57 > different templating systems and counting)... > > It's very *easy* to start a framework. It gets harder to hit that > 80/20 point, where you're using it more than fiddling with it. It > gets *really* hard to make it general enough for others to use it > outside your direct range of experience. > > For example, TemplateToolkit (on which OpenFrame is based, and > Bricolage will at least nod to, and on which Slashcode depends) took a > hella lot of work, and thus begins to be the thing everyone can use. > > -- > Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 > <merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/> > Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. > See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! > > ---------------------------(end of broadcast)--------------------------- > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org >
Arthur van Dorp wrote: > PHP: > phpwebapp / horde / logicreate Ariadne Regards Gaetano Mendola
Arthur van Dorp wrote: > PHP: > phpwebapp / horde / logicreate Also, don't forget the Smarty template engine (http://smarty.php.net). Written in PHP it compiles templates into PHP. This is my personal favourite template system, very fast and flexible. -- Mark Gibson <gibsonm |AT| cromwell |DOT| co |DOT| uk> Web Developer & Database Admin Cromwell Tools Ltd. Leicester, England.