<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Sat, 25 May 2013 20:40:55 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Michelangelo van Dam: UA Testing with Selenium and PHPUnit]]></title>
      <guid>http://www.phpdeveloper.org/news/19629</guid>
      <link>http://www.phpdeveloper.org/news/19629</link>
      <description><![CDATA[<p>
In <a href="http://www.dragonbe.com/2013/05/ua-testing-with-selenium-and-phpunit.html">this new post</a> to his site <i>Michaelangelo van Dam</i> looks at user acceptance testing with <a href="http://phpunit.de">PHPUnit</a> and <a href="http://docs.seleniumhq.org/">Selenium</a>.
</p>
<blockquote>
Last week I spoke at <a href="http://tek.phparch.com/">php[tek] 2013</a> where I explained to people how to get started with <a href="http://www.seleniumhq.org/">Selenium IDE</a> to record user interaction with the web interface, convert them to PHPUnit testcases and automatically execute them on multiple browsers on multiple platforms. The <a href="https://joind.in/8157>feedback</a> I got was awesome, you're all a great crowd! But on <a href="https://twitter.com/dragonbe>twitter</a> I also received a bunch of questions regarding how to set up multiple platforms and why I used Windows in my presentation to deploy to. So today I deceided it was time to write a full article on this subject.
</blockquote>
<p>
He introduces Selenium and what kinds of things it can be used to test. He also defines "user acceptance testing" and talks about why they're an important part of the testing ecosystem. He then walks you through the process of getting the testing environment set up, creating a few tests and how to convert them over to PHPUnit tests (using a built-in tool). Screencasts show you each step of the way. He includes a little tweaking you'll need to do to to the test code to get it working with your own Selenium server 
</p>
Link: http://www.dragonbe.com/2013/05/ua-testing-with-selenium-and-phpunit.html]]></description>
      <pubDate>Fri, 24 May 2013 10:18:40 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Lorna Mitchell: Simplest PHP Generator Example]]></title>
      <guid>http://www.phpdeveloper.org/news/19623</guid>
      <link>http://www.phpdeveloper.org/news/19623</link>
      <description><![CDATA[<p>
On her blog <i>Lorna Mitchell</i> has posted an example of a <a href="http://www.lornajane.net/posts/2013/simplest-php-generator-example">basic generator</a> written in PHP, a feature of the upcoming PHP version 5.5</a>.
</p>
<blockquote>
I really like the generators feature that's arriving in PHP 5.5, and since we're now into release candidate releases, it's actually not that far away. I've been speaking on this topic and I thought I'd share my trivially simple code example from my slides.
</blockquote>
<p>
She includes an example of a very basic generator using the new "yield" keyword and how to implement it in a simple foreach loop. There's also a little talk about when is a good time to use generators in your applications (two examples: complex number calculation and working with large data sets a chunk at a time). For more information on how these generators will work, check out <a href="http://php.net/manual/en/language.generators.overview.php">this page</a> in the PHP manual.
</p>
Link: http://www.lornajane.net/posts/2013/simplest-php-generator-example]]></description>
      <pubDate>Thu, 23 May 2013 10:31:02 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[NetTuts.com: How to Create a PyroCMS Theme]]></title>
      <guid>http://www.phpdeveloper.org/news/19613</guid>
      <link>http://www.phpdeveloper.org/news/19613</link>
      <description><![CDATA[<p>
On NetTuts.com today there's a new tutorial posted showing you how to <a href="http://net.tutsplus.com/tutorials/php/how-to-create-a-pyrocms-theme/">create a theme for PyroCMS</a>, an open source, PHP-based <a href="https://www.pyrocms.com/">content management system</a> with a large user base and community.
</p>
<blockquote>
Like most content management systems, <a href="https://www.pyrocms.com/">PyroCMS</a> uses front-end themes. Though PyroCMS themes are built a bit differently than what you might be used to from other systems, they're still quite easy to create. They're so easy, in fact, that very little PHP experience is required to assemble them!
</blockquote>
<p>
He walks through things like the folder structure of the templates directory and how to get started on a custom "Foo" theme of your own. He covers how to lay out the HTML markup for the theme and how you can use partials for the sections of the site. He briefly touches on using multiple layout files and how to use different layouts shown only to mobile devices.
</p>
Link: http://net.tutsplus.com/tutorials/php/how-to-create-a-pyrocms-theme]]></description>
      <pubDate>Tue, 21 May 2013 11:19:25 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[DZone.com: Cloning in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/19600</guid>
      <link>http://www.phpdeveloper.org/news/19600</link>
      <description><![CDATA[<p>
In <a href="http://css.dzone.com/articles/cloning-php">this recent post</a> over on DZone.com <i>Giorgio Sironi</i> takes a look at the "clone" feature of PHP - what it is, how it can be used and things to watch out for in its use.
</p>
<blockquote>
Cloning is an operation consisting in the duplication of a data structure, usually to avoid the <a href="http://en.wikipedia.org/wiki/Action_at_a_distance_%28computer_programming%29">aliasing problem</a> of having different code modify the same instance in inconsistent ways. In PHP, cloning can be accomplished in multiple ways - and in some cases it can be avoided altogether.
</blockquote>
<p>
He talks some about how objects are passed around internally during the PHP execution and how you can tell if a function works with data by reference (from the manual). He then looks at the "clone" keyword and what kinds of things are duplicated from an object when it is used. He briefly touches on the "__clone" magic method for solving the "shallow clone" problem and how, possibly, serializing the object might be a better alternative for reproducing the entire object.
</p>
Link: http://css.dzone.com/articles/cloning-php]]></description>
      <pubDate>Fri, 17 May 2013 11:09:42 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Script-Tutorials.com: Functional Programming - How to Write Functional Code in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/19568</guid>
      <link>http://www.phpdeveloper.org/news/19568</link>
      <description><![CDATA[<p>
On the Script-Tutorial.com site today there's a new post looking at <a href="http://www.script-tutorials.com/functional-programming-php/">functional programming in PHP</a> - some of the concepts involved and example code showing how to make it work.
</p>
<blockquote>
Functional programming can be defined in simple terms as a programming paradigm that do not change the state of a program instead it uses pure functions. A pure function is a function that has the ability to accept a value and return another value without changing the input supplied to it. It is characterized by its ability to support functions that are of high order. [...]  A programming paradigm that is functional has the following attributes: do not alter the states which make parallelism easier, deals mostly with a function which is the smallest unit hence enhances readability of code, has deterministic functions that enable stability of a program.
</blockquote>
<p>
He talks some about anonymous/lambda functions (closures) and their role in PHP's implementation of functional programming. He also talks some about partial functions, currying, higher order functions and recursion. He finishes off the article with a look at some of the advantages this method of development can bring as well as some of the disadvantages that come with things like recursion and the learning curve of the method.
</p>
Link: http://www.script-tutorials.com/functional-programming-php]]></description>
      <pubDate>Thu, 09 May 2013 11:04:26 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: An Introduction to Ctype Functions]]></title>
      <guid>http://www.phpdeveloper.org/news/19526</guid>
      <link>http://www.phpdeveloper.org/news/19526</link>
      <description><![CDATA[<p>
On PHPMaster.com today <i>David Shirey</i> has a written up a new tutorial <a href="http://phpmaster.com/an-introduction-to-ctype-functions/">introducing the ctype functions</a> in PHP. This set of functions provides a handy way to more correctly check values to ensure they're valid (and contain what they should).
</p>
<blockquote>
If you have a background in C, then you're probably already familiar with the character type functions because that is where they come from (don't forget that PHP is actually written in C). But if you're into Python, then it's only fair to point out that the PHP Ctype functions have absolutely nothing to do with the Python's ctypes library. It's just one of those tragic and totally unavoidable naming similarities.
</blockquote>
<p>
He briefly explains how the functions work and at least one "gotcha" to watch out for if you're using them for input validation. He then goes through the list of the eleven ctype functions and briefly describes what they do. Some example code is also included showing how you can use them to validate a value based on the true/false return from the function call.
</p>
Link: http://phpmaster.com/an-introduction-to-ctype-functions]]></description>
      <pubDate>Tue, 30 Apr 2013 11:38:32 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: Scrum - An Agile Project's Best Friend]]></title>
      <guid>http://www.phpdeveloper.org/news/19451</guid>
      <link>http://www.phpdeveloper.org/news/19451</link>
      <description><![CDATA[<p>
PHPMaster.com has posted a bit less of a technical article than usual and shares some of the <a href="http://phpmaster.com/scrum-an-agile-projects-best-friend">concepts behind scrum</a>, the project management style that's currently quite popular with development groups.
</p>
<blockquote>
In an <a href="http://phpmaster.com/php-project-management/">earlier article I wrote</a>, we took a general look at project management and discussed what some of its pitfalls are that should be avoided. As part of that, I mentioned that you should, as much as possible, be using an Agile methodology, particularly Scrum, to manage development. I'd like to follow that up with a look at Scrum and at how we can use it to tame our projects.
</blockquote>
<p>
He talks about the typical "waterfall" technique of project development - requirements up front and cross your fingers for the rest. He compares this to the agile process and how scrum, in particular, helps keep things from falling apart. He then gets in to "how to scrum" by defining some of the key terms and talking about things like:
</p>
<ul>
<li>Holding smaller meetings
<li>Limiting scope and time frame
<li>Looking for feedback
<li>Constant reworking remaining time
</ul>
<p>
...all at the same time, multiple times during the life of the project. Agile focuses on quick changes and updates because the project is constantly getting feedback from those asking for the product, giving them (hopefully) exactly what they want.
</p>
</p>
Link: http://phpmaster.com/scrum-an-agile-projects-best-friend]]></description>
      <pubDate>Fri, 12 Apr 2013 09:26:24 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Lukasz Kujawa: Deploying PHP applications with Phing]]></title>
      <guid>http://www.phpdeveloper.org/news/19447</guid>
      <link>http://www.phpdeveloper.org/news/19447</link>
      <description><![CDATA[<p>
<i>Lukasz Kujawa</i> has a new post to his site introducing you to deployment of your web-based PHP applications <a href="http://systemsarchitect.net/deploying-php-applications-with-phing/">using the Phing build tool</a>.
</p>
<blockquote>
How many steps are required to deploy your software? Some people say it shouldn't be more than one. I'm little bit more relaxed about it so I would say two steps are still fine. If it takes more than two then most likely you need a build script. [...] <a href="http://www.phing.info/">Phing</a> is a PHP project build system or build tool based on &#8203;<a href="http://ant.apache.org/">Apache Ant</a>. You can do anything with it that you could do with a traditional build system like GNU make. It use simple XML build files and extensible PHP "task" classes.
</blockquote>
<p>
He shows how to get it installed via Composer and how to create a simple "build.xml" file with a few targets inside. He shows how to use the "build.properties" configuration file and how to set them from the command line if needed. He also includes details on doing database migrations using the "dbdeploy" tasks.
</p>
Link: http://systemsarchitect.net/deploying-php-applications-with-phing]]></description>
      <pubDate>Thu, 11 Apr 2013 11:44:43 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[NetTuts.com: Aspect-Oriented Programming in PHP with Go!]]></title>
      <guid>http://www.phpdeveloper.org/news/19439</guid>
      <link>http://www.phpdeveloper.org/news/19439</link>
      <description><![CDATA[<p>
In <a href="http://net.tutsplus.com/tutorials/php/aspect-oriented-programming-in-php-with-go/">this new tutorial</a> on NetTuts.com today they introduce you to <a href="http://en.wikipedia.org/wiki/Aspect-oriented_programming">aspect-oriented programming</a> (AOP) in PHP through the use of the <a href="https://github.com/lisachenko/go-aop-php">Go! PHP library</a>.
</p>
<blockquote>
The concept of Aspect-Oriented Programming (AOP) is fairly new to PHP. There's currently no official AOP support in PHP, but there are some extensions and libraries which implement this feature. In this lesson, we'll use the <a  href="https://github.com/lisachenko/go-aop-php">Go! PHP library</a> to learn AOP in PHP, and review when it can be helpful.
</blockquote>
<p>
They start with a brief history of AOP in general and a basic vocabulary of some of the common terms like "point-cut", "aspect" and "cross-concern." They briefly look at some of the other PHP tools for AOP, but then help you get Go! up and running. Sample code is included showing how to integrate it into your project and, more practically, create a logging system that can be used as an aspect.
</p>
Link: http://net.tutsplus.com/tutorials/php/aspect-oriented-programming-in-php-with-go]]></description>
      <pubDate>Wed, 10 Apr 2013 10:56:41 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Dzone.com: Diving into Behat]]></title>
      <guid>http://www.phpdeveloper.org/news/19432</guid>
      <link>http://www.phpdeveloper.org/news/19432</link>
      <description><![CDATA[<p>
<i>Giorgio Sironi</i> has a new post to DZone.com today about some of his <a href="http://css.dzone.com/articles/diving-behat">experiences with Behat</a>, a behavior-driven development testing tool written in PHP. It uses the <a href="https://github.com/cucumber/cucumber/wiki/Gherkin">Gherkin</a> language syntax to define its tests.
</p>
<blockquote>
I had the occasion to try out and adopt Behat for a particular need in our projects at Onebip. Here is my recount of the experience from a PHPUnit contributor and invested person.
</blockquote>
<p>
He starts off with a list of situations where he doesn't think that Behat is a good fit for testing including testing of a single object and acceptance tests where comparing the response from more than one test is needed. He suggests that it's more useful for verifying high level business rules than anything. He talks some about the shift they made to using Behat and some of the benefits they found in its use. He finishes up the post by looking at the technical side and includes a warning about letting the size of the FeatureContext file get too large.
</p>
Link: http://css.dzone.com/articles/diving-behat]]></description>
      <pubDate>Tue, 09 Apr 2013 09:50:34 -0500</pubDate>
    </item>
  </channel>
</rss>
