<?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>Thu, 23 May 2013 15:04:11 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Lorna Mitchell: First Phing Plugin]]></title>
      <guid>http://www.phpdeveloper.org/news/19358</guid>
      <link>http://www.phpdeveloper.org/news/19358</link>
      <description><![CDATA[<p>
In the latest post to her site, <i>Lorna Mitchell</i> walks you through the creation of <a href="http://www.lornajane.net/posts/2013/first-phing-plugin">a first Phing plugin</a>, an extension to the popular PHP-based build tool.
</p>
<blockquote>
I'm a huge fan of <a href="http://phing.info/">Phing</a> and use it regularly for build and deployment tasks. Often, I'll ask about a plugin that I wish existed, and get a very courteous "patches welcome" from the nice people in the #phing channel on freenode. This has happened a few times, so I thought I should probably look at how to make a new phing plugin, this article shows you how to make the simplest thing I could think of: a simple "hello world" plugin.
</blockquote>
<p>
She points you to the location to grab the latest version of the tool (the github repository) and how to define a configuration file for your test runs. Then she includes the sample code showing how to create the "HelloTask" plugin. It takes an input value of "name" and displays a greeting when executed. She shows the syntax for defining this in the XML build file and the sample result when executed.
</p>]]></description>
      <pubDate>Mon, 25 Mar 2013 10:49:23 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[NetTuts.com: Pro Workflow in Laravel and Sublime Text]]></title>
      <guid>http://www.phpdeveloper.org/news/19317</guid>
      <link>http://www.phpdeveloper.org/news/19317</link>
      <description><![CDATA[<p>
NetTuts.com has a new article today for the <a href="http://laravel.com">Laravel</a> developers out there (an up and coming PHP framework) with some <a href="http://net.tutsplus.com/tutorials/tools-and-tips/pro-workflow-in-laravel-and-sublime-text/">handy Sublime Text tips</a> you can use to streamline your workflow.
</p>
<blockquote>
Not too long ago, I built a handful of <a href="https://packagist.org/packages/way/generators">generators for Laravel</a>, which ease the process of various tasks. Today, thanks to help from <a href="https://github.com/gnarula">Gaurav Narula</a>, we're turning things up a notch with the release of a new Sublime Text plugin that leverages the power of Artisan and the generators from directly within your editor.
</blockquote>
<p>
They help you get it installed and running and show (via a screencast) the steps to use it when working in your code. Their examples show the creation of resources (all MVC aspects and configurations), working with Artisan commands, migrations and other bits of code.
</p>]]></description>
      <pubDate>Fri, 15 Mar 2013 09:48:39 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Chris Jones: Quick Debugging of PHP Scripts in Emacs with Geben and Xdebug]]></title>
      <guid>http://www.phpdeveloper.org/news/19085</guid>
      <link>http://www.phpdeveloper.org/news/19085</link>
      <description><![CDATA[<p>
<i>Chris Jones</i> has a new post showing how you can <a href="https://blogs.oracle.com/opal/entry/quick_debugging_of_php_scripts">use Emacs and Xdebug for debugging</a> with the help of the <a href="http://code.google.com/p/geben-on-emacs/">geben</a> plugin.
</p>
<blockquote>
When you want to test a PHP code snippet quickly, it's handy to do it within your day-to-day environment. For me, this environment is Emacs. The geben package for Emacs provides an interface to the DBGp protocol, such as used by Derick Rethans's standard Xdebug extension for PHP. With the combination of geben and Xdebug, I can quickly and efficiently step through execution of local files, examining code flow and data values.
</blockquote>
<p>
He includes a ten step process (step 11 is basically "use it") that walks you through the installation of the full stack - PHP, Xdebug and geben - and the configuration changes you'll need to make to get them all working together. Some basic usage instructions are included, but if you want more details on using geben, check out <a href="http://code.google.com/p/geben-on-emacs/">the project's site</a>.
</p>]]></description>
      <pubDate>Thu, 24 Jan 2013 11:19:47 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Miro Svrtan: Debugging Uploadify jQuery plugin with XDebug]]></title>
      <guid>http://www.phpdeveloper.org/news/18423</guid>
      <link>http://www.phpdeveloper.org/news/18423</link>
      <description><![CDATA[<p>
<i>Miro Svrtan</i> has <a href="http://www.mirosvrtan.me/blog/2012/08/debugging-uploadify-jquery-plugin-with-xdebug/">a quick tip</a> for those using the Uploadify plugin in their application's file uploads - how to enable XDebug debugging on each upload request.
</p>
<blockquote>
If you ever decided to use <a href="http://www.uploadify.com/">Uploadify</a> jQuery plug-in you might have noticed problems with debugging remote PHP code that this plugin relies on. [...] Unfortunately setting this up will not work with Uploadify Flash version since calls to remote server side is not done inside browser but inside flash plugin. [...] Few months ago I found my self blindly debugging it again and remembered that I read somewhere that xdebug parameters can be sent via GET/POST too. 
</blockquote>
<p>
He takes advantage of this fact and appends the "XDEBUG_SESSION_START" and "XDEBUG_SESSION" values in the "scriptData" handler for the Uploadify call. The XDebug session is then started when the script executes and your IDE will receive the results.
</p>]]></description>
      <pubDate>Thu, 30 Aug 2012 10:50:01 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[MaltBlue.com: How To Build an Extendible Zend Framework Application]]></title>
      <guid>http://www.phpdeveloper.org/news/18368</guid>
      <link>http://www.phpdeveloper.org/news/18368</link>
      <description><![CDATA[<p>
On the MaltBlue.com site today there's a new tutorial posted giving you some recommended practices on <a href="http://www.maltblue.com/zend-framework/how-to-build-and-extendable-zend-framework-application">building an extendible application</a> with the Zend Framework.
</p> 
<blockquote>
Whether you have a big or small budget are time rich or poor, there's always the pressure to build applications with the future in mind. [...] So amongst the multitude of other advice you'll receive throughout your life, building applications that are readily extensible and extendable - in a simple, clean and cost-efficient manner - is essential to keeping input as low as possible, whilst maximising output, and accompanying client satisfaction (or boss satisfaction if you're full-time employed).
</blockquote>
<p>
He focuses on one aspect of Zend Framework that he's found that helps out the most in keeping his development flexible, <a href="http://framework.zend.com/manual/en/zend.application.available-resources.html">resource plugins</a>. These plugins (through use of the Strategy design pattern) can add immediate functionality to your application and be dropped in as needed. He shows how with a simple plugin that allows for simpler file handling for user uploads. The code for the various parts - interface, factory, plugin and resource - are all included. 
</p>]]></description>
      <pubDate>Thu, 16 Aug 2012 12:02:48 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Zumba Fitness Engineering: Using Application Events to Hook in Plugins]]></title>
      <guid>http://www.phpdeveloper.org/news/18338</guid>
      <link>http://www.phpdeveloper.org/news/18338</link>
      <description><![CDATA[<p>
In <a href="http://engineering.zumba.com/2012/08/04/using-application-events-to-hook-in-plugins/">this recent post</a> on the Zubma Fitness Engineering site, <i>Chris Saylor</i> looks at using events in your applications to hook in plugins to easily (and dynamically) enhance functionality.
</p>
<blockquote>
In many instances, having a plugin system (even for closed-source applications) is a convenient and safe approach to adding functionality to a product. It minimizes risk by not having to modify the core of the source. In this article, I'll be discussing how we implemented a plugin system for our cart software to allow for plugins.
</blockquote>
<p>
Its implemented a bit like the <a href="http://en.wikipedia.org/wiki/Observer_pattern">Observer</a> design pattern - you "register" the listening event which can then be activated by a "trigger" method with the event's name. These events are stored in a registry (static) so they can be accessed across the application.
</p>]]></description>
      <pubDate>Thu, 09 Aug 2012 09:23:37 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[MaltBlue.com: Why Zend Framework Plugins Save You Time]]></title>
      <guid>http://www.phpdeveloper.org/news/18186</guid>
      <link>http://www.phpdeveloper.org/news/18186</link>
      <description><![CDATA[<p>
On the MaltBlue.com blog today there's a new post talking about <a href="http://www.maltblue.com/zend-framework/why-zend-framework-plugins-save-you-time">Zend Framework plugins</a> and how they can help save you time in the long run, giving you more time and flexibility to create the applications you want.
</p>
<blockquote>
During the recent development of the new <a href="http://www.phpclouddevelopmentcasts.com/">PHP cloud development casts site</a>, which has been developed with the Zend Framework, so much development time has been saved by using one of the simplest and arguably best features of the framework: <a href="http://framework.zend.com/manual/en/zend.controller.plugins.html">Controller Plugins</a>. So today I want to introduce you to them and walk you through a working plugin so you can see just how effective and efficient they can make your development workflow.
</blockquote>
<p>
He starts with a look at the events that fire in the process of plugin execution (including "routeStartup" and "preDispatch") and as well as some common uses like inserting code at the end of a request automatically or redirecting a user if they're not logged in. Included in the post is a simple code example showing the setup of a simple plugin that redirects the user to the "/index/index" path if they're not already there.
</p>]]></description>
      <pubDate>Thu, 05 Jul 2012 11:44:41 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: In My Language, Please! - Translating WordPress Themes and Plugins]]></title>
      <guid>http://www.phpdeveloper.org/news/17852</guid>
      <link>http://www.phpdeveloper.org/news/17852</link>
      <description><![CDATA[<p>
On PHPMaster.com there's a new tutorial showing how to <a href="http://phpmaster.com/in-my-language-please/">use the localization support</a> that comes with WordPress to make using different language definitions much simpler.
</p>
<blockquote>
WordPress itself is translated to many languages and people can use it in their preferred language. But this is not the case with themes, plugins, and other front-end customizations. [...] The purpose of this article is to show you how to translate properly any theme or plugin by using internationalization and localization methods. In brief, internationalization (i18n) deals with making sure strings of text are wrapped in specific function calls. 
</blockquote>
<p>
He starts by introducing the PHP functions (and configuration) you'll need to get the localization support up and running in your plugin, including a few examples of how to translate a string. Also included into the post is an introduction to using the <a href="http://www.poedit.net/">Poedit</a> software to create the different translation files.
</p>]]></description>
      <pubDate>Mon, 23 Apr 2012 12:27:36 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Anthony Ferrara's Blog: Handling Plugins In PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/17654</guid>
      <link>http://www.phpdeveloper.org/news/17654</link>
      <description><![CDATA[<p>
<i>Anthony Ferrara</i> has a new post today looking at <a href="http://blog.ircmaxell.com/2012/03/handling-plugins-in-php.html">plugin handling</a> and a few of the more common design patterns that can be used to implement them in your applications.
</p>
<blockquote>
A common problem that developers face when building applications is how to allow the application to be "plug-able" at runtime.  Meaning, to allow non-core code to modify the way an application is processed at runtime.  There are a lot of different ways that this can be done, and lots of examples of it in real life.  Over a year ago, I wrote a <a href="http://stackoverflow.com/a/4471363/338665">StackOverflow Answer</a> on this topic.  However, I think it deserves another look.  So let's look at some patterns and common implementations.
</blockquote>
<p>The patterns he covers are:</p>
<ul>
<li>Observer
<li>Mediator
<li>Strategy
<li>Decorator
<li>Chain of Responsibility
</ul>
<p>
For each there's both a bit of sample code showing it in use and links to some examples from various frameworks and other projects.
</p>]]></description>
      <pubDate>Fri, 09 Mar 2012 13:34:38 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Smashing Magazine: Writing Unit Tests For WordPress Plugins]]></title>
      <guid>http://www.phpdeveloper.org/news/17652</guid>
      <link>http://www.phpdeveloper.org/news/17652</link>
      <description><![CDATA[<p>
On the Smashing Magazine site there's a recent post looking at how to <a href="http://coding.smashingmagazine.com/2012/03/07/writing-unit-tests-for-wordpress-plugins/">unit test WordPress plugins</a> via the frontend using <a href="http://docs.jquery.com/QUnit">QUnit</a> (part of the <a href="http://jquery.com">jQuery</a> project).
</p>
<blockquote>
My first goal for the WordPress Editorial Calendar was to make it do anything useful. I was new to JavaScript and PHP and didn't really know what I could pull off. In a few days I had a proof of concept. In a few more I had a working version and was asking friends to install it. The calendar worked...sort of. I spent three times as much time fixing bugs as I did coding. Once the plugin worked, I wrote unit tests to make sure it kept working.
</blockquote>
<p>
He introduces the QUnit testing tool and includes some sample tests showing you how to create both a pass/fail and how to test a PHP value passed out to the page via PHP. There's also a section on getting WordPress and QUnit integrated and only executing when there's a "qunit" parameter on the URL. Actual tests for his calendar plugin are included and you can <a href="http://www.zackgrossbart.com/extras/sandbox/wp-admin/edit.php?page=cal&qunit=true">see the results of the tests here</a>.
</p>]]></description>
      <pubDate>Fri, 09 Mar 2012 10:46:32 -0600</pubDate>
    </item>
  </channel>
</rss>
