GodLikeMouse
  • Blog
  • Music
  • About Me

Software Design

Code

JavaScript Command Pattern

Introduction For this example of a Command pattern, we will create a simple Interpreter object and a basic Command object and demonstrate their respective use. The Interpreter Let’s first start with the Interpreter: Ok, so what have we done here? We’ve created a basic pseudo structure with a single method Read more…

By GodLikeMouse, 17 yearsSeptember 5, 2008 ago
Code

JavaScript Singleton Pattern

Singletons are quite effective when it comes to needing only a single instance of a class or object instanciated, regardless of when or who creates it. Let’s start by creating a basic class that we will later turn into a singleton: So, now we have a simple ValueObject class, which Read more…

By GodLikeMouse, 18 yearsMay 10, 2007 ago
  • Blog
  • Music
  • About Me
Hestia | Developed by ThemeIsle