News for hackers. Stuff that matters.
Re:PHP: A fractal of bad design by comex on Tuesday April 10, 2012 @01:35AM (#3820854)
With PHP, creating a new "app" is a matter of sticking a .php file in a directory. There is no config file, directory structure, or server to babysit, and nothing to restart after modifications. Instead of using a complicated templating system, you just include HTML inline.

This is a horrible design for a large webapp, but even as an experienced programmer, sometimes I just want a quick hacky self-contained script, like the many, many .py files in a subdirectory of my home directory (but on the web, Python does not provide this convenience in commonly used setups). A beginner can similarly benefit from simplicity: even if Rails tutorial code is pretty, there is still a lot going on behind the scenes; sometimes, the smaller conceptual model required to really understand what's going on, the better.

Re:PHP: A fractal of bad design by slurgfest on Tuesday April 10, 2012 @05:17AM (#3821406)
"Sticking a php file in a directory" is just a matter of server config, not languages. There is no reason why you can't put a quick Python web app in a single file which exposes just one WSGI application object named 'application' - so if the server complied, you could indeed just stick the .py file in a certain magical directory.
Re:PHP: A fractal of bad design by ThomPete on Tuesday April 10, 2012 @09:32AM (#3822060)
Then why haven't anyone done it?

Cause as a designer who programs (mainly php) that is the number one reason why I haven't been learning a new language.

They all require way too much. Php just works for my needs. If I get bigger needs then I am sure I will make the switch to another language.

Re:PHP: A fractal of bad design by Xylakant on Tuesday April 10, 2012 @10:30AM (#3822299)
> Then why haven't anyone done it?

It's been done times and times again. Look at Sinatra for an example in the ruby world (http://www.sinatrarb.com/), I'm sure python has something similar. Maybe a static site generator such as octopress or push would be an option as well.

The problem is that the simple php approach does not scale. Sticking files in directories will only get you a small step, you'll need includes to share code soon. And then the mess starts if you're not using a framework. And good PHP frameworks go a long way beyond sticking a file in a directory - you'll have the same steep learning curve as with rails or something similar.

Re:PHP: A fractal of bad design by drivebyacct2 on Tuesday April 10, 2012 @09:38AM (#3822093)
>They all require way too much. Php just works for my needs.

What? I understand for a beginner, but come on. If you're really a programmer programming for many hours aday... you really won't take the time to learn how to wire up wsgi to a python process? It's no harder than wiring Apache up to mod_php5 and telling it where to serve out of. It just takes a very modest effort on your part to learn it.

And then you get all the benefits of... not having to use PHP and getting to use... anything else.