design

Design to avoid type casting in derived classes?

public interface IBasePresenter { } public interface IJobViewPresenter : IBasePresenter { } public interface IActivityViewPresenter : IBasePresenter { } public class BaseView { public IBasePresenter Presenter { get; set; } } public class JobView : BaseView { public IJobViewPresenter JobViewPresenter ...

Performance improvement of client server system

I have a legacy client server system where the server maintains a record of some data stored in a sqlite database. The data is related to monitoring access patterns of files stored on the server. The client application is basically a remote viewer of the data. When the client is launched, it connects to the server and gets the data from ...

A good design pattern for almost similar objects

Hello, I have two websites that have an almost identical database schema. the only difference is that some tables in one website have 1 or 2 extra fields that the other and vice versa. I wanted to the same Database Access layer classes to will manipulate both websites. What can be a good design pattern that can be used to handle that ...

Django view function design

Hi, I have the view function in django that written like a dispatcher calling other functions depending on the variable in request.GET, like this: action = '' for act in ('view1', 'view2', 'view3', 'view4', ... ): if act in request.GET: action = act break ... if action == '': response = view0(requ...

how can I design a good architechture for a Transaction Processing System?

I have a project that must design an architecture for it. This project is a something like a Transaction Processing system and I need to know something like this: when and where I must use synchronous and asynchronous relations between its components? If always I use synchronous relations, the amount of messages maybe become exceeded a...

GUI designers! - got suggestions for a GUI modelling diagram language?

Refering to this question I asked a while ago: UI functionality modeling languages It looks like there is no good-enough solution. I decided to develop one. (and prepare a set of elements for DIA or something) I'm sure it will require a good insight in peoples' experiences and problems in designing functionally complicated GUIs. I've...

How to restrict the number of objects of a class to a given number in ruby?

how can i extend the singleton pattern to a number of objects for a class i.e. how can i have only 5 objects of a class at max and not more than that in ruby ...

Correctly use dependency injection

Me and two other colleagues are trying to understand how to best design a program. For example, I have an interface ISoda and multiple classes that implement that interface like Coke, Pepsi, DrPepper, etc.... My colleague is saying that it's best to put these items into a database like a key/value pair. For example: Key | Name...

C# Setting Properties using Index

I have a business class that contains many properties for various stock-exchange price types. This is a sample of the class: public class Prices { public decimal Today {get; set;} public decimal OneDay {get; set;} public decimal SixDay {get; set;} public decimal TenDay {get; set;} public decimal TwelveDay {get; set;}...

Design and Implementation with Prototyping Methodology

I'm developing a game for my dissertation, and I'm using the spiral method approach. I'm having a bit of difficulty structuring my dissertation, specifically the design and implementation section. My solution was designed as much as possible initially, and then after each prototype implementation, the design was refined and extended an...

What should "Solution Architecture" document describe ?

We're going to build a Solution which includes acquiring data through mobile phones(J2ME) and laptops(browser based data acquisition), uploading the same data to back-end servers(built with J2EE) and then analyzing the same data including generating various types of reports. This solution will include a CMS for building the website and v...

Conventions for the behavior of double or triple "click to select text" features?

Almost any mature program that involves text implements "double click to select the word" and, in some cases, "triple click to select additional stuff like an entire line" as a feature. I find these features useful but they are often inconsistent between programs. Example - some programs' double clicks do not select the ending space aft...

MVVM: How to handle interaction between nested ViewModels?

I'm been experimenting with the oft-mentioned MVVM pattern and I've been having a hard time defining clear boundaries in some cases. In my application, I have a dialog that allows me to create a Connection to a Controller. There is a ViewModel class for the dialog, which is simple enough. However, the dialog also hosts an additional c...

Organizing development teams

A long time ago, when my company was much smaller, dividing the development work over teams was quite easy: the 'application' team developed the applications-specific logic, often requiring a deep insight of specific industry problems) the 'generic' team developed the parts that were common/generic for all applications (user interface ...

What are possible designs for the DCI architecture?

What are possibles designs for implementation of the DCI (data, contexts, interactions) architecture in different OOP languages? I thought of Policy based design (Andrei Alexandrescu) for C++, DI and AOP for Java. However, I also thought about using State design pattern for representing roles and some sort of Template method for the inte...

C++ design question on traversing binary trees

I have a binary tree T which I would like to copy to another tree. Suppose I have a visit method that gets evaluated at every node: struct visit { virtual void operator() (node* n)=0; }; and I have a visitor algorithm void visitor(node* t, visit& v) { //do a preorder traversal using stack or recursion if (!t) return; v(t); v...

css sprite button is jumping around

Hello everyone, Does anyone know what is causing the sprite rollover to jump around It is I think more likely a photoshop question, but I am not completely sure. I hope to get an answer here anyway, since I think most webdesigners/programmers problably worked with photoshop also. This is what I want the rollover to do example 1 and ...

How can I build a voting system to support multiple types of objects to vote on?

I'm really looking for something very similar to the way SO is setup where a few different kinds of things can be voted on (questions AND answers). What kind of DB schema, generally, could I use to support voting on many different kinds of objects? Would I have a single Vote table that would have references to other objects in the datab...

Idioms for a three-state toggle?

I have a table column where each row has one of three states, and the purpose of the row is to offer manipulation AND display of this property with three states. My current development view is to have three tightly packed radio buttons with labels at the head of the columns (and every 50 rows or so) and onClick they send an AJAX request...

What technologies/tools do people use to implement live websites ?

Hi, I have the following situation: -I have a server A hooked up to a piece of hardware that sends values and information out of every second. Programs on the server machine can read these values. This server A is in a very remote location so Internet connection is very slow and not reliable but the connection does exist. Let's say it'...