diff --git a/.gitignore b/.gitignore
index bd3f1fa..460916b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
/_site/
+*.DS_Store
diff --git a/LICENSE b/LICENSE
index ec361cb..e03e9bc 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,19 +1,3 @@
Copyright (c) 2012 Josh Lockhart
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is furnished
-to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
+http://creativecommons.org/licenses/by-nc-sa/3.0/
diff --git a/README.md b/README.md
index 9095f34..7003f42 100644
--- a/README.md
+++ b/README.md
@@ -34,6 +34,6 @@ There's been a lot of discussion lately about how the PHP community lacks suffic
My name is [Josh Lockhart](http://twitter.com/codeguy). I'm the author of the [Slim Framework](http://www.slimframework.com/), and I work for [New Media Campaigns](http://www.newmediacampaigns.com/).
-## Copyright
+## License
-[MIT](http://opensource.org/licenses/MIT)
+[Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License][http://creativecommons.org/licenses/by-nc-sa/3.0/]
diff --git a/_includes/welcome.md b/_includes/welcome.md
index 080cd94..5fbe7f2 100644
--- a/_includes/welcome.md
+++ b/_includes/welcome.md
@@ -1,6 +1,6 @@
# Welcome
-There's a lot of bad information on the Web (I'm looking at you, W3Schools) that leads new PHP users astray, propagating bad practices and bad code. This must stop. _PHP: The Right Way_ is an easy-to-read, quick reference for PHP best practices, accepted coding standards, and links to authoritative tutorials around the Web.
+There's a lot of outdated information on the Web that leads new PHP users astray, propagating bad practices and bad code. This must stop. _PHP: The Right Way_ is an easy-to-read, quick reference for PHP best practices, accepted coding standards, and links to authoritative tutorials around the Web.
It is important to understand _there is no canonical way to use PHP_. That's the beauty of it. This website introduces new PHP developers to best practices, available options, and good information.
diff --git a/_layouts/default.html b/_layouts/default.html
index 7106a65..e4478f7 100644
--- a/_layouts/default.html
+++ b/_layouts/default.html
@@ -62,9 +62,13 @@
Project sponsors
-
+
+
+
+ 
PHP: The Right Way by Josh Lockhart is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
Based on a work at www.phptherightway.com.
+
diff --git a/_posts/03-04-01-Namespaces.md b/_posts/03-03-01-Namespaces.md
similarity index 100%
rename from _posts/03-04-01-Namespaces.md
rename to _posts/03-03-01-Namespaces.md
diff --git a/_posts/03-05-01-Standard-PHP-Library.md b/_posts/03-04-01-Standard-PHP-Library.md
similarity index 100%
rename from _posts/03-05-01-Standard-PHP-Library.md
rename to _posts/03-04-01-Standard-PHP-Library.md
diff --git a/_posts/03-06-01-Command-Line-Interface.md b/_posts/03-05-01-Command-Line-Interface.md
similarity index 100%
rename from _posts/03-06-01-Command-Line-Interface.md
rename to _posts/03-05-01-Command-Line-Interface.md
diff --git a/_posts/05-01-01-Coding-Practices.md b/_posts/05-01-01-Coding-Practices.md
new file mode 100644
index 0000000..c5e80a3
--- /dev/null
+++ b/_posts/05-01-01-Coding-Practices.md
@@ -0,0 +1 @@
+# Coding Practices
diff --git a/_posts/03-03-01-Exceptions.md b/_posts/05-02-01-Exceptions.md
similarity index 100%
rename from _posts/03-03-01-Exceptions.md
rename to _posts/05-02-01-Exceptions.md
diff --git a/_posts/05-01-01-Databases-and-PDO.md b/_posts/06-01-01-Databases-and-PDO.md
similarity index 58%
rename from _posts/05-01-01-Databases-and-PDO.md
rename to _posts/06-01-01-Databases-and-PDO.md
index 5791fb6..9b810f7 100644
--- a/_posts/05-01-01-Databases-and-PDO.md
+++ b/_posts/06-01-01-Databases-and-PDO.md
@@ -1,6 +1,9 @@
# Databases and PDO
-Many times your PHP code will use a database to persist information. If you use a database, use `PDO` to talk with it. PDO is a database abstraction library — (usually) built into PHP — that provides a common interface to talk with many different databases.
+Many times your PHP code will use a database to persist information. If you use a database, use `PDO` to talk with it. PDO is a
+database connection abstraction library — built into PHP since 5.1.0 — that provides a common interface to talk with
+many different databases. PDO will not translate your SQL queries or emulate missing features, it is purely for connecting to multiple
+types of database with the same API.
More importantly, `PDO` allows you to safely inject foreign input (e.g. IDs) into your SQL queries without worrying about database SQL injection attacks. This is possible using PDOStatements and bound parameters.
@@ -12,7 +15,8 @@ $pdo = new PDO('sqlite:users.db');
$pdo->query("SELECT name FROM users WHERE id = " . $_GET['id']); // <-- NO!
{% endhighlight %}
-This is terrible code. You are inserting a raw query parameter into a SQL query. This will get you hacked in a heartbeat. Instead, you should sanitize the ID input using PDO bound parameters.
+This is terrible code. You are inserting a raw query parameter into a SQL query. This will get you hacked in a heartbeat. Instead,
+you should sanitize the ID input using PDO bound parameters.
{% highlight php %}
bindParam(':id', filter_input(INPUT_GET, 'id', FILTER_SANITIZE_NUMBER_INT
$stmt->execute();
{% endhighlight %}
-This is correct code. It uses a bound parameter on a PDO statement. This escapes the foreign input ID before it is introduced to the database preventing potential SQL injection attacks.
+This is correct code. It uses a bound parameter on a PDO statement. This escapes the foreign input ID before it is introduced to the
+database preventing potential SQL injection attacks.
* [Learn about PDO][1]
+
+## Abstraction Layers
+
+Many frameworks provide their own abstraction layer which may or may not sit on top of PDO. These will often emulate features for
+one database system that another is missing form another by wrapping your queries in PHP methods, giving you actual database abstraction.
+This will of course add a little overhead, but if you are building a portable application that needs to work with MySQL, PostgreSQL and
+SQLite then a little overhead will be worth it the sake of code cleanliness.
+
+Some abstraction layers have been built using the PSR-0 namespace standard so can be installed in any application you like:
+
* [Doctrine2 DBAL][2]
* [ZF2 Db][4]
* [ZF1 Db][3]
diff --git a/_posts/06-01-01-Security.md b/_posts/07-01-01-Security.md
similarity index 100%
rename from _posts/06-01-01-Security.md
rename to _posts/07-01-01-Security.md
diff --git a/_posts/06-02-01-Web-Application-Security.md b/_posts/07-02-01-Web-Application-Security.md
similarity index 100%
rename from _posts/06-02-01-Web-Application-Security.md
rename to _posts/07-02-01-Web-Application-Security.md
diff --git a/_posts/06-03-01-Password-Hashing-with-Bcrypt.md b/_posts/07-03-01-Password-Hashing-with-Bcrypt.md
similarity index 100%
rename from _posts/06-03-01-Password-Hashing-with-Bcrypt.md
rename to _posts/07-03-01-Password-Hashing-with-Bcrypt.md
diff --git a/_posts/06-04-01-Input-Filtering-and-Sanitizing.md b/_posts/07-04-01-Input-Filtering-and-Sanitizing.md
similarity index 100%
rename from _posts/06-04-01-Input-Filtering-and-Sanitizing.md
rename to _posts/07-04-01-Input-Filtering-and-Sanitizing.md
diff --git a/_posts/07-01-01-Testing.md b/_posts/08-01-01-Testing.md
similarity index 100%
rename from _posts/07-01-01-Testing.md
rename to _posts/08-01-01-Testing.md
diff --git a/_posts/07-02-01-Test-Driven-Development.md b/_posts/08-02-01-Test-Driven-Development.md
similarity index 100%
rename from _posts/07-02-01-Test-Driven-Development.md
rename to _posts/08-02-01-Test-Driven-Development.md
diff --git a/_posts/07-03-01-Behavior-Driven-Development.md b/_posts/08-03-01-Behavior-Driven-Development.md
similarity index 97%
rename from _posts/07-03-01-Behavior-Driven-Development.md
rename to _posts/08-03-01-Behavior-Driven-Development.md
index 9f0d4ea..c1c1b99 100644
--- a/_posts/07-03-01-Behavior-Driven-Development.md
+++ b/_posts/08-03-01-Behavior-Driven-Development.md
@@ -2,7 +2,7 @@
isChild: true
---
-## Behaviour Driven Development
+## Behavior Driven Development
There are two different types of Behavior-Driven Development (BDD): SpecBDD and StoryBDD. SpecBDD focuses on technical behavior or code, while StoryBDD focuses on business or feature behaviors or interactions. PHP has frameworks for both types of BDD.
diff --git a/_posts/08-01-01-Servers-and-Deployment.md b/_posts/09-01-01-Servers-and-Deployment.md
similarity index 100%
rename from _posts/08-01-01-Servers-and-Deployment.md
rename to _posts/09-01-01-Servers-and-Deployment.md
diff --git a/_posts/08-02-01-Platform-as-a-Service.md b/_posts/09-02-01-Platform-as-a-Service.md
similarity index 100%
rename from _posts/08-02-01-Platform-as-a-Service.md
rename to _posts/09-02-01-Platform-as-a-Service.md
diff --git a/_posts/08-03-01-Virtual-or-Dedicated-Servers.md b/_posts/09-03-01-Virtual-or-Dedicated-Servers.md
similarity index 100%
rename from _posts/08-03-01-Virtual-or-Dedicated-Servers.md
rename to _posts/09-03-01-Virtual-or-Dedicated-Servers.md
diff --git a/_posts/08-04-01-Shared-Servers.md b/_posts/09-04-01-Shared-Servers.md
similarity index 100%
rename from _posts/08-04-01-Shared-Servers.md
rename to _posts/09-04-01-Shared-Servers.md
diff --git a/_posts/09-01-01-Libraries-and-Frameworks.md b/_posts/10-01-01-Libraries-and-Frameworks.md
similarity index 100%
rename from _posts/09-01-01-Libraries-and-Frameworks.md
rename to _posts/10-01-01-Libraries-and-Frameworks.md
diff --git a/_posts/10-01-01-Resources.md b/_posts/11-01-01-Resources.md
similarity index 100%
rename from _posts/10-01-01-Resources.md
rename to _posts/11-01-01-Resources.md