Offline
Online
Viewers
I'm Live!
Watch Now

Month: September 2008

JavaScript Command Pattern

For this example of a Command pattern, we will create a simple “Interpreter” object and a basic “Command” object and demonstrate their respective use. Let’s first start with the “Interpreter”: [codesyntax lang=”javascript”] var Interpreter = {  execute: function(command){ //split on the space var commandArray = command.split(” “); try{ //use first entry as command name var […]

Read More

Affiliates