News Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

PHPMaster.com:
Practical Code Refactoring, Part 3 - Extensibility
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.

0 comments voice your opinion now!
code refactor extensibility series decoupling encapsulation modular


Phil Sturgeon's Blog:
Managing CodeIgniter Packages with Git Submodules
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.

0 comments voice your opinion now!
codeigniter git submodules modular versioncontrol


Phil Sturgeon's Blog:
Modular Separation for CodeIgniter 2
March 25, 2010 @ 08:33:18

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.

0 comments voice your opinion now!
modular separation codeigniter patch


Zend Developer Zone:
Creating Modular Template-Based Interfaces with Savant
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.

0 comments voice your opinion now!
modular template tutorial savant


DevShed:
Building a Modular Exception Class in PHP 5
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.

0 comments voice your opinion now!
modular exception class php5 tutorial


DevShed:
Developing a Modular Class For a PHP File Uploader
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.

0 comments voice your opinion now!
modular object file upload handler tutorial


Elizabeth Smith's Blog:
Callicore Desktop - A PHP-GTK2 Framework
December 04, 2006 @ 07:31:02

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.

0 comments voice your opinion now!
phpgtk2 framework widget modular singleton windows phpgtk2 framework widget modular singleton windows



Community Events





Don't see your event here?
Let us know!


developer list series interview laravel framework threedevsandamaybe language opinion podcast code testing release unittest symfony2 refactor install experience community introduction

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework