Reveal.js – a marvelous toy

Recently, I have done a project called Renault Société. The technologies used here were:

  • iCMS, my own custom written CMS, based on CodeIgniter (a PHP-based framework).
  • jQuery, HTML5 and CSS3
  • Reveal.js (Github)

The result is exceeding my expectations by a million miles. Reveal.js is at the center of this magazine. While iCMS is managing the content management of the magazine, Reveal.js is in control of the presentation layer.

I have investigated the source code of Reveal.js, and found it clean, easy to understand, and it caters for extreme customization. How often do you see (or hear) that “all sites based on a certain framework” are all looking the same? I have heard several complaints of that ranging from Drupal to Joomla!, as well as WordPress and other popular open source systems. My opinion is that when this is the truth, the people designing the presentation layer thereof is simply too lazy to dig in and customize it properly.

The showcase for Reveal.js is largely a case in point. Many of the showcases have plainly followed the base template developed by Hakim El Hattab, the author of Reveal.js. Very few of the submissions are deviating from this base template, and I am proud to announce that our site is vastly different from most of those out there, and also better looking.

I would just like to use this opportunity to thank Hakim for his brilliant project. Thanks for all the hard work. It is an amazing project!

Feel free to browse around Hakim’s website. You will find lots and lots of interesting things…

Until next time!

PHP 5.4 released

After nearly three years since the release of PHP 5.3, PHP 5.4 is finally released. Although PHP 6.0 was meant to be the next PHP release, several issues, in particular issues with unicode, postponed the release. Instead, work on PHP 5.4 begun, and in this week, we have seen the culmination of that effort.

Some features available in PHP 5.4

  • Shortened array syntax, a’la JavaScript
  • Traits
  • Built-in web-server
  • Session uploads
  • Addition of binary number format
  • Function array dereferencing
  • Some reports exist in the wild of users getting over 25% speed increases
  • A new version of the Zend framwork
  • Default character set is now UTF-8

Built in web-server

Honestly, I am quite happy with Apache, but I still have to evaluate whether I will use the built in web-server. Although it is VERY early days, I am currently not finding any innovators or early adopters of this in commercial hosting setting, hence I am a bit skeptical to jump on the bandwagon regarding this feature, although I may explore this feature shortly. If so, I will post an article about it.

Shortened array syntax

For me, this means nothing, really. I wonder if this holds a performance penalty for using this syntax. Stay tuned for a little benchmark test on this in the near future.

Some pitfalls

As far as my initial investigation of PHP 5.4 indicates, most current PHP code should still work, but there are some possible pitfalls, such as:

  • New keywords that were added that may cause undesirable effects if used on older code
  • No more safemode, register_globals and magic quotes
  • PHP 5.4 is also the last PHP version that will support Windows XP and Windows  server 2003

Default character set UTF-8

I am particularly excited about this. Having a home language that often has problems with the ISO8859 character set (although mostly due to missing or wrong configuration implementations as well as different character set choices over various platforms and tools), this will help me a lot by knowing at least one of my components used for development will be correctly set and won’t need any additional checking.


Client abuse… what do you do?

It is a well known fact that by conceding in everything a client says is a recipe for disaster. Okay – so you set your price. The client tells you it is too high, and that you will have to come down drastically to get the job. More often than not, especially when your company (or you as a freelancer) is not known well enough to be able to demand the price you want and deserve, you do just that.

A client who mastered this technique often utilizes all their skills in that department to get a huge job done for the least amount of money. As a business manager, that does make sense to do, but some take this too far.

How often do you complain that you are dealing with cheapskate clients? How often do you fume about the amount of effort, work and quality they expect for the paltry amount of money they pay you? If you are falling victim to the practices mentioned above, chances are that you are often in that boat, and are in danger of being dragged away by the current.

So – how do you overcome this? In my opinion, and as corroborated by various sources on the internet, marketing and entrepreneurial magazines, and other publications, it has to do with your ability to stand by your price, deliver value for money at that price, and be open to negotiation in a moderate degree. Be open to be negotiated to a 10% lower price, but more than that, you’re risking becoming a victim of this phenomenon.

Should you succeed in getting your price, and you deliver a good quality product, chances are great that you will build a reputation of strength, and get glowing testimonials from your satisfied clients.

Traits in PHP 5.4

Due to the fact that PHP has up to now used only a single inheritance model, reusing code  by reducing duplication of code was sometimes a bit of a problem.

To start explaining what traits in terms of PHP are, a good start is to look at how the PHP documentation defines it:

“Traits is a mechanism for code reuse in single inheritance languages such as PHP. A Trait is intended to reduce some limitations of single inheritance by enabling a developer to reuse sets of methods freely in several independent classes living in different class hierarchies.”

Buzz words

We have several of buzz words here. They are:

  • Code reuse
  • Single Inheritance
  • Class hierarchies

To fully understand what the definition of a trait means, it is important that you understand what these individual buzz words mean.

Code reuse

Code Reuse is the practice of reusing old code (or software) to create new code (or software). For example, as an overly simplistic example, you could write a single routine, let’s say, HelloWorld, that may do something as simple as write “Hello World” on the screen. You can then use it in other places within your case by simply calling the function HelloWorld which will then automatically put the phrase “Hello World” on the screen where you call this function or routine. An added benefit of code reuse is that should you need to change the message displayed to “Hello Jupiter” it is as simple as changing it in one place in your code. Of course, code reusing has a more prominent place in object oriented programming, but I suspect you are catching my drift.

Single Inheritance

In its most simplest definition, the term Single Inheritance refers to the fact that a class written in a language that utilizes it, can only inherit from one super class.

Class Hierarchies

Class Hierarchies refers to the classification of classes in relation to one another. There are various classes of hierarchies, which falls outside the scope of this article, but in short, some classes can be used as blueprints for others, or an instance of another.

Trait definition revisited

Now that we can distinguish the buzz words in the PHP documentation definition of a trait, the definition makes more sense. Loosely translated, based on the statements above, this can now be simplified as follows:

“A Trait is intended to reduce some limitations of single inheritance by enabling a developer to reuse functions or routines of code previously developed freely in several independent classes living in different classes that are not related to one another.”


This post is not intended as a “how-to” for using traits. If you’re interested in such a post, you should take a look at one of the following articles, which describes the process clearly: or Both of these articles explains HOW to use traits. The intention of this article is to explain what it is, define the concept and have a discussion after this. Feel free to post your comments by replying to this post.