LWN.net Logo

PHP 5.4.0 released

PHP 5.4.0 released

Posted Mar 8, 2012 18:01 UTC (Thu) by sorpigal (subscriber, #36106)
In reply to: PHP 5.4.0 released by Kit
Parent article: PHP 5.4.0 released

So what language is actually better suited for the job that PHP is used for all the time

Perl is better.

But Perl by itself is an incomplete solution. Almost all competing 'better' languages are incomplete solutions compared to PHP. Today I would advocate Mojolicious::Lite as a Perl-based simple PHP alternative.

It allows the 'developer' to write in one file the template and the code and it makes viewing the result in a web browser equally trivial.

# aptitude install libmojolicious-perl
# ^D
$ mojo generate lite_app HelloWorld
$ ./HelloWorld daemon -l http://*:8080 & firefox http://127.0.0.1:8080/welcome & gedit HelloWorld 

And I'm viewing and editing my one-page quick and dirty web site. Initially it's slightly more trouble than PHP for vastly superior results, making it very nearly as good for the ignorant beginner.


(Log in to post comments)

PHP 5.4.0 released

Posted Mar 9, 2012 1:25 UTC (Fri) by Cyberax (✭ supporter ✭, #52523) [Link]

Django, Python:
apt-get install python-django
django-admin.py startproject mysite
python manage.py runserver
That's it. You get a site with support for localization, specialized admin interface, a decent built-in ORM, etc.

PHP 5.4.0 released

Posted Mar 9, 2012 22:56 UTC (Fri) by sorpigal (subscriber, #36106) [Link]

Right, same idea: Good language plus framework almost trumps php's low barrier to entry at a much higher quality.

PHP 5.4.0 released

Posted Mar 12, 2012 21:54 UTC (Mon) by dmarti (subscriber, #11625) [Link]

Yes, the development server is extremely easy, but actually deploying means getting into the finer points of WSGI and either making your own distro-level packages for your dependencies or setting up virtualenv. (Still trying to figure out why all my Django application's static files are 404 when I go through Apache but work fine with "runserver".) Once you get into Django, the actual application code is way cleaner, and the ORM is fine, but PHP's deployment model is easier to get started with.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds