home

How and Why JZ Publish / Subscribe Should Be Used

If you don’t already know, JZ Publish/Subscribe is a jQuery plugin that I developed to add a simple, but powerful Pub/Sub feature to the jQuery utility functions. I’m guessing there are some people out there who don’t understand what Pub/Sub is, how to use it, or why to use it. I’m here to bring some answers and give a specific example of how JZ Publish/Subscribe can be used.

JavaScript Design Patterns: Proxy

This is the 9th installment of the JavaScript Design Patterns series and today we’re featuring the Proxy pattern. The word “proxy” can be defined as a substitute, and that essentially explains what a proxy is. A proxy is an object that has the same interface as another object and is used in place of that other object. The only question is why we would use a proxy instead of the original object.

JavaScript Design Patterns: Factory Part 2

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.

JavaScript Design Patterns: Factory

Another post, another JavaScript design pattern. Today we feature the Factory pattern. The Factory pattern is one of my favorite patterns, especially the “simple factory”, which I’ll explain later. Factories – in real life as well as within the programming world – create objects. It helps clean up your code by removing all of the new operators.

SOPA and PIPA

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.

JavaScript Design Patterns: Decorator

Today I’d like to show another JavaScript Design Pattern: the Decorator, which is a way to add features to objects without subclassing or adding extra attributes. This post continues the JavaScript Design Patterns series that I started several months ago. If you’re new to the JavaScript Design Patterns series that I’m running here, you can find a list of the previous and upcoming posts in the series at the bottom of the post.

New Projects Section

All of you JavaScript lovers out there who have been following this blog recently will probably know already that I recently released a jQuery plugin to add Publish/Subscribe functionality. The Announcement was posted just a few days ago. Well, I decided I can’t just leave the information about the plugin in a post that will fade into the ages of the archive, so I created a Projects page, which you can access via the link on the main navigation bar.

New jQuery Plugin: Publish/Subscribe

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.

JavaScript Design Patterns: Adapter

Another post, another JavaScript design pattern. This time we’re featuring the Adapter pattern. If you’d like to view the previous posts from this series, you can check out the links at the bottom of this page. This mean, green, fighting machine can transform interfaces. Ok, it doesn’t exactly transform an interface, it really just creates a new object/function that adapts the interface of an existing object/function to match what the code knows how to use.

JavaScript Design Patterns: Facade

In our 4th installment of the JavaScript Design Patterns Series, we’ll be taking a look at the Facade pattern. Whether you know it or not, I can almost guarantee that you’ve used the Facade pattern if you’ve been programming in any language for more than a second (that might be a bit of a hyperbole, but you’ll forgive me, right?). You can define the Facade pattern as a piece of code that simplifies a more complex interface. You can pretty much call any form of abstraction a facade. Have you ever made a named function that had more than one line of code within it? Yup, that’s technically an example of the Facade pattern.