News Feed
Jobs Feed
Sections




News Archive
feed this:

Thomas Buck:
Tom's PHP Commandments - Take heed
April 17, 2013 @ 12:23:20

Thomas Buck has put together what he calls "Tom's PHP Commandments" (nine of them) that developers should follow when developing applications with the language. Among his suggestions are things like:

  • ALWAYS do the simplest thing that will work
  • NEVER trust anything that comes from the user
  • NEVER use include for controlling logic
  • NEVER create a file of useful functions, even if it's called helpers.php

There's also been some discussion about this list over on Reddit - you can comment on it over there if you agree/disagree with some of his points.

0 comments voice your opinion now!
commandments language usage list

Link: http://biasedphp.com/php-commandments

Dayle Rees:
Composer primer
April 15, 2013 @ 12:55:09

For those that might have heard about the Composer package management system for PHP but haven't had the time to get into it, you should definitely check out this great primer from Dayle Rees.

Composer is something special in the world of PHP. It has changed the way we handle application dependencies, and quelled the tears of many PHP developers. You see, in the olden days, when you wanted to build an application that relied on third party dependencies you would have to install them with PEAR or PECL. These two dependency managers both have a very limited set of outdated dependencies and have been a thorn in the side of PHP developers for a long time. [...] Enter composer, king of the package managers.

He jumps right in and gets into the configuration (the composer.json file) and using it to describe the package. He shows how to set up "required" resources complete with version number information. There's a bit about setting up autoloading and classmaps too. He then moves on to getting the tool installed and using the composer.json definition to load in needed packages (and development ones if needed).

0 comments voice your opinion now!
composer package manager primer configuration usage

Link: http://daylerees.com/composer-primer

Daniel Cousineau:
Using Symfony Console From Scratch
April 05, 2013 @ 12:46:43

Daniel Cousineau has posted a guide to using the Symfony Console component as a part of your application. It introduces you to some of the basics of using the component and has plenty of sample code to get you started.

CLI applications are extremely useful for many, if not most web projects. The Symfony framework even goes so far as to include an extensible CLI console used for everything from running cache cleanup/warmup tasks, to user account management. Many CLI scripts for web projects consist of just a static .php file which works fine but grow unweildy over time. Thankfully, the aforementioned Symfony Console component is released as a decoupled standalone that can be installed and setup easily and provide us with structure and organization (and some powerful features).

He walks you through the installation of the component via Composer and includes the code to make a simple CLI script using it. He shows how to make new commands (like his "TestCommand") and how to attach it to the application. He talks about output and input handling with arguments and options. He also shows an integration with an existing application with a base command class that helps to set up and configure the command objects that inherit it.

0 comments voice your opinion now!
symfony console tutorial introduction install usage

Link: http://dcousineau.com/blog/2013/03/28/using-symfony-console-from-scratch/

W3 Techs:
PHP version 5.3 is now the most used version, just ahead of 5.2
March 22, 2013 @ 09:10:22

According to this new report on the W3 Techs site, the usage of PHP 5.2 has been passed up by the numbers for the usage of PHP 5.3 (finally).

PHP 5.3 has been released in June 2009, so it took a while to gain that level of popularity. End of support for PHP 5.2 has been declared in December 2010, but is was still the most popular version until now. Version 5.3 will enter the end-of-life cycle in March 2013. Version 5.4, used by only 3.0%, is now considered state-of-the-art.

The numbers have been consistently trending towards intersection with the usage of PHP 5.4 picking up, but no where near the 5.3 and 5.2 numbers. They also point out that PHP version adoption has a history of being slow. Contributing factors to this could be the overall impression of the language and how much "room for improvement" it seems to have.

It's not difficult to predict that PHP as a language will continue to dominate web development in the near future. What will be more exciting is to watch what new versions of PHP will look like.
0 comments voice your opinion now!
version adoption php53 php52 statistics usage


Lorna Mitchell:
You're Not Using Source Control? Read This!
January 07, 2013 @ 10:06:55

if you're still not using any kind of version control in your development projects, you're really doing yourself (and your fellow developers) a disservice. Lorna Mitchell wants to help nudge you down that road. To do this, she's provided a whitepaper about version control systems - what they are, how they're helpful and some cool stuff you can do with them.

Last week I wrote an email to a client who hasn't yet implemented source control, but who is thinking about it. It turned into rather a long email as I attempted to convey WAY too much information in one long email. After some twitter banter, I repackaged my thoughts into a whitepaper on Source Control entitled You're not using source control? Read This! (PDF, no registration needed).

The whitepaper looks at three different tools - Subversion, git and Mercurial (Hg) - and includes a "sales pitch" you can give to the people involved in your project about how it can help them. There's also a few helpful links included at the end for more information about each piece of software.

