<?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, 12 Feb 2012 21:48:43 -0600</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Dave Marshall's Blog: Phpmig - Simple migrations for php]]></title>
      <guid>http://www.phpdeveloper.org/news/17072</guid>
      <link>http://www.phpdeveloper.org/news/17072</link>
      <description><![CDATA[<p>
In a new post to his blog <i>Dave Marshall</i> shares a <a href="http://davedevelopment.co.uk/2011/11/01/phpmig-simple-migrations-for-php.html">homegrown migration tool</a> he's created to help make database migrations a simpler task - <a href="http://github.com/davedevelopment/phpmig">phpmig</a>.
</p>
<blockquote>
I've previously blogged about <a href="http://davedevelopment.co.uk/how-to-simple-database-migrations-with-phing-and-dbdeploy.html">migrations with phing and dbdeploy</a> and also <a href="http://davedevelopment.co.uk/notes-from-porting-ruby-to-php.html">porting ActiveRecord::Migrations to PHP</a>, now here I am again blogging about yet another way of doing migrations in PHP projects. Only maybe this time it's different, maybe this time I've found a way I'm happy with...? <a href="http://github.com/davedevelopment/phpmig">Phpmig</a> is a simple migrations system that was written to be easily adopted regardless of the framework or libraries you are using. It requires a little bit of setting up, but if you know you should be using migrations, you're probably more than capable.
</blockquote>
<p>
He's worked up a sample application to show you how to get things set up and working - a basic <a href="http://silex.sensiolabs.org/">Silex</a>-based application. Phpmig is used to create a basic bootstrap for the deployment that includes the use of <a href="https://github.com/fabpot/Pimple">Pimple</a> for dependency injection and a command-line interface to generate a migration skeleton class for the up/down methods. The source for phpmig can be <a href="https://github.com/davedevelopment/phpmig">found on github</a>.
</p>]]></description>
      <pubDate>Tue, 01 Nov 2011 13:19:02 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Developer Drive: Create Your Own CRUD App with MySQL and PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/17067</guid>
      <link>http://www.phpdeveloper.org/news/17067</link>
      <description><![CDATA[<p>
On the Developer Drive blog today there's <a href="http://www.developerdrive.com/2011/11/create-your-own-crud-app-with-mysql-and-php/">a new tutorial</a> helping you build out a simple CRUD (create, read, update and delete) system using a MySQL backend. This is just the first part of the series, introducing you to some concepts and getting the ball rolling connecting PHP and the database.
</p>
<blockquote>
You're may be wondering what exactly CRUD is. CRUD simply stands for Create, Read, Update and Delete and it is the one of the fundamental principles of programming logic that can be expanded and applied to larger projects. For example, let's imagine we're creating a social network and we like to have the ability for users to create accounts, edit and update information for those accounts and also delete said accounts; that is CRUD at work.
</blockquote>
<p>
This <a href="http://www.developerdrive.com/2011/11/create-your-own-crud-app-with-mysql-and-php/">first part</a> covers the structure of the database that'll make up the storage and includes a brief snippet of code to connect your PHP to the database (using PDO).
</p>]]></description>
      <pubDate>Tue, 01 Nov 2011 08:06:52 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPBuilder.com: PHP Simple HTML DOM Parser: Editing HTML Elements in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/16833</guid>
      <link>http://www.phpdeveloper.org/news/16833</link>
      <description><![CDATA[<p>
On PHPBuilder.com today there's a new tutorial from <i>Vojislav Janjic</i> about using a <a href="http://www.phpbuilder.com/columns/PHP_HTML_DOM_parser/PHPHTMLDOMParser.cc_09-07-2011.php3">simple DOM parser</a> in PHP to edit the markup even if it's not correctly W3C-formatted - the <a href="http://simplehtmldom.sourceforge.net/">Simple HTML DOM Parser</a>
</p>
<blockquote>
Simple HTML DOM parser is a PHP 5+ class which helps you manipulate HTML elements. The class is not limited to valid HTML; it can also work with HTML code that did not pass W3C validation. Document objects can be found using selectors, similar to those in jQuery. You can find elements by ids, classes, tags, and much more. DOM elements can also be added, deleted or altered. 
</blockquote>
<p>
They help you get started using the parser, passing in the HTML content to be handled (either directly via a string or loading a file) and locating elements in the document either by ID, class or tag. Selectors similar to those in CSS are available. Finally, they show how to find an object and update its contents, either by adding more HTML inside or by appending a new object after it.
</p>]]></description>
      <pubDate>Thu, 08 Sep 2011 10:06:07 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Devshed: Simple and Secure PHP Login Script]]></title>
      <guid>http://www.phpdeveloper.org/news/16645</guid>
      <link>http://www.phpdeveloper.org/news/16645</link>
      <description><![CDATA[<p>
In <a href="http://www.devshed.com/c/a/PHP/Creating-a-Secure-PHP-Login-Script-59941/">this new tutorial</a> on DevShed, they walk you through the creation of a secure login script that uses sha256 encryption, a captcha to prevent automated signups, XSS attack protection and several other features.
</p>
<blockquote>
Recent advancements in PHP offer the developer a variety of tools to improve the security of login systems. [...] This programming tutorial will teach you how to create a simple, yet secure login script utilizing PHP using MySQL and bracing for XSS attack prevention.
</blockquote>
<p>
Other features include no persistent logins, preventing direct file access, an idle timeout on the user session, protection against session fixation and anti-brute force measures. Full (procedural) code is provided as well as screenshots from phpMyAdmin showing the database table structure. You can grab the code for the project <a href="http://www.php-developer.org/php-secure-authentication-of-user-logins/">here</a>.
</p>]]></description>
      <pubDate>Thu, 28 Jul 2011 09:57:39 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[php|architect: Looking for a simpler MySQL library? Try MeekroDB]]></title>
      <guid>http://www.phpdeveloper.org/news/16110</guid>
      <link>http://www.phpdeveloper.org/news/16110</link>
      <description><![CDATA[<p>
On the php|architect site today <i>John Mertic</i> has a new post looking at a simpler MySQL library - <a href="http://www.phparch.com/2011/03/looking-for-a-simpler-mysql-library-try-meekrodb/">MeekroDB</a>.
</p>
<blockquote>
I remember fondly back in the day, when PHP 4.0 was all the rage, that if you wanted to interface with MySQL there was one choice: the PHP mysql extension. Then came database abstraction layers ( such as ADODB and PEAR_DB ) and newer extensions ( namely PDO and mysqli ), all with the goal of simplifying the code needing written to be able to get data successfully out of a database. But even then, it still could get a bit complex. Fortunately, someone saw this and wrote a library to make it even simpler. This library is <a href="http://www.meekro.com/">MeekroDB</a>.
</blockquote>
<p>
A bit of code is included, comparing the MySQLi version of how to connect, create a query, bind some parameters and make the request to fetch the results to the MeekroDB version (compressed down and including a handy method queryFirstField). You can find out more about MeekroDB in <a href="http://www.meekro.com/docs.php">its documentation</a>.
</p>]]></description>
      <pubDate>Mon, 28 Mar 2011 12:53:28 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Volker Dusch's Blog: Setting up Hudson for PHP Projects in 15 minutes]]></title>
      <guid>http://www.phpdeveloper.org/news/15617</guid>
      <link>http://www.phpdeveloper.org/news/15617</link>
      <description><![CDATA[<p>
<i>Volker Dusch</i> has <a href="http://edorian.posterous.com/setting-up-hudson-for-php-projects">posted a guide</a> perfect for those looking to get their projects set up with the <a href="http://hudson-ci.org/">Hudson</a> continuous integration tool quickly (15 minutes or so).
</p>
<blockquote>
While [running tests on commit] is great it can be pretty tedious to run the whole test suite every time before a commit but not doing it leads to a broken test suite that other people have to repair or go around asking who broke it.. make up your own story. This is where a continuous integration (ci) server jumps in ! Every time you commit, or push if you're using git, to a repository it detects the change, gets the new version of the source, runs all your tests (and more if you tell it to) and notifies you if there was a Problem.
</blockquote>
<p>
He chose Hudson because of its simple setup, going from download to install and configured in around five minutes. It includes a plugin system with one of the "big ones" being the xUnit integration. Included in the post is every command you'll need to get it up and running on a linux (Ubintu) system including all plugins needed and the setup of a simple project's XML configuration file (with the code to run it on).
</p>]]></description>
      <pubDate>Wed, 22 Dec 2010 10:40:33 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[php|architect: Crystal Starting to Form]]></title>
      <guid>http://www.phpdeveloper.org/news/14986</guid>
      <link>http://www.phpdeveloper.org/news/14986</link>
      <description><![CDATA[<p>
On the php|architect blog today <i>Bill Karwin</i> <a href="http://www.phparch.com/2010/08/18/crystal-starting-to-form/">looks at a new library</a> - <a href="http://crystal-project.net/">Crystal</a> - a database library to help make it simpler to work with SQL (and make it more human-readable).
</p>
<blockquote>
Martin [Rusev]'s project is called <a href="http://crystal-project.net/">Crystal</a>. It's an object-oriented wrapper for the venerable <a href="http://php.net/manual/en/book.mysql.php">mysql</a> and <a href="http://php.net/manual/en/book.pgsql.php">pg</a> extensions, with the goals of making SQL more human-readable, and providing a library that is lightweight and easy to learn.
</blockquote>
<p>
There's code examples on the site of how to use the library. <i>Bill</i> also mentions some of the things the project does well and a few things it doesn't - like leaving out some of the advanced SQL functionality in favor of simplicity. He also mentions concerns about SQL injection handling, code not shared between database handlers and the unfinished nature of some features.
</p>]]></description>
      <pubDate>Thu, 19 Aug 2010 08:46:00 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Architexa Blog: Simplifying Dependency Injection]]></title>
      <guid>http://www.phpdeveloper.org/news/14373</guid>
      <link>http://www.phpdeveloper.org/news/14373</link>
      <description><![CDATA[<p>
Dependency injection is becoming a more and more popular topic among developers, but for someone just starting out with it, a lot of the sites out there explaining it can be confusing. On the Architexa blog there's a <a href="http://blog.architexa.com/2010/04/simplifying-dependency-injection/">dead simple explanation</a> of DI and what it's good for (warning: it's not a PHP example, but it translates over).
</p>
<blockquote>
DI is fairly simple - its main goal is the removal of a class dependency from some code. This class dependency is then 'injected' into the code where it is needed. Using dependency injection helps in code maintenance, re-usability, testability, and improves code readability.
</blockquote>
<p>
A code example is included of a User class that is responsible for making "users" and including all of the needed information and functionality to go with it in a self-contained object. They also mention some of the benefits that come along with it and the complications that could come from its use.
</p>]]></description>
      <pubDate>Mon, 19 Apr 2010 12:58:15 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Development Seed Blog: Simple Sign-On with OpenID]]></title>
      <guid>http://www.phpdeveloper.org/news/14131</guid>
      <link>http://www.phpdeveloper.org/news/14131</link>
      <description><![CDATA[<p>
On the Development Seed blog today there's a new post by <i>Alex Barth</i> about integrating OpenID support into your Drupal installation. You can check out an example of it in <a href="http://github.com/lxbarth/osso">this github project</a>.
</p>
<blockquote>
After a survey of available single sign-on solutions [for a client], we decided to go with an OpenID based approach since we needed to support different domains, wanted to avoid sharing user tables and did not want to add complex system requirements for browser clients or the server. [...] The great advantage of this scenario is that we know which five sites need to play nicely together and all of them are Drupal sites under the client's control. This premise allows us to add an additional site as a designated OpenID provider that we call "Hub" and make all five sites point to the Hub as their default identity provider.
</blockquote>
<p>
They use two modules to make everything work together - <A href="http://github.com/lxbarth/osso/tree/master-2/profiles/osso_relying/modules/openid_sso/">OpenID SSO</a> and <a href="http://github.com/lxbarth/osso/tree/master-2/profiles/osso_provider/modules/openid_provider_sso/">OpenID Provider SSO</a> and a <a href="http://code.google.com/p/pubsubhubbub/">PubSubHubbub model</a> for keeping the user information up to date.
</p>]]></description>
      <pubDate>Thu, 04 Mar 2010 12:18:43 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[The Bakery: Simple way to memcache (almost) all database queries]]></title>
      <guid>http://www.phpdeveloper.org/news/13836</guid>
      <link>http://www.phpdeveloper.org/news/13836</link>
      <description><![CDATA[<p>
On The Bakery (the CakePHP resource) there's <a href="http://bakery.cakephp.org/articles/view/simple-way-to-memcache-almost-all-database-queries">a recent post</a> looking at a simple way you can integrate database query caching (using memcache) into your CakePHP application's models.
</p>
<blockquote>
Most common way to access data is a database. Most common way to speed this up - Memcached. As a quite young CakePHP developer I had a bit of headache "how to cache queries effectively?". Now I know the way, so I share.
</blockquote>
<p>
<i>Rafal</i>'s method, as seen in <a href="http://bakery.cakephp.org/articles/download_code/1360/block/1">this example</a> using the <a href="http://book.cakephp.org/view/213/Cache">caching methods included with CakePHP</a> to serialize and store the database queries out to a cache. 
</p>]]></description>
      <pubDate>Wed, 13 Jan 2010 13:20:56 -0600</pubDate>
    </item>
  </channel>
</rss>

