<?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>Sun, 19 May 2013 02:21:24 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Igor Wiedler: Stateless Services]]></title>
      <guid>http://www.phpdeveloper.org/news/19410</guid>
      <link>http://www.phpdeveloper.org/news/19410</link>
      <description><![CDATA[<p>
<i>Igor Wiedler</i> has a recent post to his site about creating <a href="https://igor.io/2013/03/31/stateless-services.html">stateless services</a>, specifically in the context of using a dependency injection container to manage the objects your application uses.
</p>
<blockquote>
As more frameworks and libraries, particularly in the PHP world, move towards adopting the Dependency Injection pattern they are all faced with the problem of bootstrapping their application and constructing the object graph. In many cases this is solved by a Dependency Injection Container (DIC). Such a container manages the creation of all the things. The things it manages are services. Or are they?
</blockquote>
<p>
He notes that, according to some of the principles of domain-driven design, "services" should be stateless - the results of calls to the service shouldn't alter it, it should only depend on the values passed in. He goes on to put this into the context of a DIC and gives an example of the "request service" (and how it violates the DDD principles of statelessness). He talks some about scopes (dependencies) and mutable services. He talks about methods to get around these issues with the "request" instance, ultimately coming to the conclusion that event listeners might be the way to go.
</p>
Link: https://igor.io/2013/03/31/stateless-services.html]]></description>
      <pubDate>Thu, 04 Apr 2013 10:41:50 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: Sending Email with Swift Mailer]]></title>
      <guid>http://www.phpdeveloper.org/news/18840</guid>
      <link>http://www.phpdeveloper.org/news/18840</link>
      <description><![CDATA[<p>
On PHPMaster.com today there's a new tutorial showing you <a href="http://phpmaster.com/sending-email-with-swift-mailer/">how to use Swift Mailer</a>, a popular (and well-established) mailing tool.
</p>
<blockquote>
Sending emails programmatically is a common task that programmers must deal with often. Although you can use PHP's native functions, they can be too low-level, especially when you want to attach one or more files to your message. If you don't want to use the native functions, or if you want to send mail using an object-oriented approach, then this is the article for you. I'll introduce you to <a href="http://swiftmailer.org/">Swift Mailer</a>, a powerful component-based library that let's you send emails easily. Started in 2005, Swift Mailer is a library that provides several classes that allow you to send emails from within your PHP scripts or web applications. 
</blockquote>
<p>
Included in the post are a basic example of sending a plain-text email, working with attachments and including a template into the body of the message (with spots to fill text in).
</p>]]></description>
      <pubDate>Tue, 04 Dec 2012 11:34:54 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Gonzalo Ayuso: Managing Windows services with Symfony/Process and PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/18681</guid>
      <link>http://www.phpdeveloper.org/news/18681</link>
      <description><![CDATA[<p>
In his <a href="http://gonzalo123.com/2012/10/29/managing-windows-services-with-symfonyprocess-and-php/">recent post</a> <i>Gonzalo Ayuso</i> shows how to use Symfony to work with Windows services on the server.
</p>
<blockquote>
Sometimes I need to stop/start remote Windows services with PHP. It's quite easy to do it with net commnand. This command is a tool for administration of Samba and remote CIFS servers. [...] Today we are going to create a PHP wrapper for [net rpc service].
</blockquote>
<p>
He uses <a href="http://behat.org/">Behat</a> to create a feature (test) file, the code behind the features and a service class that handles the actual work of interacting with the service (with methods to do things like stop, start and list running services). Examples of its use are also included.
</p>]]></description>
      <pubDate>Thu, 01 Nov 2012 10:49:09 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Rob Allen: Setting up PHP & MySQL on OS X 10.8 Mountain Lion]]></title>
      <guid>http://www.phpdeveloper.org/news/18422</guid>
      <link>http://www.phpdeveloper.org/news/18422</link>
      <description><![CDATA[<p>
<i>Rob Allen</i> has posted some notes to his site helping you get <a href="http://akrabat.com/computing/setting-up-php-mysql-on-os-x-10-8-mountain-lion/">PHP set up on OSX Lion (10.8)</a> successfully.
</p>
<blockquote>
With OS X 10.8, Apple continues to ship PHP 5.3 with Xdebug, PEAR, GD and PDO_MYSQL. This is how to set it up from a clean install of 10.8.
</blockquote>
<p>
He's broken it up into a few sections including the MySQL setup, Apache configuration 
, updating the main php.ini and setting up PHPUnit ("and friends") for your testing. He also includes setup instructions for the mcrypt and the PECL <a href="http://php.net/manual/en/book.oauth.php">OAuth</a> extensions.
</p>]]></description>
      <pubDate>Thu, 30 Aug 2012 09:09:12 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Lorna Mitchell: Installing PEAR Packages Offline]]></title>
      <guid>http://www.phpdeveloper.org/news/18290</guid>
      <link>http://www.phpdeveloper.org/news/18290</link>
      <description><![CDATA[<p>
Since you can't always be online when you need to install new libraries you'll need for your PHP work, <i>Lorna Mitchell</i> has <a href="http://www.lornajane.net/posts/2012/installing-pear-packages-offline">posted a quick guide</a> to downloading and installing PEAR packages when you're offline.
</p>
<blockquote>
As with most tools that work really well, I know very little about PEAR. I mean, I use it all the time, and I love it for getting all the extensions installed that I need for the work I do. [...] However I'm now in a situation where I might need to install PEAR packages with a connection that may or may not be working, and I'm not sure exactly which packages I might need, so I wanted to know whether I could use PEAR as my packaging tool even when I wasn't able to reach the usual channels. And guess what? I can!
</blockquote>
<p>
The install is a pretty simple two-step process - just download the package(s) you'll need for your development and point the PEAR installer (you'll need this installed first, obviously) at the archive file. It's smart enough to take care of the rest.
</p>]]></description>
      <pubDate>Mon, 30 Jul 2012 12:09:41 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Stuart Herbert's Blog: Getting PEAR Working On Windows 7]]></title>
      <guid>http://www.phpdeveloper.org/news/17940</guid>
      <link>http://www.phpdeveloper.org/news/17940</link>
      <description><![CDATA[<p>
<i>Stuart Herbert</i> has a new post today showing how to get the well-established <a href="http://pear.php.net">PEAR</a> package management system <a href="http://blog.stuartherbert.com/php/2012/05/10/getting-pear-working-on-windows-7/">working on Windows 7</a> so you can easily call "pear install" on whatever your needs might be.
</p>
<blockquote>
So that I don't forget how to do this next time around. Worked for me, your mileage may vary. First step is to get a working install of PHP. [...] At this point, you should be able to open up a Command Prompt, and type 'php -v', and see the response 'PHP v5.4.latest …' appear as expected. Now for PEAR itself.
</blockquote>
<p>
He gives step-by-step instructions on how to get PEAR up and running - downloading and configuring it with the correct Windows-based paths and using the PEAR_ENV.reg file to update your registry.
</p>]]></description>
      <pubDate>Thu, 10 May 2012 10:43:49 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: An Introduction to Services]]></title>
      <guid>http://www.phpdeveloper.org/news/17771</guid>
      <link>http://www.phpdeveloper.org/news/17771</link>
      <description><![CDATA[<p>
On PHPMaster.com today there's a new article from <i>Alejandro Gervasio</i> introducing you to <a href="http://phpmaster.com/an-introduction-to-services/">the concept of "services"</a>, a layer put on top of your models to make a common API that's easier to reuse.
</p>
<blockquote>
Don't let the definition freak you out, as if you've been using MVC for a while the chances are you've used a service already. Controllers are often called services, as they carry out application logic and additionally are capable of interfacing to several client layers, namely views. Of course in a more demanding environment, plain controllers fail short in handling several clients without the aforementioned duplicating, so that's why the construction of a standalone layer is more suitable in such cases.
</blockquote>
<p>
He explains the process behind creating a simple domain model (<a href="http://cdn.phpmaster.com/files/2012/02/service_diagram.png">image here</a>)  and shows how the Service layer wraps it up into a simpler interface, leaving the model to handle the business logic. He uses the example of an "EncoderInterface" that's implemented in a "JsonEncoder" and "Serializer" to both provide a "setData" method. 
</p>]]></description>
      <pubDate>Tue, 03 Apr 2012 13:12:16 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Phil Sturgeon's Blog: Packages: The Way Forward for PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/17636</guid>
      <link>http://www.phpdeveloper.org/news/17636</link>
      <description><![CDATA[<p>
In <a herf="http://philsturgeon.co.uk/blog/2012/03/packages-the-way-forward-for-php">this new post</a> to his blog <i>Phil Sturgeon</i> talks about what he (and apparently several others) think is the "way forward for PHP" to make it a better language and ecosystem - packages.
</p>
<blockquote>
What is a package? A package is a piece of reusable code that can be dropped into any application and be used without any tinkering to add functionality to that code. [...] Most package systems also allow for something called dependencies. [...] This is how most modern programming languages work, but to make a generalisation: PHP developers hate packages. Why? Well while other languages have great systems like <a href="http://www.cpan.org/">CPAN</a> for Perl, <a href="http://rubygems.org/">Gems</a> for Ruby, PIP, PHP has had a terrible history with package management going back years.
</blockquote>
<p>
He talks about one of the main current packaging systems, <a href="http://pear.php.net">PEAR</a>, and how, despite its attempts, it just hasn't seen the adoption the package management of other languages has. <i>Phil</i> makes a recommendation that is slowly becoming more and more popular in the PHP community - building "unframeworks". These sets of reusable components (similar to the ideas behind <a href="http://auraphp.github.com/">Aura</a>, <a href="http://symfony.com">Symfony</a> and <a href="http://framework.zend.com/zf2">Zend Framework 2</a>) are designed to be dropped in and used without the dependencies of the frameworks they live in. He points to the <a href="http://getcomposer.org/">Composer</a>/<a href="http://packagist.org/">Packagist</a> dynamic duo as a way through all of the current packaging issues - a simple way to make any project an installable package just by adding a configuration file.
</p>]]></description>
      <pubDate>Wed, 07 Mar 2012 08:29:57 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Till Klampaeckel's Blog: Deploying PHP applications: PEAR and composer resources for chef]]></title>
      <guid>http://www.phpdeveloper.org/news/17592</guid>
      <link>http://www.phpdeveloper.org/news/17592</link>
      <description><![CDATA[<p>
In a new post to his site <i>Till Klampaeckel</i> shows how to <a href="http://till.klampaeckel.de/blog/archives/180-Deploying-PHP-applications-PEAR-and-composer-resources-for-chef.html">use PEAR and composer resources</a> (two popular PHP package management tools) from inside of a chef deployment script.
</p>
<blockquote>
This is something experimental I have been working on for our chef deployments. So the objective was/is to find a sane way to install PEAR packages and install dependencies with composer.
</blockquote>
<p>
He shows how to set up the configuration script to discover a new PEAR channel, make the chef script not "fail hard" if a command returns a failed response code (as PEAR will do if the channel is already discovered). The "ignore_failure" configuration directive comes in handy for this. He also shows how to implement a <a href="http://wiki.opscode.com/display/chef/Lightweight+Resources+and+Providers+%28LWRP%29">LWRP</a> in chef for both a PEAR and Composer resource. 
</p>
<p>
You can find the code for this and other cookbook examples <a href="https://github.com/till/easybib-cookbooks/tree/master/php/">on his github account</a>.
</p>]]></description>
      <pubDate>Mon, 27 Feb 2012 13:17:57 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Sameer Borate's Blog: Building a adjacency matrix of a graph]]></title>
      <guid>http://www.phpdeveloper.org/news/17555</guid>
      <link>http://www.phpdeveloper.org/news/17555</link>
      <description><![CDATA[<p>
Building on the graphing tutorial in <a href="http://phpdeveloper.org/news/17543">his last post</a> <i>Sameer</i> continues on looking at graphs in PHP with <a href="http://www.codediesel.com/algorithms/building-a-adjacency-matrix-of-a-graph/">this new post</a> showing how to create an "agency matrix" of a currently built graph.
</p>
<blockquote>
Building a graph is not enough; we also need the ability to search through it. To make it easier to build search algorithms, it is useful if we can represent the graph and its connections in a different way; adjacency matrix being one such representation. An adjacency matrix is a means of representing which vertices (or nodes) of a graph are adjacent to which other vertices.
</blockquote>
<p>
He includes some sample code to extract the data from a graph (built with the PEAR Structures_Graph package) and create a basic "table" of information about each nodes' connections. 
</p>]]></description>
      <pubDate>Fri, 17 Feb 2012 09:19:12 -0600</pubDate>
    </item>
  </channel>
</rss>
