WordPress is for blogging: any other use is a costly mistake

I don't understand why most web agencies tend to use WordPress as a catch-all for every project they work on. In short, WordPress is a CMS designed to manage blogs or blog-like web sites. WordPress was not designed to manage e-commerce sites, communities or even newsletter or file downloads. The more the task diverges from the original design, the more it's likely that your project will fail or, if you're lucky and patient, need continuous assistance for bug fixing, maintenance and plugin customization. You'll probably end up with a disappointed and angry client and a significant increase of your budget costs. You don't deserve this.

jQuery: Observer Pattern on slideshows

I've just finished to work on an interesting jQuery/WordPress project (you can find it here) where I had to build an interactive slideshow very similar to a classic jQuery slot machine in its inner functioning. The only problem was to keep track of the visibility of the slides, that is, being sure that the current slide was visible. This is a fantastic use case for the Observer Pattern.

CSS reset considered evil

CSS resets are wrongly considered as a necessary part of any CSS template. After fixing a long series of WordPress themes that relied massively on this feature, I have to say that CSS resets are evil. More precisely, they're overused even when they're not necessary. Let me put it in this way: are we absolutely sure that all HTML elements must be reset? Are we absolutely sure that, in any circumstances and templates, we have to normalize the default rendering of all elements? Are we absolutely sure that all the default styles used by browsers on all elements need to be reduced to a lowest common denominator? Or, more properly, should we start rethinking the whole process behind normalization and realize that perhaps some default styles might be useful in some cases?

Alternatives to CSS hacks

The so-called "CSS hacks" are particular patterns used by authors to deliver style rules only to one browser or to prevent a browser from reading certain rules that might cause rendering problems. These patterns may rely on parsing bugs, wrong DOM implementations or syntactical constructs supported only by the targeted browser. Hacks may validate or not. In this article I'll review the most popular hacks used by authors, explaining why such patterns should be avoided and how one can actually target a browser by deploying other techniques.

WordPress: how the eShop plugin works

The most interesting working experience had so far with WordPress is surely the radical changes I had to make to the eShop plugin. A client wanted that instead of processing orders the plugin should send an e-mail with a pre-order receipt. Further, the shopping cart must be modified so that it can accept a discounted value for each item. Said that, let's see how eShop works.

jQuery: serialize a form as a JSON object

If you're using AJAX with a form and you want to pass a JSON object to one of the jQuery's AJAX methods used to process the request, you will probably wonder how this could be done. Basically, you should convert your form values to a plain array, loop through all the items in the array and finally return a plain object literal. Let's see the details.