Skip to content Skip to sidebar Skip to footer
Showing posts with the label Design Patterns

How To Create An Object With Private Members Using Object.create() Instead Of New

EDIT: I figured it out from Bergi's answer in the end. Thanks Bergi. pubPrivExample = (functio… Read more How To Create An Object With Private Members Using Object.create() Instead Of New

Why Does The Facade Pattern + Revealing Modular Pattern "add Security"?

REFERENCE According to reference: Below is a more advanced version of the facade pattern that adds … Read more Why Does The Facade Pattern + Revealing Modular Pattern "add Security"?

Is There An Eclipse Plugin That Creates An Outline View For The "javascript Revealing Module Pattern"?

I like eclipse, and with some tweaking it can be used for javascript programming. There's synta… Read more Is There An Eclipse Plugin That Creates An Outline View For The "javascript Revealing Module Pattern"?

Encapsulation In Javascript Module Pattern

I was reading this link http://addyosmani.com/largescalejavascript/#modpattern And saw the followin… Read more Encapsulation In Javascript Module Pattern

Node.js Programming Pattern For Getting Execution Context

I am writing a web app in node.js. Now every processing on the server is always in the context of a… Read more Node.js Programming Pattern For Getting Execution Context

How To Recognize An Area In An Canvas Via Javascript

This image is loaded in an html5 canvas. If a user presses at any point inside the square, I want t… Read more How To Recognize An Area In An Canvas Via Javascript

Javascript Switch Within For-loop Break; Conflicts

I have switch nested with loop in JavaScript like: for (var i = 0; i Solution 1: That is exactl… Read more Javascript Switch Within For-loop Break; Conflicts

JavaScript Design Patterns: Abstract Factory Vs Concrete Factory

What is the difference between concrete factories and abstract factories? PS: I originally asked a … Read more JavaScript Design Patterns: Abstract Factory Vs Concrete Factory