Archive for the ‘snowUI’ Category

snowUI: Template to create a snowUI DAO

Monday, December 27th, 2010
var MockUserDao = (function(){

    var somePrivateStuff = null;

	// Object function
	function MockUserDao(){};

	// ------ DAO Interface ------ //
	MockUserDao.prototype.getUser = function(objType,id){
	  somePrivateFunction();
	  ....
	}

	....
	// ------ /DAO Interface ------ //

	// ------ Privates ------- //
	function somePrivateFunction(){
	....
	}
	// ------ Privates ------- //

	return MockUserDao;
})());

snow.dm.registerDao("user",new MockUserDao());