<?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, 24 May 2012 15:18:01 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Danne Lundqvist's Blog: Getting to grips with an existing XML structure]]></title>
      <guid>http://www.phpdeveloper.org/news/17864</guid>
      <link>http://www.phpdeveloper.org/news/17864</link>
      <description><![CDATA[<p>
<i>Danne Lundqvist</i> has a new post where he shares a bit of code he's written to "come to grips" with <a href="http://www.dotvoid.com/2012/04/getting-to-grips-with-an-existing-xml-structure/">an existing XML structure</a>.
</p>
<blockquote>
Very often I find myself writing input filters for large XML files using PHP. Common enough task; and PHP offer a great variety of tools to do this effectively depending on the situation. Unfortunately, almost as common is the lack of documentation for the aforementioned XML files. [...] I have looked around for a simple tool but I didn't really find a  tool that gave me the quick and dirty overview I wanted. A year or so ago I finally wrote a small PHP class to analyze large XML files.
</blockquote>
<p>
He includes an example XML file, the <a href="http://www.dotvoid.com/wp-content/uploads/2012/04/xmlstruct.png">HTML output</a> of the parsing and a sample of how to use <a href="http://www.dotvoid.com/wp-content/uploads/2012/04/xmlgrips.tar.gz">the class</a> to parse and output the XML structure, complete with some CSS.
</p>]]></description>
      <pubDate>Wed, 25 Apr 2012 10:44:43 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Sameer Borate's Blog: Building a Graph data structure in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/17543</guid>
      <link>http://www.phpdeveloper.org/news/17543</link>
      <description><![CDATA[<p>
In the <a href="http://www.codediesel.com/algorithms/building-a-graph-data-structure-in-php">latest post</a> to his blog <i>Sameer Borate</i> takes a look at using the <a href="http://pear.php.net/package/Structures_Graph/download">Structures_Graph</a> package from PEAR to create data structures in PHP with linked nodes for directed and undirected graphs.
</p>
<blockquote>
The Pear Structures_Graph package allows creating and manipulating graph data structures. It allows building of either directed or undirected graphs, with data and metadata stored in nodes. The library provides functions for graph traversing as well as for characteristic extraction from the graph topology.
</blockquote>
<p>
After sharing the one-line install, he shows how to create some instances of the package's Nodes and how to connect them to a graph and link them to other nodes. He includes a few examples - a simpler one with multiple nodes joined in a directed graph, another showing how to associate data with a node and how to query the graph for node connections and testing to see if the graph is <a href="http://en.wikipedia.org/wiki/Directed_acyclic_graph">acyclic</a>.
</p>]]></description>
      <pubDate>Wed, 15 Feb 2012 09:35:15 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Larry Garfield's Blog: PHP project structure survey]]></title>
      <guid>http://www.phpdeveloper.org/news/17401</guid>
      <link>http://www.phpdeveloper.org/news/17401</link>
      <description><![CDATA[<p>
<i>Larry Garfield</i> has posted the results of some of his research into popular PHP frameworks and projects and <a href="http://www.garfieldtech.com/blog/php-project-structure">see how they handle their structure</a> as it relates to the PSR-0 standard.
</p>
<blockquote>
As <a href="http://drupal.org/">Drupal</a> is in the process of considering how to restructure code to best leverage the PSR-0 standard, I figured it would be wise to take a quick survey of how some other major projects organize their code bases. This is not a complete rundown of every project, simply roughly comparable notes for those areas Drupal is currently discussing. I am posting it here in the hopes that it will be useful to more than just Drupal.
</blockquote>
<p>The projects he looked to for his examples were:</p>
<ul>
<li><a href="http://cakephp.org/">CakePHP</a>
<li><a href="http://symfony.com/">Symfony2</a>
<li><a href="http://silex.sensiolabs.org/">Silex</a>
<li><a href="http://codeigniter.com/">CodeIgniter</a>
<li><a href="https://github.com/zendframework/zf2">Zend Framework 2</a>
<li><a href="http://packagist.org/">Composer</a>
</ul>]]></description>
      <pubDate>Mon, 16 Jan 2012 13:08:38 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[XpertDeveloper.com: Abstract in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/17055</guid>
      <link>http://www.phpdeveloper.org/news/17055</link>
      <description><![CDATA[<p>
On the XpertDeveloper.com site today there's a new tutorial talking about something that can not only help the structure of your application but can make things more reusable in the end - <a href="http://www.xpertdeveloper.com/2011/10/abstract-in-php/">abstract classes</a>.
</p>
<blockquote>
For Abstact keyword we can say that, abstract is type of the class and class which we can't create a object of it. Surprised???? [...] Abstract class can be used some what like an interface in PHP. So basically we can implement class using abstract. We can't extend more than one abstract class while we can implement more than one interface.
</blockquote>
<p>
They introduce you to the creation of an abstract class and show how to set up some abstract methods inside. These methods are required to be defined as a part of the extension in your class. One of the benefits they don't mention of abstract classes over interfaces is the ability to have methods in the abstract that are actual code, not just definitions of the structure (that's more of what <a href="http://us.php.net/interfaces">interfaces</a> are for).
</p>]]></description>
      <pubDate>Fri, 28 Oct 2011 09:55:07 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Stuart Herbert's Blog: PHP Components: Shipping Web Pages With Your Components]]></title>
      <guid>http://www.phpdeveloper.org/news/16726</guid>
      <link>http://www.phpdeveloper.org/news/16726</link>
      <description><![CDATA[<p>
<i>Stuart Herbert</i>'s latest post in his "PHP Components" series looks at an optional but handy thing you can include in your component's package - web pages (be they a manual or other kind of information). <a href="http://blog.stuartherbert.com/php/2011/08/16/php-components-shipping-web-pages-with-your-components/">This new post</a> talks about where they should lie in the component's package structure.
</p>
<blockquote>
I'm now going under the bonnet of our components, and looking at the different <a href="http://blog.stuartherbert.com/php/2011/04/04/explaining-file-roles/">file roles</a> that the PEAR installer expects to find when we distribute our component as a PEAR-compatible package. It isn't very often that a component needs to ship web pages too, but should the need arise, here's how to do it.
</blockquote>
<p>
He starts by defining what a "web page" could be (HTML, Javascript, CSS, etc) and gives <a href="http://blog.stuartherbert.com/php/wp-content/uploads/2011/08/php-www-role-11.png">the place in the hierarchy</a> they should fit. When you use the PEAR client to install the package, these files are placed in the "www" folder of your PEAR installation.
</p>]]></description>
      <pubDate>Tue, 16 Aug 2011 13:13:06 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Leaseweb Labs Blog: Tuning Zend framework and Doctrine]]></title>
      <guid>http://www.phpdeveloper.org/news/16635</guid>
      <link>http://www.phpdeveloper.org/news/16635</link>
      <description><![CDATA[<p>
On the Leaseweb Labs blog there's a recent post looking and some of the things you can do to <a href="http://www.leaseweblabs.com/2011/07/tuning-zend-framework-and-doctrine/">optimize Zend Framework and Doctrine</a> when used together for database access.
</p>
<blockquote>
In principle, the combination of Zend Framework with Doctrine is not too difficult. But first let's talk about the preparations. According to the author of Zend Framework, the default file structure of project can be a bit more optimal.
</blockquote>
<p>
They start by describing this optimized file structure (moving the models out of the modules and into the library) and what you'll need to change in Doctrine's configuration to make this work. The post also includes examples of what the larger config should look like when the changes are made. They show how to extend the default Doctrine CLI tool to make a custom "sandbox" instance and show some tuning you can do on the Zend Framework side so it can optimally work with the new models.
</p>]]></description>
      <pubDate>Tue, 26 Jul 2011 12:35:03 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Artur Ejsmont's Blog: How to structure a Zend Framework application and it's dependencies]]></title>
      <guid>http://www.phpdeveloper.org/news/16573</guid>
      <link>http://www.phpdeveloper.org/news/16573</link>
      <description><![CDATA[<p>
<i>Artur Ejsmont</i> has a recent post to his blog with some recommendations on how to <a href="http://artur.ejsmont.org/blog/content/how-to-structure-a-zend-framework-application-and-manage-internal-dependencies">structure a Zend Framework application and its dependencies</a> to make it both easy to maintain and extend in the future.
</p>
<blockquote>
I don't mean to be negative but I am not too happy about the web application structure that most articles and books present. In Zend Framework world controller seems to be the place when things get done. Controller is the workhorse and this is where all the logic seems to be buried. 
</blockquote>
<p>
He talks about the non-reusability of controllers outside of a web-based environment and the bad habits that can come from depending on variables of that environment. He's <a href="http://artur.ejsmont.org/blog/sites/default/files/ZendFrameworkAppStructurev5.jpg">come up with a diagram</a> of how he thinks a good, modular Zend Framework application should be structured where the emphasis is on Services, not web requests. He looks at database aware/agnostic services, working with models, third-party code and working with external systems. He also touches on the "V" and "C" in MVC, noting how the views and controllers still fit into the mix.
</p>]]></description>
      <pubDate>Mon, 11 Jul 2011 09:17:40 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Smashing Magazine: Cleaning Up The Mess: How To Keep Your Coding Workflow Organized]]></title>
      <guid>http://www.phpdeveloper.org/news/15784</guid>
      <link>http://www.phpdeveloper.org/news/15784</link>
      <description><![CDATA[<p>
On the Smashing Magazine site today <i>Brian Hoyt</i> <a href="http://www.smashingmagazine.com/2011/01/19/cleaning-up-the-mess-how-to-keep-your-coding-workflow-organized/">has some suggestions</a> for you to use to keep your workflow organized when developing your applications (code, file structure, assets, database, etc).
</p>
<blockquote>
Perhaps in the past you've tried to build a more complex, cutting-edge website like [our example], and the project started off with great enthusiasm, but ended up in a nightmarish mess that you couldn't maintain. Your client lost interest when new features started getting too hard to add, and you started having to work late at night, tracking down bugs that you couldn't even find the relevant file for. After a project like that, it's not hard to see the relevance of a well-organized website project.
</blockquote>
<p>
He talks about some general principles like "don't over-organize" and "don't mix aspects of the site" as well as some more specific things like a website size to structure recommendation and parts of a site and how to handle them - assets, stylesheets, javascript, the database structure/values and, of course, the code.
</p>]]></description>
      <pubDate>Fri, 21 Jan 2011 10:47:10 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[OpenSky Blog: Inheritance in PHP, or why you want to use an Interface or an Abstract class...]]></title>
      <guid>http://www.phpdeveloper.org/news/15514</guid>
      <link>http://www.phpdeveloper.org/news/15514</link>
      <description><![CDATA[<p>
On the OpenSky blog today there's <a href="http://engineering.shopopensky.com/post/inheritance-in-php-or-why-you-want-to-use-an-interface-or-an-abstract-class">a new post</a> about object oriented development and class structure. More specifically about how you should use interfaces and abstract classes if you want to truly lock down the methods of your classes.
</p>
<blockquote>
Every class has an interface, every class can be typehinted as a method argument, typehint lets you specify the collaborator requirements. Not every typehint is the same.
</blockquote>
<p>
He includes an example of how, despite a "BankAccount" type hint, classes for different types of accounts can be created and methods from the parent can be overwritten. To help remedy the situation, he shows a more structured example that uses interfaces/an abstract class to define the BankAccount structure, setting requirements on the child class functionality. 
</p>]]></description>
      <pubDate>Tue, 30 Nov 2010 11:09:17 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[David Gardner's Blog: Why you should always use PHP interfaces]]></title>
      <guid>http://www.phpdeveloper.org/news/15493</guid>
      <link>http://www.phpdeveloper.org/news/15493</link>
      <description><![CDATA[<p>
<i>David Gardner</i> has <a href="http://www.davegardner.me.uk/blog/2010/11/21/why-you-should-always-use-php-interfaces/">a suggestion for your development</a> that he thinks can help keep things neat and tidy - using interfaces.
</p>
<blockquote>
This post was sparked by a very simple question from an ex-colleague: "Why bother with PHP interfaces?" The subtext here was that the classes themselves contain the interface definition (through the methods they define) and hence interfaces are not needed, particularly where there is only one class that implements a given interface.
</blockquote>
<p>
He talks about two reasons he things that interfaces could be beneficial - they help you think about things "the right way" of planning out structure before implementation and that it makes things more "future proof" the code by forcing future elements into the same mold as the current use.
</p>]]></description>
      <pubDate>Thu, 25 Nov 2010 11:46:37 -0600</pubDate>
    </item>
  </channel>
</rss>

