Relative Content

Tag Archive for design-patterns

UML representation of specific factory pattern

I have to create an UML class diagram from the following example code (Perl). I don’t think that the standard factory pattern match in my case or I don’t understand it correctly. I don’t have AbstractFactory and ConcreteFactory but a single Factory.

JavaScript application design patterns [duplicate]

This question already has answers here: Are there any OO-principles that are practically applicable for Javascript? (2 answers) Closed 11 years ago. I need to write a PhoneGap application with JavaScript and I’m thinking of the code design patterns. I’ve read some books of JavaScript design patterns but can’t really see the advantages/disadvantages on them […]

Template rendering engine legitimate use of a singleton?

I wrote a standalone singleton class (scaffold) tonight that serves as a facade to a few other classes, including a template class and a view class. Templates and views are both named and instances of each are stored in the scaffold object. Templates can contain views and views can contain other views. A template and it’s contained views is rendered when: