 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
PHPMaster.com: Practical Code Refactoring, Part 3 - Extensibility
by Chris Cornutt October 25, 2012 @ 09:22:05
PHPMaster.com has posted the third part in their "Practical Code Refactoring" series - this time with a focus on Extensibility. (Part 1, Part 2).
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.
voice your opinion now!
code refactor extensibility series decoupling encapsulation modular
Phil Sturgeon's Blog: Managing CodeIgniter Packages with Git Submodules
by Chris Cornutt September 26, 2011 @ 09:27:11
Phil Sturgeon has a new post to his blog today for the CodeIgniter folks out there - a tip on keeping things organized by using git submodules for package management.
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.
voice your opinion now!
codeigniter git submodules modular versioncontrol
Zend Developer Zone: Creating Modular Template-Based Interfaces with Savant
by Chris Cornutt September 10, 2009 @ 07:50:34
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.
voice your opinion now!
modular template tutorial savant
DevShed: Building a Modular Exception Class in PHP 5
by Chris Cornutt November 05, 2008 @ 14:03:49
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.
voice your opinion now!
modular exception class php5 tutorial
DevShed: Developing a Modular Class For a PHP File Uploader
by Chris Cornutt April 16, 2008 @ 13:28:49
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.
voice your opinion now!
modular object file upload handler tutorial
|
Community Events
Don't see your event here? Let us know!
|