-
Recent Posts
Recent Comments
- Sajib on Rolling Your Own MVC: The View
- Single var pattern – Javascript | malev's blog on Responsible JavaScript: Globals
- Fiji Web Design on The Factory Pattern in JavaScript
- Bah Humbug on A Week in JavaScript Patterns: Self-invocation
- JavaScript Patterns, A Book Review « Room Full of Mirrors on A Week in JavaScript Patterns: Self-invocation
Archives
- February 2010
- January 2010
- November 2009
- October 2009
- June 2009
- May 2009
- February 2009
- January 2009
- October 2008
- August 2008
- July 2008
- June 2008
- May 2008
- April 2008
- February 2008
- January 2008
- December 2007
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- June 2007
- May 2007
- March 2007
- January 2007
Categories
Meta
Category Archives: Design Patterns
Responsible JavaScript: Incrementing and Decrementing
One area of JavaScript which has gotten a lot of negative attention lately is the increment and decrement operators. To be clear, much (if not all) of this discussion can be traced back to JSLint’s intolerance of them. To understand … Continue reading
Posted in Design Patterns, JavaScript
Leave a comment
The Factory Pattern in JavaScript
We could also call this article, “JavaScript Constructors Considered Harmful.” I recall reading a post recently which describes factory methods as a best practice. I can’t tell you how thrilled this made me as I’ve been advocating this for years, … Continue reading
Posted in Code, Design Patterns, JavaScript, Uncategorized
8 Comments
Synchronous Execution in JavaScript
Complex front-end web applications generally consist of many components which are initialized and configured at load time. What I’ve come to find out quite recently is that some browsers simply can’t handle too many things going on at once (eg: … Continue reading
Posted in Code, Design Patterns, JavaScript
Leave a comment
A Week in JavaScript Patterns: Lazy Function Definition
Lazy Function Definition is a pattern of functional JavaScript programming, similar to Load Time Configuration. The key difference is that the final function value isn’t configured at load time, but rather upon the first invocation of the function. The Lazy … Continue reading
A Week in JavaScript Patterns: The Module
The Module is a brilliant design pattern which demonstrates the elegance of the JavaScript language by exploiting closure (one of JavaScript’s most powerful features) to create private members. The Module makes use of Self-invocation making it useful as an application … Continue reading
Posted in Code, Design Patterns, JavaScript
Leave a comment
A Week in JavaScript Patterns: Load Time Configuration
Load time configuration is the process where a JavaScript application configures itself as it is being loaded. This pattern is most commonly found in libraries in which they configure themselves at load time to be optimized for a particular browser. … Continue reading
A Week in JavaScript Patterns: Self-invocation
I would like to begin this series of posts with one of the most useful and commonplace patterns in my code. Arguably, this can be considered a feature of the JavaScript language rather than a design pattern; however, when considering … Continue reading
Improving the Module
Update: In my code example below, I make use of a self variable. This probably isn’t the best idea in hindsight since JavaScript reserves self as a secondary reference to window. I’m always fascinated by the JavaScript language. What impressed … Continue reading
Posted in Code, Design Patterns, JavaScript
Tagged Code, Design Patterns, JavaScript, the module
3 Comments
Rolling Your Own MVC: The Page Load Scenario
In my previous article, I announced that I would be documenting the process of developing a simple MVC framework. In this post I will go into a little more detail about each of the specific components of our MVC and will … Continue reading
Rolling Your Own MVC: Introduction
2007 was the year of framework development for PHP. Cake, Code Igniter, Zend, Solar, Symfony, and piles more began to really get some well deserved attention. Today, you can throw a rock and hit a half dozen production-ready frameworks that … Continue reading