Design patterns in Javascript : Observer

This pattern also referred as publisher – subscriber pattern describes a method to allow one object to be aware of another object changes.

It allows you to ask to be notified when the state of the observed object changes, so that you can react on that information.

As you can imagine, this pattern is widely used to implement event systems.

Have you ever write Ajax code or used a call back function?

Then you have used this pattern. Continue reading

Design patterns in Javascript : Singleton

 

The singleton patterns was documented as a solution to a simple problem, “Only one object of class X can be instantiated at any time in the application”

Typically a singleton is implemented by restricting access to the class constructor, effectively making impossible to instantiate the class

It is common to use singletons for application wide configuration or database access classes.

Continue reading

cheap web hosting

If you are reading this you are probably looking to host your new blog or web site, although there are many free services that allow you to establish your online presence you do not have control over your blog and the its configuration.

The best and only way to maintain full control over your blog is to own the space where it is hosted.

Many web hosting services offer low prices and great features, but how to choose from such a vast offer?

Continue reading