Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Michael Maclean:
Why one-line installers are a bad idea
Sep 21, 2012 @ 16:35:29

There's a feature that's usage has been showing up more and more in software projects (both open source and not) that allows you to install their system with a single line command, usually involving curl and maybe piping it to a shell. In this recent post Michael Maclean takes a look at this trend and some of the possible pitfalls of the approach.

There has been a trend in the last while for various bits of useful software to have a one-line shell command recommended as the installation method. The usual form of this is to pipe something like curl or wget to some interpreter, be it bash, php, ruby, or some such. [...] This [type of] command takes the output of curl and pipes it straight to bash. I have several issues with this.

His three main points center around the fact that you cannot inspect the code before executing it with this method, that you can't verify the source of the code and that it teaches users bad habits of trusting in "magic commands" like these.

tagged: installer oneline opinion curl bash shell magic

Link:

Symfony Blog:
The State of Symfony 2 Online Conference
Jun 03, 2010 @ 17:46:13

On the Symfony blog there's a recent post mentioning an online conference offering a look into the current state of the Symfony framework and what's coming in the future.

During The State of Symfony 2 you will learn about the current state of the brand new version of Symfony, scheduled for release late this year. Several important parts of Symfony 2 will be highlighted by prominent speakers. And at the end of the conference, the second Preview Release of Symfony 2 will be published, including updated documentation!

Several guest speakers - including Fabien Potencier and Jonathan Wage - will be talking about the future of the framework and how it will integrate with other technologies (like Doctrine). There's two times you can catch the event - one on June 22nd @ 10am and the other is June 23rd @ 5pm (all times are Central Eurpoean Time). The registration will cost 30 Euro for the normal ticket, 20 for Early Bird (first 50 people to register).

tagged: symfony state oneline conference

Link:

PHP in Action:
The one-line web framework
Dec 16, 2008 @ 18:09:42

On the PHP in Action blog this new post talks about something that's at the core of the front controller for most frameworks - a call to a user function based on the passed in action.

The core of your average web framework is a Front Controller. Front Controllers are commonly considered complex and esoteric. That's a myth. I sometimes brag that I can construct a Front Controller in 15 minutes. Actually, it's doesn't take quite that long. In PHP, a Front Controller can be simplified to just one line of code.

This one line of code, while a very dangerous thing to actually use in an application, illustrates what a front controller does to forward out the request to the rest of the framework. He revises it with a Zend Framework-ish example that splits the request out into a controller/action method.

tagged: web application framework action controller frontcontroller oneline

Link:

Adam Trachtenberg's Blog:
Stupid PHP one liners: Google calc
Aug 24, 2006 @ 12:22:10

One-liners can sometimes be quite helpful in your programming, and in hopes it will help someone out there out, Adam Trachtenberg shares one of his own in his latest blog entry today.

A long time ago, I wrote a two line hack that let you use Google as a command line calculator. It eventually ended up in the 2nd and 3rd editions of Google Hacks.

The code calls the Google Calculator page and pulls back in the contents, allowing you to pass in any sort of calulation you might want and pass back out the result all cleaned up and parsed out.

tagged: oneline google calculator commandline file_get_contents regular expression oneline google calculator commandline file_get_contents regular expression

Link:

Adam Trachtenberg's Blog:
Stupid PHP one liners: Google calc
Aug 24, 2006 @ 12:22:10

One-liners can sometimes be quite helpful in your programming, and in hopes it will help someone out there out, Adam Trachtenberg shares one of his own in his latest blog entry today.

A long time ago, I wrote a two line hack that let you use Google as a command line calculator. It eventually ended up in the 2nd and 3rd editions of Google Hacks.

The code calls the Google Calculator page and pulls back in the contents, allowing you to pass in any sort of calulation you might want and pass back out the result all cleaned up and parsed out.

tagged: oneline google calculator commandline file_get_contents regular expression oneline google calculator commandline file_get_contents regular expression

Link:


Trending Topics: