Thank you all and a Happy New Year
I would like to thank all of you who visited my blog in December 2009 for their interest in what I have to say. Thanks for making the WebDevelopment Dominique Stender a success in such short amount of time. Over 900 human visitors and almost 11,000 page views per month not counting spiders and bots is a solid number for a blog that is less than two months old in my book.
I'm glad you like the topics and ideas I present here. I'll continue to give my very best in 2010 and I promise I have a couple of interesting topics already piled up.
A successful and prosperous year of 2010 to all of you!
Another reason to upgrade to PHP 5.3
In case you haven't found any specific reason to switch to PHP 5.3, I have one: Static properties.
Consider the following scenario: You have a group of classes, each responsible for returning a specific statistic. All these classes implement the same API, as given by a common abstract class.
Now, some of these statistics are publicly accessible, others require a certain access control permission to be set.
The logical approach would be to implement a static property to the abstract class, denying access by default. Those classes that are indeed public will overwrite the static property with the correct setting and become accessible.
The property is static to gain speed: There is no need to instantiate the class, if the access control is not satisfied.
Stripped down to the bare essentials the whole set of classes to outline the issue looks like this:
abstract class StatisticBase {
public static $acl = '0';
} // end: class StatisticBase
class PublicStatistic extends StatisticBase {
public static $acl = '1';
} // end: class StatisticBase
class AdminStatistic extends StatisticBase {
// default value for $acl is fine
} // end: class AdminStatistic
AdminStatistic is an implemented class that is private, indicated by the $acl property being 0. PublicStatistic on the other hand is public, hence $acl is 1.
Now before instantiating a specific class we can check whether or not the access condition is satisfied:
if ($user->isAdmin == true || PublicStatistic::$acl == 1) {
// retrieve admin statistic...
} // end: if
But naturally this is cumbersome as soon as you have more than a handful of statistics - you don't want to add another condition to your if-statement whenever you add a statistic. So the logical solution is a loop:
$statistics = array(
'PublicStatistic',
'AdminStatistic'
);
foreach ($statistics as $statClassName) {
if ($user->acl == 1 || $statClassName::$acl == 0) {
// retrieve current statistic...
} // end: if
} // end: foreach
Here PHP 5.2 will fail with a fatal error.
You can't access static class properties by means of using a variable for the classname. PHP 5.3 can. There is no really elegant solution for this. (If you know one, post it in the comments!)
While I'm glad that PHP 5.3 has one more OOP feature covered, It leaves me with the feeling that we still have a long way to go until PHP fully supports object orientation.
Now, if Novel would please release a PHP 5.3 package for SLES 10 and SLES 11... thank you
Great Indian Developer Summit 2010
Title: Great Indian Developer Summit 2010
Location: Bangalore
Link out: Click here
Description: From the website:
Great Indian Developer Summit is the gold standard for India's software developer ecosystem for gaining exposure to and evaluating new projects, tools, services, platforms, languages, software and standards. Packed with premium knowledge, action plans and advise from been-there-done-it veterans, creators, and visionaries, the 2010 edition of Great Indian Developer Summit features focused sessions, case studies, workshops and power panels that will transform you into a force to reckon with. Featuring 3 co-located conferences: GIDS.NET, GIDS.Web, GIDS.Java and an exclusive day of in-depth tutorials - GIDS.Workshops.
At GIDS, you'll participate in hundreds of sessions encompassing the full range of Microsoft computing, Java, Agile, RIA, Rich Web, open source/standards, languages, frameworks and platforms, practical tutorials that deep dive into technical skill and best practices, inspirational keynote presentations, an Expo Hall featuring dozens of the latest projects and products activities, engaging networking events, and the interact with the best and brightest of speakers from around the world.
Start Date: 2010-04-20
Start Time: 08:00
End Date: 2010-04-23
End Time: 18:00
Web enabled custom fonts with cufón
A frequent issue in web development is the clients wish for individual fonts for this site. This ranges from the understandable desire to maximize the companys corporate image by using the corporate fonts to more or less useless eye candy such as in headlines and menus.
The solution that comes up by reflex is to use graphics, often auto generated. But keep in mind that graphics are meaningless for search engines. Your SEO suffers if you use graphical headlines (the most important bits of information as far as search engines are concerned).
The next solution is flash. Google is able to read flash, so your SEO might suffer not that much. But what about your visitors? Ok, Flash is installed on virtually any PC these days. But not on the iPhone. So do you care about your mobile visitors? I think you should.
Furthermore, I use the NoScript Firefox extension as a security measure to disable JavaScript and many other "dynamic" content such as Flash by default. So I won't see your Flash headlines - all I see is a nasty empty box with the NoScript logo. Don't think I'll enable Flash just to see your headlines. Chances are that I leave your site in favor of another one with similar content, without flash.

I further enhanced the social bookmarking options in this blog by dropping the 
