A design pattern is a general reusable solution to a commonly occurring problem in software design.

learn more… | top users | synonyms

4
votes
2answers
113 views

Refactoring an existing abstract class and its parameters

I have some abstract class A so that it has some abstract method doStuff currently there are many classes that inherit A and implement doStuff. The class' instances are initialized at run-time via ...
1
vote
0answers
13 views

How to manipulate JDBC connection with Service layer [migrated]

I have a Spring MVC App, it works fine, but now I inserted the service pattern and I don't know what is the the best way to treat my JDBC Connection inside my DAO. I have an interceptor which creates ...
9
votes
2answers
186 views

I should have used a factory method instead of a constructor. Can I change that and still be backwards-compatible?

The problem Let's say I have a class called DataSource which provides a ReadData method (and maybe others, but let's keep things simple) to read data from an .mdb file: var source = new ...
3
votes
1answer
90 views

Creating an entity relationship in REST: May I create the parent by posting to a child id?

We are currently designing a REST API to access classical customer data. One of the elements in the API are the assets of an user. The assets are added under a given service. The backend API will ...
0
votes
0answers
22 views

Pattern for XPDL import

I am using xml serialization for importing/exporting data from/to xpdl format. And I need a little advice - to what pattern to use. Right now I have 1 huge class for controlling the whole process (it ...
-1
votes
0answers
55 views

Pattern for efficiently intersect two vectors

I have two vectors of objects and both have an integer start and end index. Now I want to intersect this two vectors and apply a function if both of the vectors have an element with the same index. ...
-1
votes
3answers
52 views

Best way to create draw with limitation

I'm writing a program to automatically make the draw for a competition. There are four objects: Debate Judge School Team Each Debate has two teams and a judge. Each team participates in three debates. ...
0
votes
0answers
51 views

Extension objects pattern

In this MSDN Magazine article Peter Vogel describes Extension objects partten. What is not clear is whether extensions can be later implemented by client code residing in a separate assembly. And if ...
0
votes
1answer
91 views

How to design an application that read files using MVC pattern?

I am going to write an application that reads data from a csv file, and display that data to the user. I intend to apply an MVC design pattern to create this application. A user will interact with ...
0
votes
1answer
71 views

Design pattern for client/server sessions?

Are there any common patterns or general guidance I can learn from for how to design a client/server system where the both the client and server must maintain some kind per-client session state? I've ...
3
votes
3answers
134 views

Dynamically change of UI on value changes in list box

I have a list box with several elements, let it be web servers (tomcat, iis etc). For each list box value, UI must have different views. For example, if we choose IIS, user name and password fields ...
3
votes
3answers
234 views

Simple questions to test understanding of Dependency Inversion Principle

I am preparing a short (1-2 hour) presentation about DIP to several (~5) junior developers (1-3 yr xp) in the office. At the end of the presentation I want to know whether they understood what I was ...
2
votes
1answer
173 views

Best OOP design pattern for a sequence of operations

I am working on an application, a module of which does the following financial operations sequentially: When a user requests for a certain amount to be transferred into her bank account: check ...
0
votes
4answers
228 views

To use custom CSS/HTML template or write code from scratch for a web application back end

I just developed the front end of a unique application for which I coded all the HTML, CSS, jQuery, and JavaScript. Now I want to start developing the back-end or admin panel. What's the best option ...
4
votes
2answers
284 views

Is there a name for being able to quickly find the relevant code?

I notice that a property of codebases that I like hacking on is that it's quick to find the relevant code for some feature, without knowing much about the code base at all. For example, searching for ...

1 2 3 4 5 56
15 30 50 per page