<?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, 22 May 2012 13:46:58 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Ralph Schindler's Blog: PHP Constructor Best Practices And The Prototype Pattern]]></title>
      <guid>http://www.phpdeveloper.org/news/17659</guid>
      <link>http://www.phpdeveloper.org/news/17659</link>
      <description><![CDATA[<p>
In <a href="http://ralphschindler.com/2012/03/09/php-constructor-best-practices-and-the-prototype-pattern">this new post</a> <i>Ralph Schindler</i> takes a look at the Prototype design pattern and uses it to illustrate some best practices in using constructors in PHP.
</p>
<blockquote>
If your knowledge of constructors ends with "the place where I put my object initialization code," read on. While this is mostly what a constructor is, the way a developer crafts their class constructor greatly impacts the initial API of a particular class/object; which ultimately affects usability and extensibility. After all, the constructor is the first impression a particular class can make.
</blockquote>
<p>
He starts at ground level, reintroducing what a constructor is and what it should (and shouldn't) be used for. He talks about constructor overloading, constructor injection, dynamic class extension and using the <a href="http://en.wikipedia.org/wiki/Prototype_pattern">Prototype pattern</a> to create "an unlimited number of objects of a particular type, with dependencies in tact, each with slight variations." He gives an example with a "DbAdapter" class, showing dynamic class instantiation and how to, using the Prototype method, inject a DbAdapter object and have your class use that instead.
</p>]]></description>
      <pubDate>Mon, 12 Mar 2012 11:26:10 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Hari KT's Blog: Is there a design flaw for the Components or Packages made by Symfony2 and ZF2]]></title>
      <guid>http://www.phpdeveloper.org/news/17651</guid>
      <link>http://www.phpdeveloper.org/news/17651</link>
      <description><![CDATA[<p>
<i>Hari K T</i> has <a href="http://harikt.com/any-design-flaw-for-components-packages-for-symfony2-zf2">a new post</a> to his blog that shares his concern about a "design flaw" in the component/package methods promoted by Symfony2 and Zend Framework 2:
</p>
<blockquote>
Looking from outside both Symfony2 and ZF2 is full of standalone components. But the reality is not the same. Though Symfony2 components are split into each components in github, you cannot give a pull request to that component. The tests for all the components still resides in the <a href="https://github.com/symfony/symfony/tree/master/tests/Symfony/Tests/Component">core</a>. 
</blockquote>
<p>
He points to the <a href="https://github.com/auraphp">Aura</a> framework project as a good example of how to make a truly component-centric set of tools complete with tests bundled into the component's download right next to the source.
</p>]]></description>
      <pubDate>Fri, 09 Mar 2012 09:03:36 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: Understanding the Observer Pattern]]></title>
      <guid>http://www.phpdeveloper.org/news/17578</guid>
      <link>http://www.phpdeveloper.org/news/17578</link>
      <description><![CDATA[<p>
PHPMaster.com has a new tutorial looking at another popular design pattern, the <a href="http://phpmaster.com/understanding-the-observer-pattern/">Observer pattern</a>, and sharing some example code putting it to use. (Their other design pattern articles include ones on <a href="http://phpmaster.com/understanding-the-command-design-pattern/">command</a> and <a href="http://phpmaster.com/understanding-the-factory-method-design-pattern/">factory</a> patterns).
</p>
<blockquote>
In this article I'll show you how to implement the Observer Pattern. You'll learn how various classes in the pattern relate to one another as subject and observers, how the subject notifies observers of a change in its state, and how to identify scenarios where it would be suitable to use the Observer Pattern in your own code.
</blockquote>
<p>
The introduce the pattern by using an abstract "Observer" and "Subject" (that defines "attach", "detach", "getState", "setState", "notify" and "getObservers" methods) observer classes to coordinate the attached classes. They extend these classes with "Auth" and "Auth_ForumHook" show how to attach the "Auth_ForumHook" classes to the main "Auth" observer manager and change the state of the observer to notify it of an update.
</p>
<p>
You can find a more detailed explanation of the Observer pattern <a href="http://en.wikipedia.org/wiki/Observer_pattern">on Wikipedia</a>.
</p>]]></description>
      <pubDate>Thu, 23 Feb 2012 11:39:10 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Developer Drive: Building a PHP Ad Tracker: Data Object Design and Coding]]></title>
      <guid>http://www.phpdeveloper.org/news/17518</guid>
      <link>http://www.phpdeveloper.org/news/17518</link>
      <description><![CDATA[<p>
Continuing on from <a href="http://phpdeveloper.org/news/17400">the first part</a> of their tutorial series about creating a simple ad tracker for your web application, Developer Drive is back with <a href="http://www.developerdrive.com/2012/02/php-ad-tracker-part-ii-data-object-design/">part two</a>, a more in-depth look at the actual object design and code.
</p>
<blockquote>
In our last PHP Ad Tracker lesson, we constructed the database tables for our ad banner application. Now we are ready to construct the data object that will hold the variables and functions that will display, add, edit and delete the data in those tables.
</blockquote>
<p>
They cover each of the variables they'll be using with a summary of what they're used for as well as the various functions to be defined and what they'll return. Following this, they get into the actual development - creating an "ads" class and defining the methods to get the current ad count, get the number of clients and pull the actual client/ad data.
</p>]]></description>
      <pubDate>Wed, 08 Feb 2012 12:57:54 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Reddit.com: PHP.net gets a new design. Opinions divided]]></title>
      <guid>http://www.phpdeveloper.org/news/17448</guid>
      <link>http://www.phpdeveloper.org/news/17448</link>
      <description><![CDATA[<p>
In <a href="http://www.reddit.com/r/PHP/comments/om9gm/phpnet_gets_a_new_design_opinions_divided_great/">this recent post</a> on Reddit.com, there's some good discussion/feedback about the <a href="http://prototype.php.net/">proposed redesign of PHP.net</a>.
</p>
<p>Opinions from commentors range widly:</p>
<ul>
<li>"The layout's nice. But those colors are downright disgusting."
<li>"To be honest, the new version is 100x better."
<li>"It's definitely way better than the old design but still not exactly great is it?.."
<li>"Much more profressional. Welcome to the 21st century PHP.net."
</ul>
<p>
Have an opinion on <a href="http://prototype.php.net/">the new layout</a>? <a href="http://www.reddit.com/r/PHP/comments/om9gm/phpnet_gets_a_new_design_opinions_divided_great/">voice it here</a>!
</p>]]></description>
      <pubDate>Wed, 25 Jan 2012 11:08:43 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[DZone.com: Open/Closed Principle on real world code]]></title>
      <guid>http://www.phpdeveloper.org/news/17389</guid>
      <link>http://www.phpdeveloper.org/news/17389</link>
      <description><![CDATA[<p>
In a new post to DZone.com <i>Giorgio Sironi</i> talks about the "open/closed principle" in software development and shows an example based on the design of the <a href="https://github.com/giorgiosironi/phpunit-selenium">PHPUnit_Selenium</a> project.
</p>
<blockquote>
This article shows an example of how the application of the Open/Closed Principle improved the design of a real project, the open source library <a href="https://github.com/giorgiosironi/phpunit-selenium">PHPUnit_Selenium</a>. These design concepts apply to every object-oriented language, including Java, Ruby or even C++. The <a href="http://butunclebob.com/ArticleS.UncleBob.PrinciplesOfOod">Open Closed Principle</a>, part of SOLID set, states that software should be open for extension and at the same time closed for modification.
</blockquote>
<p>
He starts with a little background on the project, pointing out that there's a Session object it uses for all of its testing with a magic "__call" method that handles any kind of method call to the object. This method has issues (dependencies, strict requirements for use) but can be refactored according to the Open/Closed idea to set up an array of anonymous functions that can be called as a "command". Examples of these types of classes are also included (one for the "click" action on a button and another for getting the current location).
</p>]]></description>
      <pubDate>Fri, 13 Jan 2012 09:05:53 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Decal CMS Blog: Testing your website before launching: how to let content drive design (Part 1)]]></title>
      <guid>http://www.phpdeveloper.org/news/16841</guid>
      <link>http://www.phpdeveloper.org/news/16841</link>
      <description><![CDATA[<p>
New from the Decal blog today there's a <a href="http://www.decalcms.com/page/Testing_your_website_before_launching_how_to_let_content_drive_design">general post about testing</a>, not writing tests for your code but testing methods for your site as a whole (like A/B testing). This is the first part of a series.
</p>
<blockquote>
For a long time, we here at Working Software have been strong believers in the "content precedes design" philosophy, as famously espoused by <a href="http://www.zeldman.com/2008/05/06/content-precedes-design/">Jeffrey Zeldman</a> and summarised here on <a href="http://uxmyths.com/post/718187422/myth-you-dont-need-the-content-to-design-a-website">UX Myths</a>. [...] We are relaunching this website so we'd gone through the process of creating our "content first" wireframe using Decal Mockups.
</blockquote>
<p>
They go through their entire process - how they decided what to test on the site, the methods they chose for the testing (including <a href="http://pickfu.com/">PickFu</a> and <a href="http://feedbackarmy.com/">Feedback Army</a>) and some of the results of the feedback from each.
</p>]]></description>
      <pubDate>Fri, 09 Sep 2011 13:05:42 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Tibo Beijen's Blog: DDD using Doctrine 2: A case study]]></title>
      <guid>http://www.phpdeveloper.org/news/16528</guid>
      <link>http://www.phpdeveloper.org/news/16528</link>
      <description><![CDATA[<p>
In a new post to his blog <i>Tibo Beijen</i> <a href="http://www.tibobeijen.nl/blog/2011/06/27/ddd-using-doctrine-2-a-case-study/">presents a case study</a> about doing Domain Driven Design in an application using <a href="http://www.doctrine-project.org/projects/orm/2.0/docs/en">Doctrine2</a> to work with objects and your database.
</p>
<blockquote>
Nowadays developing web applications usually requires a flexible process due to changing business logic, shifting priorities or new insights. Besides choosing the right methodology this also requires designing the application in such a way that this flexibility can be achieved. [...] In this article I will show how to implement a specific case using Doctrine 2. Full code accompanying this article can be <a href="https://github.com/TBeijen/DDD-HRM/tree/v001">found on GitHub</a>. 
</blockquote>
<p>
He starts by describing the entities (User/TimeSheet/TimeSheetStatusChange) and how they're defined in Doctrine objects. He modifies them to build in some business-level restrictions like "status changes are only allowed in a certain order". He shows that the domain models presented are about more than just working with the database tables. They enforce rules that effect the flow of the application as well.
</p>]]></description>
      <pubDate>Tue, 28 Jun 2011 10:54:15 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Michelangelo van Dam's Blog: Book review: CMS Design Using PHP and JQuery]]></title>
      <guid>http://www.phpdeveloper.org/news/15952</guid>
      <link>http://www.phpdeveloper.org/news/15952</link>
      <description><![CDATA[<p>
<i>Michelangelo van Dam</i> has posted a <a href="http://www.dragonbe.com/2011/02/book-review-cms-design-using-php-and.html">new book review today</a> about an offering from from Packt Publishing - CMS Design Using PHP and jQuery.
</p>
<blockquote>
After receiving <a href="https://www.packtpub.com/cms-design-using-php-and-jquery/book">the book</a> I started reading it. But right from the start the author displayed bad practices and mis-use of PHP. Reading the book from front to back, the author <a href="http://verens.com/">Kae Verens</a> (<a href="http://twitter.com/#%21/kae_verens">@kae_verens</a>) has confronted me with bad use of variables (like $a, $b, $c), bad use of PHP structures and a complete wrong approach of using JavaScript, where JavaScript should enrich an application instead of incorporating business logic.
</blockquote>
<p>
In his "good" category fell things like the interesting variety of jQuery plugins mentioned and how the CMS example was broken up into easily digestible chunks. Unfortunately, most of the rest of the book falls into his "bad" and "ugly" category" including the structure of the application, the quality of the code and the lack of filtering/validation that was done on input.
</p>]]></description>
      <pubDate>Wed, 23 Feb 2011 13:37:19 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Smashing Magazine: Upcoming Conferences and Events for Designers and Developers in 2011]]></title>
      <guid>http://www.phpdeveloper.org/news/15907</guid>
      <link>http://www.phpdeveloper.org/news/15907</link>
      <description><![CDATA[<p>
Smashing Magazine has posted their latest <a href="http://www.smashingmagazine.com/2011/02/14/upcoming-events-and-conferences-for-designers-and-developers-in-2011/">Upcoming Conferences</a> list for the events happening in March through August of 2011.
</p>
<blockquote>
We're well into 2011, and many designers and developers around the world are planning their travels for the year, including the possibility of attending any Web design or development conferences. To help you out with your plans for the upcoming months, we've put together a list of conferences and events that you might want to consider. This particular post covers events taking place in about a six month timeframe that ends in late August and early September.
</blockquote>
<p>
Their list includes PHP-related events such as the <a href="http://phpconference.com/">International PHP Conference</a> and events surrounding many other technologies like Ruby, Photoshop, MySQL, Javascript and lots of other more business-minded sort of events. Check out their <a href="http://www.smashingmagazine.com/2011/02/14/upcoming-events-and-conferences-for-designers-and-developers-in-2011/">full list</a> to see which ones you might want to attend.
</p>]]></description>
      <pubDate>Tue, 15 Feb 2011 10:42:03 -0600</pubDate>
    </item>
  </channel>
</rss>

