Tag Archives: Design Patterns

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

Posted in Code, Design Patterns, JavaScript | Tagged , | 8 Comments

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

Posted in Code, Design Patterns, JavaScript | Tagged , | 1 Comment

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

Posted in Code, Design Patterns, JavaScript | Tagged , | 5 Comments

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 , , , | 3 Comments

Rolling Your Own MVC: The View

Welcome to the third part of my series on MVC framework development. In the previous two articles, I discussed the general feature set that our framework will have and I also gave an overview of the page load scenario. In … Continue reading

Posted in PHP | Tagged , , , | 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

Posted in Code, Design Patterns, PHP | Tagged , , , | 8 Comments

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

Posted in Code, Design Patterns, PHP | Tagged , , , | 4 Comments

Autoloading Element References with the DOM

It’s been a long time since I sat down and wrote anything about JavaScript; and with Dustin’s new book on design patterns in JavaScript, I felt that this would be a good time to post about a pattern that I’ve … Continue reading

Posted in Code, Design Patterns, JavaScript | Tagged , | Leave a comment