News Feed
Sections




News Archive
feed this:

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

Qandidate.com Blog:
How we manage our development process at Qandidate.com
August 22, 2014 @ 10:34:46

The Qandidate blog has a new post today that "pulls back the curtain" as to how they manage their development process and get their work done.

At Qandidate.com we tried a lot of different project management tools and techniques. After two years of experimenting I want to share our current process, seen from my role as product owner (PO). One reason for sharing this, is to help you improve your process, but the most important reason is to start a discussion with you based on your experience, to improve our process even more. Our main rule at Qandidate.com is to embrace change. Always be open for changes that may or may not improve your process. If a change improves the process it's a win. If you didn't try it you will never know!

They walk through the three main points over the overall flow of work there:

  • The process itself including two week sprints containing (unestimated) stories
  • A demo and stakeholders meeting showing the work they've done during the sprint and get feedback from the stakeholders
  • The stories and how they're created and when/how new ones are added (their "piano meetings").

They also include testing, both frontend and backend, and focus on small chunks of functionality instead of quick and dirty hacks. While their process won't work for every group (and is more of a "scrum-but..." setup) it is interesting to see how another group does their work.

0 comments voice your opinion now!
qandidate manage development process scrumbut stories meeting demo stakeholder

Link: http://labs.qandidate.com/blog/2014/08/21/development-process-at-qandidate-com/

Lorna Mitchell:
Using Phing with Travis CI
July 18, 2014 @ 11:23:45

Lorna Mitchell has a quick post to her site today showing you how to link up Travis-CI and phing to execute the phing build on the Travis-CI service.

We've started using Travis CI on one of my projects to run some build processes to check that everything looks good before we merge/deploy code. One thing I ran into quite quickly was that I wanted to install phing in order to use the build scripts we already have and use elsewhere, but that it isn't provided by default by Travis CI.

To get it all cooperating, she uses the "before_install" settings/functionality Travis provides to use PEAR to discover and install phing. Then in the "script" section, the build can call the phing executable without problems. She does point out one "magic" kind of thing that rehashes the Travis environment and lets to know phing exists: the...well..."rehash" configuration setting.

0 comments voice your opinion now!
phing travisci beforeinstall tutorial build process

Link: http://www.lornajane.net/posts/2014/using-phing-with-travis-ci

ServerGrove Blog:
Symfony2 components overview Process
April 18, 2014 @ 12:41:41

The ServerGrove blog has posted their latest Symfony2 component spotlight, this time focusing on the Process component.

The Symfony2 Process component, allows us to execute commands in sub-processes. [...] The Process component provides an object-oriented abstraction on top of proc_* functions to execute independent processes from PHP.

As with the other posts in the series, they walk you through the installations via Composer and some examples of its use. The post also shows the use of exit codes, working with long running processes and how to execute PHP code in the command. They also briefly look "under the hood" at how the component does what it does (on top of the proc_* functions).

0 comments voice your opinion now!
symfony2 component process external command overview

Link: http://blog.servergrove.com/2014/04/16/symfony2-components-overview-process/

PHPBuilder.com:
Processing JSON in PHP
April 04, 2014 @ 10:40:39

PHPBuilder.com has posted a new tutorial today showing you how to work with JSON in PHP including serialization and database interaction.

This article explains how to use the JavaScript Object Notation (JSON) extension in PHP, going step by step through a series of essential operations. JSON is an object string notation, it is defined as a subset of JavaScript's syntax and its general-purpose is to interchange data format. As you probably know, JSON was first made to be used with JavaScript for accessing remote data, but now it is used by many other languages because JSON data is platform independent data format. JSON can be used natively in JavaScript, but you can also use it in a server-client application logic.

They start with an introduction to the JSON structure and how to both create and encode data using PHP's own json_encode and json_decode. The examples start out using arrays for the data but then move into something slightly more complex - objects. The article talks about JsonSerializable and show how to automatically hook the data into a table and store the content based on the column name/property name match.

0 comments voice your opinion now!
process json encode decode tutorial example

Link: http://www.phpbuilder.com/articles/application-architecture/object-oriented/processing-json-in-php.html

Matthias Noback:
Test Symfony2 commands using the Process component and asynchronous assertions
March 24, 2014 @ 10:49:13

Matthias Noback has a new post today showing you how to test Symfony2 commands that use the Process component. More specifically, his tests revolve around the ones that use asynchronous assertions in the testing to remove weird behaviors that could be caused by multiple processes running them simultaneously.

Usually you would test a console command using the ConsoleTester class as described in the official Symfony documentation. But we can not use it in this case. We need to isolate the process in order for pcntl_fork() to work correctly, otherwise the PHPUnit test runner itself will be forked too, which will have the effect of running all the following unit tests twice (which can have very strange effects on the test results).

He shows how to use the Process component to start up a new process (the daemon) and check that the PID file exists. He includes an example of a "probe" to determine what processes are running and preventing them from stepping on each other.

0 comments voice your opinion now!
symfony2 command process component asynchronous assertion unittest phpunit

Link: http://php-and-symfony.matthiasnoback.nl/2014/03/test-symfony2-commands-using-the-process-component-and-asynchronous-assertions/

Greg Freeman:
Processing data with PHP using STDIN and Piping
November 18, 2013 @ 10:24:56

