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

learn more… | top users | synonyms

-2
votes
3answers
191 views

I have to run certain number of statements (which are executing .exe) in a loop

I have to run certain number of statements (which are executing .exe) in a loop. ForEach(object obj in ListOfVersions) { Step 1: call Exe1 Args=obj.somevalues Log Step 1 completed ...
4
votes
2answers
411 views

A design pattern for data binding an object (with subclasses) to asp.net user control

I have an abstract class called Address and I am deriving three classes ; HomeAddress, Work Address, NextOfKin address. My idea is to bind this to a usercontrol and based on the type of Address it ...
2
votes
2answers
114 views

Design patterns: Extract instance types into different buckets

I have the following type hierarchy: interface I: ----+class B implements I ----+class C implements I ----+class D implements I I have another class Consumer1 that supports types C and ...
0
votes
2answers
135 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 ...
0
votes
2answers
291 views

Access functions from user control without events?

On some generic functions, it seems that accessing a function on mainform directly from the usercontrol is easier than raising an event. For example: A function on main form that displays one desired ...
7
votes
1answer
193 views

Database Facade to wrap our existing queries?

We have a very big application written in C++ using the MFC framework (millions of code lines). No need to say that it's a legacy system, but it's also heavily maintained and updated. This application ...
3
votes
1answer
195 views

How do the Application and Database Interface Layers interact at their boundary?

I was watching one of Uncle Bob's videos and he brought up the Database Interface Layer. He had this diagram showing it: These arrows show that the DB Interface Layer is aware of and calls the ...
3
votes
1answer
264 views

Patterns for a tree of persistent data with multiple storage options?

I have a real-world problem which I'll try to abstract into an illustrative example. So imagine I have data objects in a tree, where parent objects can access children, and children can access ...
2
votes
1answer
143 views

Designing status management for a file processing module

The background One of the functionality of a product that I am currently working on is to process a set of compressed files ( containing XML files ) that will be made available at a fixed location ...
1
vote
1answer
182 views

What principle of OOAD is this pattern breaking?

I'm trying to make a case for not putting the structure in the parent BaseModule class I've shown below. I'm more for a Strategy Pattern, and minimizing inheritance in favor of has-a relationships, ...
1
vote
1answer
152 views

Class structure/pattern for validating several different Excel templates?

I'm trying to validate the contents of Excel sheets that follow several different templates. For each one, there are three possible validation actions for various cells: Regex (e.g. "XYZ-123" fails ...
0
votes
1answer
131 views

Designing application flow

I am creating a web application in java where I need to mock the following flow. When user trigger a certain process (add product to cart), I need to pass through following steps Need to see in ...
3
votes
0answers
132 views

DDD and filtering

I am developing an app in ddd maner. So I have a complex domain model. Suppose I have a Fare object and Airline. Each Airline should contain several or much more Fares. My UI should represent Model ...
3
votes
0answers
263 views

Useful design patterns for working with FragmentManager on Android

When working with fragments, I have been using a class composed of static methods that define actions on fragments. For any given project, I might have a class called FragmentActions, which contains ...
2
votes
0answers
93 views

design practice for business layer when supporting API versioning

Is there any design pattern or practice recommended for business layer when dealing with multiple API version. For example, I have something like this. http://site.com/blogs/v1/?count=10 which ...
2
votes
0answers
118 views

What is the good way of sharing specific data between ViewModels

We have IAppContext which is injected into ViewModel. This service contains shared data: global filters and other application wide properties. But there are cases when data is very specific. For ...
1
vote
0answers
93 views

Acceptable placement of the composition root using dependency injection and inversion of control containers

I've read in several sources including Mark Seemann's 'Ploeh' blog about how the appropriate placement of the composition root of an IoC container is as close as possible to the entry point of an ...
1
vote
0answers
86 views

Android design advice - services & broadcast receivers

I'm in the process of learning the Android SDK and creating some projects to get a grasp on the system. The current project I'm working with works just fine but I'd like to get some advice about ...
1
vote
0answers
134 views

Fluent interface implementation and reflection. Case study

I hope I picked the right group for this question... I have this little framework I want to implement and I would like to have an opinion on it. In particular I am more concerned about the ...
0
votes
0answers
65 views

How to implement multi-theme PHP application

I am developing an application which will handle many virtual stores and I would like to have many themes that the user could choose anytime. I would to know what's the main ideia to implement it. I ...
0
votes
0answers
31 views

Python web application frontend for equipment diagnostics and interaction

My goal is to have a Python application that runs a web server which hosts the user interface, and based on interactions from a user in their browser, long running tasks get kicked off and through ...
0
votes
0answers
25 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 ...
0
votes
0answers
64 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
0answers
80 views

Patterns for refactoring

I have a existing legacy library which has multiple helper classes. For example Helper1, Helper2. They are not well organized. I want provide an easy to use interface like this: ...
0
votes
0answers
144 views

Java Design Question - Updates to Multiple Tables

My application is having several domains and have corresponding screens for doing all the CRUD operations. Now I have a requirement where objects from cross domain should be shown in single screen. ...
0
votes
0answers
197 views

Best Design Pattern for Coupling User Interface Components and Data Structures

I have a windows desktop application with a tree view. Due to lack of a sound data-binding solution for a tree view, I've implemented my own layer of abstraction on it to bind nodes to my own data ...
0
votes
0answers
96 views

Build filter conditions for entities on client side

I have the requirement that users should be able to specify filter conditions for one kind of entity through a GUI on a thin client. These conditions must be convenient to generate, meaning the GUI ...
-1
votes
0answers
20 views

Struts2: Convention Plugin vs. XML Configuration

What are the pros and cons of using Convention plugin over xml configuration in a Struts2 application? What is more preferred in real-world enterprise applications? Is it important that a Struts2 ...
-1
votes
0answers
62 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. ...