News Feed
Jobs 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 Refactoring, Part 1 - What is Good Code?
October 12, 2012 @ 11:15:26

On PHPMaster.com they've started up a new series focused on refactoring code to make your applications not only easier to maintain but easier to expand on in the future. In this first part they focus on what the term "good code" really means.

The main goal of refactoring is clean code, better code, or whatever you might call it. But what actually constitutes good code? Good code is smelled and tasted. If you've written a lot of code, you understand what I mean; you can easily identify whether code is good or bad with experience. But what if you are new to coding but still want to do things right? We can summarize the aspects of good code with these three guidelines: Readable, Extensible and Efficient

He goes on to explain each of these three guidelines with descriptions of what they are and what they mean to you as a developer. In the next part of the series, he'll take these three ideas and apply them to code, showing some of the most common points where they can be applied to clean things up.

0 comments voice your opinion now!
good code refactor readable extensible efficient series


Fabien Potencier's Blog:
Create your own framework... on top of the Symfony2 Components (part 9)
January 19, 2012 @ 08:58:11

Fabien Potencier has posted the ninth part of his "build a framework on Symfony2 components series. In this latest tutorial he takes the simple framework he's already created (complete with some unit tests) and makes it easier to extend.

Our framework is still missing a major characteristic of any good framework: extensibility. Being extensible means that the developer should be able to easily hook into the framework life cycle to modify the way the request is handled.

He chooses the Observer design pattern as a basis for his example, allowing any kind of behavior/actions to be added to the framework's execution. He includes the Symfony2 dispatcher to make this work and includes the code for a "handle" method to fire off events. It executes a "ResponseEvent" every time the framework is executed. An "addListener" method provides the hook to apply a callback to an event - in his case an anonymous function (or closure).

0 comments voice your opinion now!
symfony2 framework custom series extensible observer designpattern


Maarten Balliauw's Blog:
Saving a PHPExcel spreadsheet to Google Documents
February 03, 2009 @ 12:58:56

Maarten Balliauw has written up a guide to saving the output of your PHPExcel applications out to the Documents service that Google offers.

As you may know, PHPExcel is built using an extensible model, supporting different input and output formats. The PHPExcel core class library features a spreadsheet engine, which is supported by IReader and IWriter instances used for reading and writing a spreadsheet to/from a file. Currently, PHPExcel supports writers for Excel2007, Excel5 (Excel 97+), CSV, HTML and PDF. Wouldnt it be nice if we could use PHPExcel to store a spreadsheet on Google Documents? Let's combine some technologies.

The two technologies in question are a standard install of the PHPExcel library and the Zend Framework (with its Zend_Gdata component). Using the component, a save() method is created and hooked into the IWriter interface of PHPExcel. When this save method is called, the Zend_Gdata component connects to the Documents service and uploads the resulting information for the account you supply.

0 comments voice your opinion now!
tutorial save phpexcel extensible document google spreadsheet zendframework zendgdata


DevShed:
Completing an Extensible Website Engine with PHP 5
October 31, 2006 @ 12:04:00

DevShed is wrapping up their series on creating an extensible website engine with PHP 5 in this new tutorial - part two of the series.

Welcome to the final part of the series "Building an extensible website engine with PHP 5." In two tutorials, this series teaches you how to build a versatile website system which allows you to generate dynamic web documents by using a few simple PHP classes.

They demonstrate how to pull the contents of the page from the database to flesh out the content, push that data out into the page template itself, and, as a final step - they take a look at the entire system in action.

0 comments voice your opinion now!
tutorial extensible website engine php5 tutorial extensible website engine php5


DevShed:
Setting up the Foundation for an Extensible Website Engine with PHP 5
October 24, 2006 @ 09:46:00

DevShed starts up another series, a pair of tutorials seeking to help you create an extensible website engine in PHP 5. Basically, a slightly more complex setup than just pulling the content from a database into your application.

Over the course of this two-part series, I'll walk you through the development of a highly extensible and "pluggable" website engine with PHP 5, which will allow you generate web pages on the fly based on a predefined (but simple) database structure.

They start things off by setting up the core of the system - the layout and structure of how the pages will flow. To help make this an easy task, they also create the simple template with links down the side to the different "pages". Finally, they finish off this part of the series with the database structure and push some of the sample content in to give you an idea of how it's all formatted.

4 comments voice your opinion now!
tutorial extensible foundation php5 website engine tutorial extensible foundation php5 website engine


DevShed:
Developing an Extensible TCP Server with Sockets in PHP
May 30, 2006 @ 17:58:33

Devshed has posted part two in their series of "handling sockets in PHP", this time, with a focus on the creation of a TCP server.

Are you interested in learning how to manipulate low-level sockets in PHP? Your search has finished. This is the second part of the series "Handling sockets in PHP," and hopefully you'll find in it valuable material regarding the creation and manipulation of sockets with PHP, in conjunction with numerous illustrative hands-on examples that will help you build socket servers in a few easy steps.

The tutorial walks you through the simple process, looking back at the simple version they made before, looking forward at expaning it to handle multiple client requests, and creating a "socket server" class to automatically handle the creation of the socket.

0 comments voice your opinion now!
sockets tutorial tcp server extensible part2 sockets tutorial tcp server extensible part2


DevShed:
Developing an Extensible Template Processor in PHP 5 (Part 1)
May 02, 2006 @ 13:58:09

Building web aplications that split out the responsibilities correctly is becoming more and more important. Developers are creating more complex applications, and cluttering up the presentation with the logic of the code can only make things more of a nightmare down the road. Thankfully, there are articles like this one from DevShed to help you template your site correctly.

This is the first part of a three-part series that covers separating logic from presentation in PHP applications. In this article you will learn to develop a template system that is advanced enough to meet the requirements of a majority of applications.

It's possible to develop an intermediate template system that meets the requirements of a vast majority of applications, without the need to appeal to basic packages or having to deal with the numerous features of Smarty. It's precisely for this reason that this series will be focused on developing an extensible template processor in PHP 5.

You'll need a bit of experience with templating your site before you get started, as they begin with a basic structure of the template processor before anything. They demonstrate the code to create the "TemplateProcessor" class and defining the "processTemplate" method inside it. By the end of this first part in the series, they've created a very simple templating class that could be used as is for base-level projects. Stay tuned for more, though, if you're hungry for more features.

0 comments voice your opinion now!
tutorial extensible seperation template system logic tutorial extensible seperation template system logic



Community Events











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


security code introduction application unittest composer language podcast overview hack symfony2 framework opinion package example facebook hhvm release component install

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