Greg Freeman has a post today looking at using streams and STDIN in PHP to handling incoming data (like to a CLI script).

PHP streams are still lacking in documentation and are rarely used compared to other PHP features. This is a shame because they can be really powerful and I have used them to gain a lot of performance when doing things such as processing log files. One of the more powerful features of Linux is the ability to pipe in data from another program, it's often faster to offload tasks to an existing linux user space program than to do it in PHP and the added benefit is that you gain multi core processing which is not possible with standard PHP.

He talks briefly about the "pipe" character and how it allows you to send the output from one command to another. He shows how to mimic this same kind of input handling in PHP using the "php://stdin" stream and a fopen function call. He gets a bit more in-depth into how the streams work (blocking) and a bit of configuration and data you can get about the current streams. The post finishes with an example of a non-blocking input handler that will automatically end execution if no data is given within three seconds.

0 comments voice your opinion now!
data process stdin input handling tutorial pipe

Link: http://www.gregfreeman.org/2013/processing-data-with-php-using-stdin-and-piping/

SitePoint PHP Blog:
Introduction to Gearman - Multitasking in PHP
November 04, 2013 @ 13:23:11

The SitePoint PHP blog has posted an introductory tutorial showing you how to use Gearman in PHP to handle multitasking outside of the normal script execution. Gearman is an external job server that lets you schedule scripts and tasks for execution.

How many times have you developed a web application that had some functionality which would benefit from running an external program or even forking a separate process? This is not something you generally like to do from your web app because you want to make it run as fast and efficient as possible, while keeping the site functional for end users. So how do we get a fast but full-featured application that can process more than the average app we're used to?

They start by introducing you to Gearman - the server side - and how it works to handle a large amount of jobs quickly (50 thousand per second according to the article). They give the example of resizing images uploaded by users to illustrate. Next up is the installation - first Gearman then on to the PHP side, installing the PECL extension and adding it to the php.ini configuration. An example script is also provided showing how to create a new connection to Gearman and configure the callbacks for handling status changes. They also include adding two kinds of tasks - a normal one and a low priority one.

0 comments voice your opinion now!
tutorial gearman introduction install configure process task

Link: http://www.sitepoint.com/introduction-gearman-multi-tasking-php/

Community News:
PHP-FIG Voting on PSR-4 Opened
September 20, 2013 @ 12:18:31

The PHP-FIG has officially started the voting process for the PSR-4 autoloading standard that would provide an interface to make autoloading a bit more standardized across applications.

The purpose is to specify the rules for an interoperable PHP autoloader that maps namespaces to file system paths, and that can co-exist with any other SPL registered autoloader. This would be an addition to, not a replacement for, PSR-0.

The current autoloading standard definition (PSR-0) still allows for the use of the underscore in class names to resolve to directory paths in the application's files. In this new standard, that allowance is gone, relying only on the actual namespacing to define package pathing. This "package-oriented autoloading" is set to help move PHP package development forward into a more standardized structure.

0 comments voice your opinion now!
psr4 voting process open member autoload definition

Link: https://groups.google.com/forum/#!topic/php-fig/NWfyAeF7Psk

ReviewSignal Blog:
Long Running Processes in PHP
August 23, 2013 @ 11:29:03

On the ReviewSignal blog today there's a post looking at their use of long running PHP processes and how they got around some of the common problems.

Here at Review Signal, I use a lot of PHP code and one of the challenges is getting PHP to run for long periods of time. Here are two sample problems that I deal with at Review Signal that require PHP processes to run for long periods of time or indefinitely: data processing and Twitter streaming API data.

They talk some about their use of the PHP CLI, bash and cron to execute their scripts. There's a bit about the difference between executing a script in ssh versus cron and how to use "nohup" to have it execute in the background. They show how to set up a cron job and, more specifically, how their script pulls from the Twitter API via a bash script to check if it's already running.

0 comments voice your opinion now!
long running process example twitter api streaming

Link: http://reviewsignal.com/blog/2013/08/22/long-running-processes-in-php/

Phil Sturgeon:
Progress in the PHP-FIG
August 15, 2013 @ 11:13:55

Phil Sturgeon has a new post about some of the progress the PHP-FIG is making (the PHP framework interoperability group) and how some of the more recently proposed standards...and a workflow he thinks can help keep things from fading like they are now.

For the last two years the ML has been chock full of different discussions about potential PSRs that could be worked on. [...] This to me is the central point of the PHP-FIG as by defining these standards it can stop the need to build 6 different damn adapter classes for your composer package if you want it to work with Buzz, Guzzle, Zend HTTP, Curl, Whatever). [...] It became apparent to me that the PHP-FIG wasn't going to get all that far as things stood. I actually saw quite a few problems with the workflow.

To try to help resolve these problems, Phil has proposed a bylaw that aims to help (and has since been voted in as part of the process). The flow has several steps that a PSR proposal has to go through, all tracked by co-sponsors, one being the main coordinator. It goes through a pre-draft, draft, review and acceptance phases. There's also some points in there about attribution, the use of the voting protocol and the flow of the voting process.

0 comments voice your opinion now!
phpfig interoperability voting process flow bylaw proposal

Link: http://philsturgeon.co.uk/blog/2013/08/progress-in-the-phpfig


Community Events





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


threedevsandamaybe language code conference list tips development developer laravel series introduction api zendserver interview release deployment podcast framework application community

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