<?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>Tue, 21 May 2013 07:13:30 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Gonzalo Ayuso: Enqueue Symfony's process components with PHP and ZeroMQ]]></title>
      <guid>http://www.phpdeveloper.org/news/19434</guid>
      <link>http://www.phpdeveloper.org/news/19434</link>
      <description><![CDATA[<p>
<i>Gonzalo Ayuso</i> has a new post today showing how he set up <a href="http://gonzalo123.com/2013/04/08/building-a-zeromq-enqueue-with-php/">queuing with ZeroMQ and Symfony components</a> and <a href="http://reactphp.org/">React</a>.
</p>
<blockquote>
Today I'd like to play with <a href="http://www.zeromq.org/">ZeroMQ</a>. ZeroMQ is a great tool to work with sockets. I will show you the problem that I want to solve: One web application needs to execute background processes but I need to execute those processes in order. Two users cannot execute one process at the same time. OK, if we face to this problem we can use Gearman. I've written various posts about Gearman (<a href="http://gonzalo123.com/2011/03/07/watermarks-in-our-images-with-php-and-gearman/">here</a> and <a href="http://gonzalo123.com/2010/11/01/database-connection-pooling-with-php-and-gearman/">here</a> for example). But today I want to play with ZeroMQ.
</blockquote>
<p>
He uses React and some ZeroMQ bindings and Symfony's <a href="https://github.com/symfony/Process">Process</a> component to make a simple client and server for working with the queue and processes. A screencast is included in the post showing them making the connection and adding the new process. The full code can be found <a href="https://github.com/gonzalo123/zmqlifo">on github</a> (or installable <a href="https://packagist.org/packages/gonzalo123/zmqlifo">via Composer</a>)
</p>
Link: http://gonzalo123.com/2013/04/08/building-a-zeromq-enqueue-with-php]]></description>
      <pubDate>Tue, 09 Apr 2013 11:11:59 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Happy Accidents: Orno Skinny Series Part 1: Building a RESTful API]]></title>
      <guid>http://www.phpdeveloper.org/news/19332</guid>
      <link>http://www.phpdeveloper.org/news/19332</link>
      <description><![CDATA[<p>
On the Happy Accidents site there's <a href="http://happyaccidents.me/blog/orno-skinny-series-building-a-restful-api">a new post</a> talking about building a RESTful API (part one of the series) using the <a href="https://github.com/orno">Orno</a> dependency injection and MVC components.
</p>
<blockquote>
 have recently been writing a collection of PHP components exploring different design patterns for building applications. With the MVC layer close to completion I decided to write a couple of guides on how these components could be wired together to achieve several different application formats. First in this series will highlight the power of <a href="https://github.com/orno/di">OrnoDi</a> when used to resolve your objects, to do this we will be building a simple RESTful api with the minimal amount of configuration and bootstrap code. 
</blockquote>
<p>
He includes instructions to install the components (via Composer) and configure the DI container with the needed settings. He shows examples of the autoloading setup, how to handle the routing and how to create the sample model and controller to respond to the sample REST requests. 
</p>]]></description>
      <pubDate>Tue, 19 Mar 2013 11:36:54 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[DZone.com: The Wheel: Symfony Console]]></title>
      <guid>http://www.phpdeveloper.org/news/19307</guid>
      <link>http://www.phpdeveloper.org/news/19307</link>
      <description><![CDATA[<p>
In <a href="http://css.dzone.com/articles/wheel-symfony-console">this new post</a> to DZone.com, <i>Giorgio Sironi</i> kicks off a series that looks at reusable components in the PHP development world. In this first post of that series he looks at the <a href="http://symfony.com/doc/current/components/console/introduction.html">Symfony console component </a>.
</p>
<blockquote>
Symfony is one of the most popular open source PHP frameworks on the market. The Symfony Components, however, are loosely coupled projects that can be reused as a library outside of an application based on Symfony. The component this article explores is Console (symfony/console on Packagist and GitHub), dedicated to quickly build console applications.
</blockquote>
<p>
He goes on to talk about some of the "pros" of using the component (including built-in argument/input handing and multiple "commands") and some of the "cons" of is use (including its size and some of the built-in features you can't really work around).
</p>]]></description>
      <pubDate>Wed, 13 Mar 2013 11:22:31 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Paul Jones: Symfony Components: Sometimes Decoupled, Sometimes Not]]></title>
      <guid>http://www.phpdeveloper.org/news/18987</guid>
      <link>http://www.phpdeveloper.org/news/18987</link>
      <description><![CDATA[<p>
In <a href="http://paul-m-jones.com/archives/4263">this new post</a> to his site <i>Paul Jones</i> talks a bit more about coupling in frameworks (see some of his recent <a href="http://paul-m-jones.com/archives/category/programming/aura">Aura</a> posts for more), this time looking at how the <a href="http://symfony.com">Symfony</a> framework defines "decoupled" based on its object structure.
</p>
<blockquote>
Previously, on decoupling and dependencies, <a href="http://paul-m-jones.com/archives/4211">I said</a>: "Some [Symfony] commenters were dissatsifed with my use of unit testing requirements to discover what a package really depends on, as opposed to what its composer.json file states." I'm willing to allow that the Symfony commenters here might be right. Let's try looking at Symfony's claims and see how they stack up. 
</blockquote>
<p>
Based on <a href="http://symfony.com/components">a list</a> of components Symfony says don't have mandatory dependencies, he finds that - out of the fifteen given - four of them do have dependencies. 
</p>
<blockquote>
Does having mandatory dependencies make it a bad project? Not at all. It just means their statement of "no mandatory dependencies" (and related statements) is not true for all the components listed. Now, it may be that the Symfony folk have a different idea of what "decoupled" and "standalone" mean.
</blockquote>]]></description>
      <pubDate>Thu, 03 Jan 2013 11:09:26 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[MaltBlue.com: Zend Framework 2 Core Concepts - Dependency Injection]]></title>
      <guid>http://www.phpdeveloper.org/news/18902</guid>
      <link>http://www.phpdeveloper.org/news/18902</link>
      <description><![CDATA[<p>
In <a href="http://www.maltblue.com/articles-2/zend-framework-2-core-concepts-understanding-dependency-injection">this new post</a> <i>Matthew Setter</i> has posted about one of the core concepts behind the structure and use of Zend Framework 2, its use of dependency injection to handy object relationships and access (via Zend/Di).
</p>
<blockquote>
As Zend Framework 2 is well and truly here, before some of us who are new to it dive right on in, whether you're completely new or, like me, migrating from Zend Framework 1, it's really important to ensure that we understand the core concepts on which it's based. [...] In this, the first part in the series, I'm going to go through what dependency injection (DI) is. However, as there are a number of great posts already available on the topic by some very experienced developers, [...] I'm not going to rehash them.
</blockquote>
<p>
Instead he extracts out useful tips from posts of a few other sources on ZF2 and dependency injection in general: <a href="http://mwop.net/blog/260-Dependency-Injection-An-analogy.html">Matthew Weier O'Phinny</a>, the <a href="http://framework.zend.com/manual/2.0/en/modules/zend.di.introduction.html">ZF2 manual</a>, <i>Martin Fowler</i> on <a href="http://martinfowler.com/articles/injection.html"> dependency injection</a>, <a href="http://en.wikipedia.org/wiki/Dependency_injection">Wikipedia</a> and more. He also includes lots of links to more great articles on the subject, both ZF2-specific and for DI iin general.
</p>]]></description>
      <pubDate>Mon, 17 Dec 2012 10:09:53 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: Internationalization Made Easy]]></title>
      <guid>http://www.phpdeveloper.org/news/18732</guid>
      <link>http://www.phpdeveloper.org/news/18732</link>
      <description><![CDATA[<p>
In <a href="http://phpmaster.com/symfony-translation-internationalization-made-easy/">this new tutorial</a> posted to PHPMaster.com, <i>Hari K T</i> takes a look at internationalization in a Symfony2-based application using its own <a href="http://symfony.com/doc/2.0/book/translation.html">translation component</a>.
</p>
<blockquote>
If you've ever worked to develop a site which needed to be available in multiple languages then you know how difficult it can be. With the help of <a href="http://symfony.com/doc/2.0/book/translation.html">Symfony2&#8242;s Translation component</a> you can easily make internationalized sites. I'll show you how with some sample code and some discussion on its API.
</blockquote>
<p>
He includes a basic example of how the component works with the typical "hello world" translation from English to French. He mentions fallback locales, pluralization and the conversion between translation formats (like converting from a YAML file into a translation object).
</p>]]></description>
      <pubDate>Mon, 12 Nov 2012 13:15:58 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Gonzalo Ayuso: Combining Zend Framework2 and Symfony2 components with Composer to build PHP projects]]></title>
      <guid>http://www.phpdeveloper.org/news/18459</guid>
      <link>http://www.phpdeveloper.org/news/18459</link>
      <description><![CDATA[<p>
In his most recent post <i>Gonzalo Ayuso</i> shows you how to <a href="http://gonzalo123.wordpress.com/2012/09/10/combining-zend-framework2-and-symfony2-components-with-composer-to-build-php-projects/">merge Zend Framework 2 and Symfony2 components</a> into the same project using <a href="http://getcomposer.org">Composer</a>.
</p>
<blockquote>
Zend Framework 2 is finally <a href="http://framework.zend.com/">stable</a>. I must admit that I'm not a big fan of ZF (or even Symfony2) as a full stack framework. I normally prefer to use micro frameworks, but those two frameworks (ZF2 and SF2) are great as component libraries. Today we are going to build a simple console application (using <a href="http://symfony.com/doc/2.0/cookbook/console/console_command.html">symfony/console</a> component) to list the database tables (using <a href="http://framework.zend.com/manual/2.0/en/index.html#zend-db">zendframework/zend-db</a>'s Metadata).
</blockquote>
<p>
He starts with the information you'll need to put into your "composer.json" file to get the needed packages (and set up the autoloader a bit). Included in the post is the code to create his "SchemeCommand" class to make the new CLI command, one that connects to a database and echos out the metadata about the given table. A unit test is also included.
</p>]]></description>
      <pubDate>Mon, 10 Sep 2012 10:22:54 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Symfony Blog: Form Goodness in Symfony 2.1]]></title>
      <guid>http://www.phpdeveloper.org/news/18291</guid>
      <link>http://www.phpdeveloper.org/news/18291</link>
      <description><![CDATA[<p>
On the Symfony blog there's a new post from <i>Bernhard Schussek</i> about some of the changes that have <a href="http://symfony.com/blog/form-goodness-in-symfony-2-1">happened in the Forms component</a> of the Symfony 2 framework (in version 2.1).
</p>
<blockquote>
Those of you who already upgraded to Symfony 2.1 Beta probably noticed that the new version comes with many backwards compatibility breaks in the Form component. Many of you probably ask yourselves: Why? The simple answer is that the Form component is one of the most complex components in Symfony at all. 
</blockquote>
<p>
They list out some of the improvements (plus code showing then at work) for changes like:
</p>
<ul>
<li>No more bindRequest()
<li>Custom field constraints
<li>Error mapping fu
<li>Collection improvements
</ul>]]></description>
      <pubDate>Mon, 30 Jul 2012 13:41:26 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Evan Coury: Introduction to the Zend Framework 2 ServiceManager]]></title>
      <guid>http://www.phpdeveloper.org/news/18252</guid>
      <link>http://www.phpdeveloper.org/news/18252</link>
      <description><![CDATA[<p>
<i>Evan Coury</i> has <a href="http://blog.evan.pro/introduction-to-the-zend-framework-2-servicemanager">posted a quick guide</a> to one of the major features of the Zend Framework 2 project so far - the ServiceManager. He introduces the component and talks about some of its key features.
</p>
<blockquote>
So, what is the ServiceManager? Basically it's a registry, or container (the proper term is service locator) to hold various objects needed by your application, allowing you to easily practice <a href="http://en.wikipedia.org/wiki/Inversion_of_control">Inversion of Control</a>. The service manager holds just the information needed to lazily instantiate these objects as they're needed. So if you were thinking 'services' such as those composing a <a href="http://martinfowler.com/eaaCatalog/serviceLayer.html">service layer</a>, you might be better off thinking of the service manager more as an "object manager" or "instance manager".
</blockquote>
<p>
He mentons some of the functionality that comes with the component including invokables, factories, aliases, initializers, configuration classes and abstract factories. He also links to <a href="http://zend-framework-2-doc.readthedocs.org/en/latest/modules/zend.service.manager.quick.start.html">the ServiceManager quickstart</a> over in the Zend Framework 2 documentation for more information.
</p>
]]></description>
      <pubDate>Fri, 20 Jul 2012 08:55:09 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Matthew Weier O'Phinney's Blog: ZF2 Forms in Beta5]]></title>
      <guid>http://www.phpdeveloper.org/news/18198</guid>
      <link>http://www.phpdeveloper.org/news/18198</link>
      <description><![CDATA[<p>
In <a href="http://mwop.net/blog/2012-07-02-zf2-beta5-forms.html">this new post</a> to his blog, <i>Matthew Weier O'Phinney</i> about some of the recent updates in the latest beta (beta5) of the Zend Framework 2's "Forms" component.
</p>
<blockquote>
Forms are a nightmare for web development. They break the concept of separation of concerns: they have a display aspect (the actual HTML form), they have a validation aspect and the two mix, as you need to display validation error messages. On top of that, the submitted data is often directly related to your domain models, causing more issues. [...] Add to this that the validation logic may be re-usable outside of a forms context, and you've got a rather complex problem.
</blockquote>
<p>
He talks about the newly-rewritten form component along with the new InputFilter to accompany it. He includes an example of using this new component - making a User form that, based off of some annotation rules, does some validation on the property values and things like "required" and custom types. He also talks about some of the other features included in the new package like hydration, complex annotation support and tools to work with collections.
</p>
<p>
You can download this latest beta release <a href="http://packages.zendframework.com/">from the packages.zendframework.com</a> site.
</p>]]></description>
      <pubDate>Mon, 09 Jul 2012 09:34:05 -0500</pubDate>
    </item>
  </channel>
</rss>
