Tag Archives: design patterns
OOP in Javascript, the right way
In the past months I’ve covered a lot of topics involving the basics of javascript, several design patterns, and the power of RequireJS as a tool for better JS applications. Now it’s time to put the pieces together and let’s … Continue reading
HTML Form styling with Formall – part 2
As an accessibility researcher, this subject is pretty close to my heart. When I designed Formall, the first priority was given to make sure that the HTML which would create good looking forms would also create accessible and user friendly … Continue reading
HTML Form styling with Formall – part 1
One of the most painful jobs of front end development, I always found to be styling forms across different browsers. The CSS rules on how forms should be styled leave much to the imagination of browser vendors. So I’ve attempted … Continue reading
Javascript modules
The module pattern has taken the javascript world by storm. Almost every library out there uses it these days. It has become the corner stone of server side javascript. There has even been talk of including it in a future … Continue reading
Variable visibility in javascript
Every function has it’s own scope. A place where we can declare variables that are only available within the function it’s self. We’ve already seen how this can create private variables in a constructor. But there is much more to … Continue reading
Constructors vs factories
Often in Javascript, you only want one instance of an object. In classical OOP this is done with a singleton design pattern. In javascript we simply use the object literal (i.e. { property: ‘value’}). But when we need a multitude … Continue reading
Inheritance using the Caller extension pattern
The caller extension pattern is a design pattern I’ve discovered, which let’s you create constructors that can inherit from any other constructor. To do this we get to use some javascript magic: the call and apply methods. So let’s see … Continue reading