Design Patterns

Introduction to the JavaScript Module Design Pattern

Blog Header ImageIn a previous blog post, I gave a quick overview of how closures work in JavaScript. Closures are a very powerful tool in JS development and can be used in many different design patterns. In this post, we'll look at how the module pattern works thanks to these closures.

How Closures Work in JavaScript: An Overview

Closures are a very powerful yet underused feature unique to of JavaScript (and other ECMAScript languages). They essentially provide your code with private variables that other scripts can't access. This is accomplished by exploiting three interesting features (or "quirks") of JavaScript:

Using Textures In Websites

Using textures in websites can be a great way to add accents to your design. Sometimes we find in the design process that there is just something missing from the overall look and feel of the design. When there is already enough content and you simply do not want to busy up the environment, a great thing to experiment with is texture! Whether it be the background, or the main navigation, there is always a way to implement something with style!

Method Chaining with PHP

Method chaining is a fluent interface design pattern used to simplyify your code. If you've used frameworks like Zend or jQuery, you probably have some experience with chaining. Essentially your objects return themselves, allowing you to "chain" multiple actions together.

 
blog rss banner
 

View All

Testimonials

“It was a pleasure working with Michael Spinosa and his team from Unleashed Technologies.

Jordan Sopher
Eyemaginations, Inc.

"Unleashed Technologies came in under budget and blew us away with the quality of their work. It was refreshing! Especially when most others in this field over-promise and under-deliver!"

Lawson Owen
Proactive Dealer Solutions