Wednesday, December 5th, 2007

NIH Syndrome in PHP - CURE YOURSELVES YOU HEATHENS!

After browsing through some other web developer’s websites and speaking to other developers, I think it’s a shame that there’s so much of the NIH Syndrome going on in PHP.

I find that PHP is one of the languages where NIH syndrome is rampant, or at least it has been, nowadays people are slowly starting to practicing some “reusage”. This is a good thing.

More…

3 comments » Filed under PHP Programming by rvdavid at 23:01.

back to top

Friday, September 28th, 2007

Namespaces in PHP 6!

Well, your alternate language fanboys/flameboys will have one less things to throw at PHP Savants when an Armageddon-like debate is held yet about how PHP is a bad language. It has been a while, and I am 6 weeks late to make a post about it, but there’s been some exciting news in PHP - WE NOW HAVE NAMESPACES!!!! - Well for PHP 6 anyway.

More…

Leave a comment » Filed under PHP Programming by rvdavid at 2:45.

back to top

Thursday, May 17th, 2007

Follow Coding Standards

Being a self-taught beginner at one stage, I understand that code formatting and other concerns NOT regarding syntax is taken for granted, I mean, when you pick up your first programming language, the one thing you want is for your application to work, heck, when some beginners first started programming PHP, they have no idea what a “coding standard” is let alone it’s existence and haphazardly hack away line for line at their scripts without regard.

More…

Leave a comment » Filed under Tips for beginners by rvdavid at 21:07.

back to top

Monday, May 14th, 2007

Format your PHP Code

After fixing my wireless issues with Kubuntu Feisty, I went on a little break. I was sick of looking at my dual monitors and eye-candy rotating desktop cube *rotates cube* - well ok… maybe not the cube, but now that I’m back, I’d like to bring your attention to formatting your PHP code.
More…

Leave a comment » Filed under Tips for beginners by rvdavid at 1:09.

back to top

Wednesday, April 18th, 2007

Template View and View Helper Design Patterns in PHP (updated v2)

The Template View and View Helper patterns lend themselves nicely when it comes to developing a View Layer solution for PHP, or so I found out with the recent refactoring of Cubix (dubbed Cubix II). This View layer duo is very much a great candidate for a “tag team”. Each component performs a role and together make up a big part of the View Layer.

update: Now includes View Helper Locator example.

More…

8 comments » Filed under PHP Design Patterns, PHP Programming by rvdavid at 1:33.

back to top

Sunday, January 7th, 2007

Using Stored Procedures & MySQLI in PHP 5

For the occasions that you want to use a stored procedure you’ve written in MySQL 5 through PHP , the semantic tool to use is PHP’s built in mysqli objects/package.

According to the php.net: “The mysqli extension allows you to access the functionality provided by MySQL 4.1 and above.”

MySQLI stands for MySQL Improved, and it most certainly is with the addition of prepared statements and extensible Object Oriented interface.
More…

17 comments » Filed under PHP Programming by rvdavid at 16:35.

back to top

Monday, November 20th, 2006

Ternary Expression in PHP

After posting on Sitepoint PHP Community Forums again after a long while, I’ve come across some posts which ask what the php code snippet means:

$id = isset($_GET[‘id’]) ? $_GET[‘id’] : false;

This php code block is called a Ternary Expression. It’s a shortcut for:

if ($_GET[‘id’]) {
$id = $_GET[‘id’];
} else {
$id = false;
}

More…

4 comments » Filed under PHP Programming by rvdavid at 0:23.

back to top

Thursday, May 25th, 2006

The Singleton Pattern with PHP

The Singleton Pattern is often mistakenly referred to as the OOP nuts “Global variable”.

Admittedly, I myself have been one of those people who had referred to it as such (this is an edited version you are reading), but in fact, the Global Variable tag that has been given to this pattern is actually a side effect - all you need to do is look at the name.

More…

1 comment » Filed under PHP Design Patterns, PHP Programming by rvdavid at 0:33.

back to top

Credits:

© rvdavid blogs: Web Development | Powered by WP 2.3.1

Tree theme modified based on headsetoptions