Tagged Questions
The design-patterns tag has no wiki summary.
0
votes
0answers
21 views
Factory design pattern - getting the types from a table
I've implemented a generic factory as described here
I need to register elements to the factory hard-code like this:
Factory.Register(1, typeof(MyClass));
this factory will have to be correlated ...
1
vote
2answers
190 views
Who's the author/creator of the Repository Pattern?
I´m pretty sure it´s not the gang of four. I have a feeling this is a newer pattern. Where was it first published/mentioned?
7
votes
3answers
215 views
Literate programming, good/bad design methodology
I have recently found the concept of literate programming. And I found it rather intriguing. Yet I have not been encountered with claims that it is a bad way to structure a program. It seems not ...
5
votes
4answers
297 views
Java - using single class or multiple class for each type?
I currently have a Java class called "node" which has a number of fields. Which fields in the class are used depends on a field called "type". There are close to 10 (this can grow) different types of ...
6
votes
3answers
130 views
Advanced JavaScript design patterns [closed]
I'm looking for books, online resources or suggestions about how to structure big projects or build a framework in JavaScript.
I'm not looking for books explaining how inheritance or closures work. ...
1
vote
4answers
120 views
How should I deal with nested compositions?
I came across the following question on a website for interviews:
Here are 3 products: table, chair and bench. Product can be of material: wood, metal, and plastic. Design class structures for ...
3
votes
2answers
94 views
How to get OOAD and Design Patterns hands-on experience in C#?
I have read the concepts and practiced some examples on OOAD and Design Patterns. But when I was asked to implement the singleton pattern in a little bit different manner, I was unable to do it and ...
3
votes
1answer
123 views
Can you point me to a nontrivial strategy pattern implementation?
We faced with quite branched registration model. With three main flows which often in some conditions could be switched between. Every flow has at least four different steps. Some steps has ...
4
votes
3answers
171 views
How to use a MessageBox using the MVVM pattern?
I am implementing a UI application using the MVVM design-pattern.
The thing is, sometimes when you detect that something is wrong with data that was inputted by the user, you'd like to notify him ...
7
votes
5answers
162 views
How to introduce a new pattern into an existing codebase?
In my quest to better my development skills I learn new design patterns. In sample projects or personal projects it's really easy to adapt new patterns into my code.
However at work I have a large ...
2
votes
3answers
77 views
design pattern for describing a variable subpart of a config file
Suppose I have an XML config file like the following:
<myapp>
<settings/>
<output>
<mailto>mail service configuration parameters</mailto>
...
4
votes
1answer
92 views
Designing web-based plugin systems correctly so they don't waste as many resources?
Many CMS systems which rely on third parties for much of their code often build "plugin" or "hooks" systems to make it easy for developers to modify the codebase's actions without editing the core ...
7
votes
5answers
202 views
Reengineering the project from scratch [closed]
Possible Duplicate:
When do you rebuild an application or keep on fixing the existing one
I am currently working on a project that has been in development for the last few years used ...
-5
votes
0answers
60 views
What are the programming patterns present on this code? [closed]
I'm not good to explain so I'll put an example:
//Objects creation
neo(Thing,Animal)
neo(Animal,'Bird',{canFly: true})
neo(Bird,'Falcon',{speed:7,intelligence:2})
//Instantializing is natural
...
16
votes
6answers
405 views
Is there a design pattern that would apply to discount models?
Are there any known design patterns for implementing discount models?
By discount models, I mean the following:
If a customer buys Product X, Product Y and Product Z he gets a discount of 10% or ...