Tags related to 'patterns'

The Universal Design Pattern
Category:
Stevey's Blog Rants: The Universal Design Pattern

Today I thought I'd talk about a neat design pattern that doesn't seem to get much love: the Properties Pattern. In its fullest form it's also sometimes called the Prototype Pattern.

XML.com: Atom Authentication
XML.com: Atom Authentication

A nice article with detailed explanation of the atom authentication protocol
The Decorator Pattern for JavaScript
Category:
The Decorator Pattern for JavaScript
  • Run actsAsDecorator() on any object.
  • This object will now have a before() and after() method that work like this:
    o object.before(‘somethingHappens’, function() { });
    o object.after(‘someMethodGetsCalled’, function() { });
  • Now, whenever you call object.somethingHappens(), the function you passed in will be called before the original function runs.
  • Similarly, whenever object.someMethodGetsCalled gets called, that other function you passed in will be executed afterwards.

Just remember: before(‘method’, function() { }); after(‘method’, function() { });