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

Soledad Penades' Blog:
Signs your PHP needs refactoring
June 05, 2007 @ 16:26:00

As mentioned by Ed Finkler, there's a list of signs your PHP needs refactoring from Soledad Penades.

I have had to go through a php application recently which has given me more than one headache and has required me to use all my possible patience. While working with it, I thought This is good material for an article, so that nobody else does the same in the future, and nobody else will need to experience the same displeasure as I have had to.

So here are the signs your PHP application needs a serious refactoring, right now

Included in the list are things like:

  • Uses global variables
  • Everything's an array
  • The neverending switch
  • Interface inconsistency

It hits on one of the thing that bugs me too, the problem of "Brackets galore" - so many subarrays that you have to resort to three or more sets of bracketed keys to get to the value you want. It's bad enough trying to follow someone else's code without having to "trace down" an array to figure out which of the values they're talking about.

0 comments voice your opinion now!
refactoring global bracket duplicate switch interface inconsistent refactoring global bracket duplicate switch interface inconsistent



PHP-GTK Community Site:
Using GtkSourceview to build a php editor with syntax highlighting
December 19, 2006 @ 08:34:00

There's a new tutorial posted on the PHP-GTK Community site today - a quick one showing how to use GtkSourceview to create a simple PHP editor with syntax highlighting.

This widget is nearly usable as a real php-gtk IDE. It extends GtkSourceView widget and internally manages both a text buffer and language object classes.

They provide the code, but not too much in the way of explanation for it. Thankfully, most of it is pretty straight-forward. There are a few things that the script has to manage to make the it work - a text buffer for the data, a viewer (window), and the syntax highlighting component. For the view, there are a few handy functions already built in so you won't have to create them - undos, the syntax highlighting, line numbering, markers, and bracket highlighting.

0 comments voice your opinion now!
gtksourceview editor syntax highlight undo marker bracket gtksourceview editor syntax highlight undo marker bracket



Community Events











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


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

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