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

How To Avoid Duplicate Code For Constraint Validation In The Model And View Of A Mvc Web App?

Integrity constraints should be defined in the model classes of a MVC application since they are pa… Read more How To Avoid Duplicate Code For Constraint Validation In The Model And View Of A Mvc Web App?

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

Javascript Namespace Pattern

I came across this JavaScript intricacy and was struggling to find the difference. Its about JavaSc… Read more Javascript Namespace Pattern

Javascript File Dependencies - Selective Load Resource Files & Prevent Duplicates

This might be more of a philosophical debate, but here is what I have: Two controls which share a … Read more Javascript File Dependencies - Selective Load Resource Files & Prevent Duplicates

How To Create A Model In Dry Pattern With Help Of Flow.js (for Async Calls) In Node.js?

For example, function user(){ flow.exec( function(){ call a; }, … Read more How To Create A Model In Dry Pattern With Help Of Flow.js (for Async Calls) In Node.js?

Ways To Create A Singleton With Private Variables?

I'm trying to create a singleton that has variables not directly mutable from the outside. This… Read more Ways To Create A Singleton With Private Variables?

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