Accessibility in Modern Interfaces
Creating an ISO datestamp
Removing Useless Nodes From the DOM
For the third article in this series on short-and-sweet functions, I’d like to show you a simple function that I find indispensable, when working with the HTML DOM. The function is called clean(), and its purpose is to remove comments and whitespace-only text nodes.
Why Would You Write Your Own CMS?
Stepping into the ever-raging debate about which is the best CMS, James Edwards looks at the case for writing your own custom solution. With recent hindsight he discusses why he chose to write his own CMS, and then goes on to outline the benefits — and the drawbacks.
The second article in our series covering short, but sweet, functions discusses the problem of testing for empty values. The function in question is called empty(). Similar to the PHP function of the same name, it takes a variable or property and tells you if the value is empty. The definition of empty depends on […]
Adding Micro-Constructors to a Modular Design Pattern
Recently on JSPro I wrote about a modular design patterns, with four different member types providing a high-degree of flexibility over how a script is organised. In this follow-up article, I’ll be looking at a way of extending that pattern by adding micro-constructors, public functions that are object constructors, so you can have multiple independent […]
A Utility Function for Padding Strings and Numbers
In this article, I’ll be describing the structure and benefits of an extended modular design patterns, that includes four principal member types: public: members that can be accessed from anywhere private: members that can only be accessed from inside the object privileged: members that can only be directly accessed from inside the object, but which […]