Extensible code is a piece of code which follows re-usable, logical, well-known patterns, be it standard design patterns, or normal logical flow. Modular code tends to be highly extensible and monolithic code tends to be non-extensible, but monolithic code might be more efficient, so to solve this conundrum some practices allow developing in a modular way and deploying in a monolithic way so we can get the best of both worlds. The major aspects which we are to discuss with regard to extensible code are: logical extensibility (normal logical flow and design patterns), modular design, and decoupling and encapsulation.

He goes through each of the sections - logical extensibility, modular design and decoupling/encapsulation - and for each provides some questions to ask to help you whip your code into shape.

With CodeIgniter moving to GitHub we are starting to see a lot of CodeIgniter developers wanting to learn more about Git, specifically how they can use it to improve their workflows, manage their applications and move away from the horrible days of copying and pasting updated libraries off a wiki. UCK. Sparks are helping us on the whole, but there is another method that we can use to manage our packages: Git Submodules.

Submodules allow you to pull in source from a remote repository without having to merge the code into your own. It creates a dependency between the two and makes it easier to check out only what you need. He gives the example of his oauth2 package being needed in multiple other applications, so instead of including and checking in multiple versions, he made a separate repo and defined the source as a submodule. He also includes a bit about fixing issues in your submodules with a few handy commands to get on the right branch, add a remote and push the commit.

In a new post to his blog Phil Sturgeon has posted about a patch he's created to give the pre-release CodeIgniter 2.0 version the ability to do some Modular Separation.

The fix was worked out a few hours after CodeIgniter 2.0 was released but I was hoping wiredesignz would incorporate and re-post. Sadly the man has other commitments to attend to, so I have released the patched version.

The patch includes two files - custom libraries to extend from for loading and routing in your CodeIgniter 2.0 application. For a better understanding of what this patch gives you, check out this thread on the CodeIgniter forums.

On the Zend Developer Zone there's a new tutorial from Vikram Vaswani looking at creating templates for your website with the Savant templating engine.

Now, there's no shortage of template engines out there. You've probably already heard of Smarty, Template_IT, Flexy and Xipe...and that's just the beginning of the list. If you're looking for something a little different, though, consider Savant, the subject of this article. Although Savant isn't as well-known as some of the other options available, it's still a lightweight, OOP-compliant template engine that offers some unique features and is well worth a look.

He works through the templating of a sample site (using .tpl files) to create simple layouts and add in some more advanced features like assigning variables, using objects, looping and partial templates. He also shows how to use the filtering functions to manipulate the template output directly.

DevShed has posted the final part of their series on handling exceptions in PHP5 applications. In this part they wrap up the creation of their modular exceptions class.

By means of a hands-on approach, this series walks you through using inheritance to build finely-tuned exception subclasses. These subclasses can be used to handle, via multiple "try-catch" blocks, several failures that might occur during the execution of a given web application.

They show how to handle MySQL exceptions with two different subclasses - one for the MySQL connection itself and another for problems with the results. They then merge these two classes into one and show how to use the new hybrid creation in a sample SQL connection and query.

DevShed has posted the final part of their series looking at the handling of file uploads in PHP5. This last installment shows how to take what yuou've learned so far and make things a bit more modular.

At this stage, you've hopefully recalled how to build an expandable file uploading application with PHP 5 that uses only one custom function to transfer a target file from a client machine to a predefined web server. However, in the beginning, I said that I was going to teach you how to develop a brand new file uploading application using an object-oriented approach.

The finish off the FileUploader class they were working on previously and show some testing examples of it in action.

Elizabeth Smith has posted a new item to her blog today with information about a PHP-GTK2 framework that she's been working on (and with) called the Callicore Desktop.

Don't look at me like that, I haven't lost my mind. It's not really a framework in the traditional MVC web application sense. Instead it's a group of fairly loosely coupled widgets and classes with an emphasis on clean code.

With the help of several singletons, multiple widgets and a modular structure, the Callicore Desktop makes working with this parts as simple as calling it on the command line (with limited setup). If you'd like to get a look at the current version of the framework, check out the Callicore site or just head straight to the code.