<?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>Wed, 19 Jun 2013 13:55:44 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Lukas Smith: Good design is no excuse for wasting time]]></title>
      <guid>http://www.phpdeveloper.org/news/19377</guid>
      <link>http://www.phpdeveloper.org/news/19377</link>
      <description><![CDATA[<p>
In his most recent post <i>Lukas Smith</i> suggests that <a href="http://pooteeweet.org/blog/0/2205#m2205">good design isn't an excuse for wasting time</a>. He's basically saying that Symfony2, because of how it's designed and implemented, isn't a RAD (rapid application development) framework and that it's about time for some layers to be added to help get it there.
</p>
<blockquote>
Symfony 1.x I would put into a category of frameworks focused on RAD, aka rapid application development. [...] So for those people who were happy focusing on the 80% use case Symfony2 is a step back. Suddenly the same features take longer to implement, take longer to modify later on and on top of that the learning curve is steeper.
</blockquote>
<p>
He suggests that work be put into "RAD layers" that can sit on top of Symfony2 and provide some of the more familiar features people are used to from things like CakePHP, Yii and CodeIgniter. There's been <a href="https://github.com/FriendsOfSymfony/FOSRestBundle/blob/master/Resources/doc/5-automatic-route-generation_single-restful-controller.md">a few</a> <a href="http://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/index.html">tries</a> to <a href="http://sonata-project.org/bundles/admin/master/doc/index.html">accomplish</a> this with only one getting the closest in his opinion - the <a href="http://rad.knplabs.com/">KnpBundle</a>.
</p>]]></description>
      <pubDate>Thu, 28 Mar 2013 11:51:51 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Lorna Mitchell: How NOT to Design Your API]]></title>
      <guid>http://www.phpdeveloper.org/news/19019</guid>
      <link>http://www.phpdeveloper.org/news/19019</link>
      <description><![CDATA[<p>
Recently <i>Lorna Mitchell</i> asked the wide world of Twitter about some of their recommendations of things <b>not</b> to do when creating an API. In <a href="http://www.lornajane.net/posts/2013/how-not-to-design-your-api">this new post</a> to her site, she gathers together those responses including comments about documentation, consistency and response codes.
</p>
<blockquote>
Recently I tweeted as a <a href="http://linktuesday.com/">#linktuesday</a> link the <a href="http://blog.programmableweb.com/2012/08/03/top-10-api-worst-practices/">10 Worst API Practices post from ProgrammableWeb</a>. Today, in search of some concrete examples of APIs implementing unhelpful antipatterns, I sent out a tweet for help: "What's the most frustrating inconsistent/misleading bit of API you've seen? Looking for cautionary tales!" [...] In the raft of responses (and thankyou all, this was fabulous, helpful and entertaining in equal parts!), there were some definite patterns that I'd like to share with you, in no particular order.
</blockquote>
<p>Comments came in from all over and talked about things like:</p>
<ul>
<li>Response codes not matching the content (ex. 200 on an error)
<li>NullPointerExceptions
<li>Different endpoints for single vs collections
<li>Order-sensitive XML in requests
<li>Poor error handling
<li>Bad documentation
<li>Incorrect content type handling
</ul>
<blockquote>
So there you have it, the sins to avoid in your own APIs. If you've encountered any of these, please accept my condolences.
</blockquote>]]></description>
      <pubDate>Thu, 10 Jan 2013 10:46:04 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Anthony Ferrara: Programming With Anthony - Responsive Web Design]]></title>
      <guid>http://www.phpdeveloper.org/news/18958</guid>
      <link>http://www.phpdeveloper.org/news/18958</link>
      <description><![CDATA[<p>
<i>Anthony Ferrara</i> has <a href="http://blog.ircmaxell.com/2012/12/programming-with-anthony-responsive-web.html">posted his latest video</a> in his development-related series "Programming with Anthony". In this latest video, he takes a look at responsive design with a "guest host" <a href="https://twitter.com/snugug">Sam Richard</a>.
</p>
<blockquote>
This week we are joined by Responsive Design thought leader <a href="https://twitter.com/snugug">Sam Richard</a>. He introduces us to the concept of responsive web design, tells us a little bit about its history and talks about best-practice and the future of the web! 
</blockquote>
<p>
You can catch up on <i>Anthony</i>'s previous videos in <a href="https://www.youtube.com/playlist?list=PLM-218uGSX3DQ3KsB5NJnuOqPqc5CW2kW&feature=view_all">his playlist</a> over on YouTube including ones covering <a href="https://www.youtube.com/watch?v=RLmuFlDygn0&list=PLM-218uGSX3DQ3KsB5NJnuOqPqc5CW2kW&index=5">encryption</a>, <a href="https://www.youtube.com/watch?v=nLinqtCfhKY&list=PLM-218uGSX3DQ3KsB5NJnuOqPqc5CW2kW&index=3">prepared statements</a> and <a href="https://www.youtube.com/watch?v=udOU0gagZqg&list=PLM-218uGSX3DQ3KsB5NJnuOqPqc5CW2kW&index=2">boolean logic</a>.
</p>]]></description>
      <pubDate>Thu, 27 Dec 2012 11:44:34 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Anthony Ferrara: Designing An API: Simplified Password Hashing]]></title>
      <guid>http://www.phpdeveloper.org/news/18768</guid>
      <link>http://www.phpdeveloper.org/news/18768</link>
      <description><![CDATA[<p>
A while back <i>Anthony Ferrara</i> proposed a standardized password hashing feature to be included into the core of PHP. It was <a href="https://wiki.php.net/rfc/password_hash">voted on</a> and it was decided it would be introduced in the PHP 5.5 releases. <i>Anthony</i> has <a href="http://blog.ircmaxell.com/2012/11/designing-api-simplified-password.html">written up a new post</a> talking some about his process in making this upcoming feature and answering some of the most common questions he's gotten about it.
</p>
<blockquote>
The other day, <a href="http://www.php.net/archive/2012.php#id2012-11-15-1">PHP 5.5 Alpha 1</a> was released to the public for the first round of testing the new features that are coming out. One of those new features is the <a href="https://wiki.php.net/rfc/password_hash">Simplified Password Hashing API</a> that I proposed (and was accepted). I have received a lot of feedback and criticism of the new API in the months since it's been committed. I figured now that Alpha 1 is out and people can play with it, I should respond to some of those items, and give a little bit more insight into why it was built the way it was...
</blockquote>
<p>
He talks about some of his goals with the use of the functionality (simplicity, something "the 99%" can use) ans answers questions about:
</p>
<ul>
<li>Why the functions aren't namespaced
<li>Why it's not just a class that can be included when needed
<li>The choice of not going with an OOP interface
<li>Why PBKDF2 and Crypt-SHA-512 aren't supported
</ul>
<p>
...and several other questions, but you'll have to <a href="http://blog.ircmaxell.com/2012/11/designing-api-simplified-password.html">read the full post</a> for the rest of those. You can find out a lot about the API for this functionality from <a href="https://wiki.php.net/rfc/password_hash">its wiki page</a> and, if you'd like to try it out (in an alpha state), you can <a href="http://www.php.net/archive/2012.php#id2012-11-15-1">download this version of PHP</a> and compile it yourself.
</p>]]></description>
      <pubDate>Mon, 19 Nov 2012 12:42:22 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Web & PHP Magazine: Issue #8 - The Power of Design]]></title>
      <guid>http://www.phpdeveloper.org/news/18755</guid>
      <link>http://www.phpdeveloper.org/news/18755</link>
      <description><![CDATA[<p>
The latest issue of the Web & PHP Magazine has been released - <a href="http://webandphp.com/issue-8">Issue 8 - The Power of Design</a>. Articles in this latest issue include:
</p>
<ul>
<li><i>Todd Lombardo</i> on user context
<li><i>Stefan Priebsch</i> on data and persistence
<li><i>Patrick Allaert</i> about data structures
<lI><i>June Henriksen</i> on the human side of programming
</ul>
<p>
You can find out more about this issue (and go download your free copy) <a href="http://webandphp.com/issue-8">on the Web & PHP site</a>. There's also seven previous issues, all free for download (PDF format)!
</p>]]></description>
      <pubDate>Thu, 15 Nov 2012 13:55:06 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: The Open/Closed Principle]]></title>
      <guid>http://www.phpdeveloper.org/news/18716</guid>
      <link>http://www.phpdeveloper.org/news/18716</link>
      <description><![CDATA[<p>
On PHPMaster.com there's a new post continuing their look at the SOLID development methodologies with the "O" in the acronym - the <a href="http://phpmaster.com/the-open-closed-principle/">Open/Closed Principle</a>:
</p>
<blockquote>
I have to admit the first time I peeked at the academic definition of the Open/Closed Principle, its predicate was surprisingly clear to me. Leaving all of the technical jargon out of the picture, of course, its dictate was pretty much the mantra that we've heard so many times before: "Don't hack the core". Well, admittedly there's a pinch of ambiguity since there are at least two common approaches to keeping the "core" neatly preserved while extending its functionality. The first one (and why I used deliberately the term "extending") would be appealing to Inheritance. [...] The second approach is Composition. 
</blockquote>
<p>
He illustrates the effective application of the principle with the creation of a HTML rendering class. The first version is non-polymorphic and just renders the example DIV and P elements that are passed into it. He changes this up by shifting these element classes into something extending an AbstractHtmlElement class (sharing an interface between them) and updating the renderer to handle these correctly.
</p>]]></description>
      <pubDate>Thu, 08 Nov 2012 10:09:32 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Freek Lijten: SOLID - The L is for Liskov Substitution Principle]]></title>
      <guid>http://www.phpdeveloper.org/news/18438</guid>
      <link>http://www.phpdeveloper.org/news/18438</link>
      <description><![CDATA[<p>
In <a href="http://www.freeklijten.nl/home/2012/09/04/SOLID-The-L-is-for-Liskov-Substitution-Principle">this new post</a> to his site <i>Freek Lijten</i> picks back up his series on the SOLID design principles with a look at the "L" in the acronym - the Liskov Substitution Principle.
</p>
<blockquote>
The Liskov Substitution Principle (LSP) was coined by Barbara Liskov as early as 1987. The principle is very tightly connected to the earlier discussed Open Closed Principle. A good way of adhering to the OCP is understanding and implementing code that uses the Liskov Substitution Principle. In this article we will discover why and how.
</blockquote>
<p>
He gives a more understandable explanation of what the rule tries to suggest - a standardized <a href="http://php.net/interface">interface</a> that each of his "Bike" instances follows to ensure the contract of a consistent API. Then each of the child classes can reliably assume that there are methods they can use because they'll always inherit them.
</p>]]></description>
      <pubDate>Tue, 04 Sep 2012 08:37:46 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[DevShed Forums: PHP is a fractal of bad design? Hardly.]]></title>
      <guid>http://www.phpdeveloper.org/news/18417</guid>
      <link>http://www.phpdeveloper.org/news/18417</link>
      <description><![CDATA[<p>
A while back there was an article that put a negative spin on PHP  ("<a href="http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-design/">PHP: a fractal of bad design</a>") and there was a huge community response to it with over 1400 comments on the post itself. Over on the DevShed forums, there's <a href="http://forums.devshed.com/php-development-5/php-is-a-fractal-of-bad-design-hardly-929746.html">a lengthy new post</a> that goes back over that article, piece by piece, and evaluates everything that was said.
</p>
<blockquote>
As I've seen this article a number of times, I'd like to go through it to see what everyone has to say on the subject. Warning: This is just stupidly, ludicrously long. it takes an existing 5-page article and tears it apart nearly sentence-by-sentence.
</blockquote>
<p>
He goes back through each of the sections - Stance, Arguments, Philosophy, etc - and includes quotes from the articles and his own impressions/thoughts about them. There's a section covering some of the individual complaints that were mentioned and things like PHP's OOP model and security.
</p>]]></description>
      <pubDate>Wed, 29 Aug 2012 09:41:55 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[NetTuts.com: 3 Key Software Principles You Must Understand]]></title>
      <guid>http://www.phpdeveloper.org/news/18000</guid>
      <link>http://www.phpdeveloper.org/news/18000</link>
      <description><![CDATA[<p>
On the NetTuts.com site today there's <a href="http://net.tutsplus.com/tutorials/tools-and-tips/3-key-software-principles-you-must-understand/">a set of reminders</a> about some software principles that all developers (PHP or otherwise) should keep in mind when doing their work:
</p>
<blockquote>
he fundamental things will always apply. If you have an understanding of the underlying ideas of software development, you will quickly adjust to new techniques. In this tutorial, we will discuss three basic principles and mix them with many more. They provide a powerful way of managing the complexity of software. I'll share some of my personal opinions and thoughts, which, hopefully, will prove useful when it comes to applying them to code and real-world projects.
</blockquote>
<p>Their three ideas that should always be in mind during development are:</p>
<ul>
<li>DRY - Don't Repeat Yourself
<li>KISS - Keep It Simple Stupid
<li>"You Ain't Gonna Need It" (YAGNI?)
</ul>
<p>
For each principle, there's a but of an example showing either some current project that follows the idea or a process that can be used to implement it.
</p>]]></description>
      <pubDate>Thu, 24 May 2012 09:49:40 -0500</pubDate>
    </item>
    <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>
  </channel>
</rss>
