Saturday, August 19, 2006

Say NO to inline styles!

This is my advice to anyone writing a web application that may be extended by another person. In my case, this became important when making templates for my favourite CMS. More specifically, the shopping cart plugin that I am using with it.

The problem is quite simple. the usage of inline styles wrests control away from the template designer and can (as in my case) cause bugs in the GUI. So it's not about subjective personal taste, it is about software stability.

CSS stands for Cascading Style Sheets. In this context, the word cascade applies to the order of priority that a a competing collection of style definitions has on a target HTML (or XML) element. We all know there are three ways that a style rule can apply to an element.
  1. From an external file that is linked or imported
  2. From an embedded defenition included in a <style/> container element
  3. From the value of the style attribute associated with the target element.
The last method listed above is referred to as an "inline style". The order or precedence is the reverse of how I have listed them. Inline overrides embedded overrides external.

This means that if your HTML application defines styles inline to the markup that you output, then the template designer will have to hack up your program in order to regain control over the style. ie. they will have to remove your inline style definitions. The same applies to embedding styles. Its marginally easier to work around embedded styles but it still goes against the idea of templating. In fact, there are work-arounds, but I won't go into them. I don't see why work-arounds should be accepatable when there is nothing to lose by putting all style information in an external CSS file.

You could argue that your understanding of how your content will be templated by someone else is utterly comprehensive. But in my opinion, that would be ambitious to the point of being fool-hardy. It limits the extensibility of the application unnecessarily and your application may was well not be template-able. There goes your separation of concerns, and there goes the sound design of your app.

So please, be nice to layout engineers (designers), and say NO to inline styles.

If you need to brush up on your CSS skills...

Monday, August 14, 2006

Open-source Content management.

I've only managed to dip my toe into the waters of the CMS industry from time to time. The sheer size of the industry can make choosing one a bit overwhelming at times but I'm always intested to see what the latest developments are. More recently, I have started setting up clients with their own websites. Many clients just want an "online presence" and they don't even know what a CMS is, let alone if they want one or not. So we just make it a standard practice to supply them with a free one.

Every now and then, a product comes along that is so "disruptive" that it has enough critical mass to make it's own gravity field. This is usually evidenced by proliferation of satelite products that spring up in response to it's success. Joomla is so new, I could not find any articles on it at CMS Watch . Yet when you look around then net for all things Joomla related you have everything from Joomla template vendors, to Joomla extension vendors, to Joomla specific hosting and not to mention design services and general support.

As for my personal experience with the product, it's early days, but it has blown me away with it's professionality and has impressed me enough to commit to using it as the platform for my clients online presence. This is a pretty big commitment given that this implies that I am willing to provide professional support to Joomla long-term. Here is why I personally like Joomla:
  • It has a very active community and a well organised homepage
  • It will run on common ISP's PHP setups with no real special requirements
  • It is an absolute breeze to install thanks to it's intelligent auto-detections
  • It has a solid API that is well defined and well (improving) documented.
  • It is extensible in multiple dimensions (at least 3 formal extension APIs)
  • It makes extentions easy to create and install due to the use of XML descriptor files. This also facilitates catering for Joomla extension creation in IDEs.
  • The templating is simple, yet flexible
  • It is pure open-source
  • The Admin interface is very pretty and works well. This is important for collegues and customers.
  • It is very user-friendly. The Admin areas is very logical and well laid out.
  • Already has a vast array of free extensions available for it - including all the important types (gallery, forum, wiki, eCommerce etc).
  • And last but not least, they have catered to many little details - which make using the system a pleasure.
Bear in mind that the Joomla project is the result of a split in the Mambo (another open-source CMS) scene where the commercial company that instigated Mambo saw fit to leave many of the core developers (open-source contributers) out of the Mambo Foundation they set up. Often you will see the prefix "mos" - which refers to Mambo Open Source (as there was a proprietary/commercial version of Mambo as well).

Go have a look see at

Thursday, August 03, 2006

I'm making Internet Training Video

I'm drawing on my "vast reserves" of general IT knowledge to create a training programme in the video format. It will be a typical screen video (footage of the desktop) with narration from yours truly. Hopefully I will have the time resources to include some animations to re-enforce the conceptual stuff. The video will not be for set-top DVD players, but rather in the FLV format hosted in HTML pages. It is envisaged that the user will view the tutorials on their desktop where they can switch between viewing it and trying out some of the concepts.

So. All that remains is for me to put together a curriculum and execute the delivery. I would really like to get your input into the topics you think should be covered. Obviously "the Internet" is a very broad topic with squillions of sub-topics. So suggest away, and there is every likelyhood that it will appear in the title.

I'm not sure on the delivery model. I think there will be a website where you can watch it, plus you can order the DVD (to save bandwidth). Some of the videos will be accessible for free. Some of them will be destributed through torrent. But to access the full library, there will be some sort of subscription plan.

Anyway, it's early days, so we'll see. I plan on having a lot of fun with this - may even compose my own musical intros etc :)

Wish me luck.
My status