In the last post, I started talking about the Factory Design Pattern, which creates objects for you, generally all of which follow the same interface. So far we’ve covered the Simple Factory, which creates this functionality in a Singleton object, which is the _simplest _way of creating a Factory, hence its nomenclature (I love that word). This time I’ll show you the true Factory.
News has been traveling around the internet about a bill that the American government is trying to pass, which is supposed to help prevent piracy of copyrighted materials via the world wide web. Though, I have no qualms with trying to keep piracy to a minimum, doing something utterly ridiculous that takes away the right to free speech that every American supposedly has isn’t going to gain my approval or the approval of any person with free will and a brain.
I recently started looking through Dojo because another blog writer seemed to highly recommend it while saying there’s no real need to use jQuery. Dojo seemed quite powerful, probably having DOM manipulation on par with jQuery, but only if you required the correct extra modules. Also the syntax for Dojo is far more verbose. Still it seemed like Dojo had something that jQuery didn’t, so I sought to find what jQuery was lacking. It turns out that the only thing that Dojo (excluding Dijit and it’s other separate libraries) had that jQuery didn’t was a publish/subscribe module.