0 comments voice your opinion now!
sourcecontrol versioncontrol software usage whitepaper


PHPMaster.com:
Practical Code Refactoring, Part 4 - Efficiency
November 01, 2012 @ 11:37:54

PHPMaster.com has posted the latest in their "Practical Code Refactoring" series , this time with a focus on efficiency and how you can refactor your code to help it perform better both in processing power and in resource use.

In part three of this series we dealt with refactoring code for extensibility and discussed logical extensibility, modular design, decoupling, and encapsulation. In this final part of the series, we discuss what the main concerns of efficiency are for your web application and how to refactor for better efficiency.

They talk about some of the things you can do about network bandwidth usage, memory inefficiencies and processing issues (over you doing more work than you need to?). These aren't code examples - every application is different when it comes to this stuff, but it gives you some good questions to ask to fill in the blanks.

0 comments voice your opinion now!
efficiency code refactor series processing resource usage


DZone.com:
Using APC correctly
August 01, 2012 @ 11:09:52

In this new post to DZone.com, Giorgio Sironi shares a few helpful hints on using the APC tool to help improve the performance of your web applications.

APC (Alternative PHP Cache) is one of the orthogonal tools you can use to speed up the execution of PHP code. This article explains from scratch the correct use of APC's system cache (not touching the user cache, which is just a standard key/value map). APC has also other features like upload progress support, but the system cache is its main features and has such a little footprint on your code that you should throw an apc.php file to everyone picking on you for writing strings in single or double quotes.

He describes what the APC cache does for you (both on a lower, opcode and a higher, performance levels) and how it relates to the shared processes a web server uses. He finishes off the post with a quick guide to getting it installed and working ("pecl install") and some of the common settings to tweak to get the most of the functionality.

0 comments voice your opinion now!
apc install tutorial usage opcode cache perfromance


Symfony Blog:
The Symfony Community Survey 2012 The Results
July 27, 2012 @ 07:22:58

On the Symfony Blog there's a new post sharing the results of a recent poll they took of some of their developers covering things like job title, how long they've been working with Symfony and their work with the framework.

Before the Symfony Live Conference in Paris, we conducted the first Symfony community survey. The raffle winners will soon be contacted by Anne-Sophie. And without further ado, here are the survey results!

Results are posted both in numbers and in easy to read graphs to questions like:

  • What is your job?
  • How did you get to know symfony?
  • Do you use any other PHP framework/CMS?
  • What is the average size of projects that you/your company work on?
  • How do you get trained?

The last question is interesting - it asked the community how many would be interested in getting a Symfony certification. The results were almost broken into equal thirds of "yes", "no" and "somewhat interested. You can see the full results here.

0 comments voice your opinion now!
symfony community survey usage results graph


Fabien Potencier's Blog:
PHP is much better than you think
July 04, 2012 @ 15:48:49

Fabien Potencier (of the Symfony project) has posted his own response to some of the recent comments around PHP and its quality, pointing out mainly that PHP is about getting things done (and knows its not the "most beautiful" language out there).

The biggest problem of these rants is that they come from people stuck in the old days of PHP. They either don't care or they don't want to admit that PHP actually evolves at a very fast pace, both at the language level but also at the community level. In fact, it evolves much faster than any other language or web platform. It has not always been the case, but the last 5 years have been an amazing journey for PHP.

He points out the usage stats of the general usage of PHP across the web, the sites that use the PHP-based WordPress software and the percentage of use for CMSes like Joomla. He talks about how some of the recent advancements in the language have brought it into its own and three points that have made the language even better - its adoption of git for it's core source code management, the Composer package management system and the collaboration that is happening between projects.

0 comments voice your opinion now!
opinion response language usage ecosystem


PHPMaster.com:
REST - Can You do More than Spell It? Part 3
May 14, 2012 @ 09:41:33

On PHPMaster.com they've posted the third part of their series looking at development around RESTful APIs. In this latest article they take an outsider's perspective and look at using services rather than creating one from scratch. (Part 1, Part 2)

Imagine it's a warm, sunny, summer day. You're just walking along, taking a leisurely noonday stroll, when all of a sudden you come face to face with a RESTful API. What do you do? How do you interface with it? Or, as those of us in the know would say, "how do you consume RESTful services?" That, my friends, is the subject of this article.

They mention using other tools (like components/features of common frameworks) to interface with the services, but end up using the curl extension to make a POST request to a service to add a few events to a "/summerschedule" resource.

0 comments voice your opinion now!
rest api interface curl tutorial series usage



Community Events









Don't see your event here?
Let us know!


testing framework example unittest release zendframework2 interview opinion introduction database object code api podcast phpunit language composer community tool development

All content copyright, 2013 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework