design

Getting ready to move to EDA/SOA any words of wisdom?

We are currently getting ready to move to an Event Driven/Service Oriented architecture (know it will be a long process). Just wanted to get some words of wisdom if anyone has any advice. Our mgmt is starting to really push the transition, but coming from a sequential processing environment we are worried not just about our IT gorup, b...

How to find the alpha channel transparency value of a pixel in a png image?

I have an image that has alpha channel transparency, something like the image below. http://yfrog.com/86tagsp I want to recreate the same background color with rgba values in CSS but I can not find the real color of the background pixels and their alpha channel value. if I use any sort of color picker it will give me the absolute value...

Can a URL really be considered to be the only key for an HTTP response?

The question can be seen as both practical and theoretical. I am designing a system involving a HTTP client (Flash Player application) and an HTTP server "backend". There are registered users each with their own private image library. Images can be uploaded and of course subsequently retrieved. Since users authenticate with cookies car...

Pattern to build a large hierarchy of objects

I have a problem that involves a relatively large object hierarchy as follows: game has one community manager community manager has one network network has many players network has many friendships player has one strategy manager player has one memory player has one neighbourhood neighbourhood has many players strategy manager has many...

Passing platform-specific data in a platform independent design?

I have a game engine design written in C++ where a platform-independent game object is contained within a platform-specific Application object. The problem I'm trying to solve is the case where I need to pass OS-specific data from the Application to the game. In this case, I'd need to pass the main HWND from Windows for DirectX or an O...

should i allow user to change email when using email as username?

I am using the email address as a username and am allowing users to change their email... which obviously also changes their login. Is there any reason why allowing this flexibility would be a problem? users are tracked with userid. thanks ...

How should I model an entitly with multiple states?

I have an entity, equivalent to a task, that can have multiple states. The "task" can either be in a pending, passed, or failed state. Each one of these states will also have some unique data. For instance, in a failed state the entity should have a reason for the failure, in the pending state it should have a deadline for evaluation, ec...

Design options for references into a thread safe cache when evicting older entries

I'm trying to design a simple cache that follows the following rules: Entries have a unique key When the number of entries in the cache exceeds a certain limit, the older items are evicted (to keep the cache from getting too large). Each entry's data is immutable until the entry is removed from the cache. A 'reader' can access an entry...

Can a URL really be considered to be the only key for an HTTP response? - Part 2

I am not sure how this fits into Stack Overflow's moderation guidelines, but I did not at the time of writing http://stackoverflow.com/questions/2132716/can-an-url-really-be-considered-to-be-the-only-key-for-a-http-response have this particular case in mind, and so decided to continue with this one. The old story: say one has a site whe...

SQL Server DB & App design level suggestion needed. Constraint in DB or App?

I need some suggestions to implement a business rule - whether to keep it in DB (using TRIGGERs) or in App code. --- Table structure:--- # ORG - Master table for Organizations # USER - Master table for Users (each user belongs to an Org so there's a field OrgId which is FK ro ORG) # SITE - Master table for Sites # ORGSITE - {OrgId, ...

Design options for a C++ thread-safe object cache

I'm in the process of writing a template library for data-caching in C++ where concurrent read can be done and concurrent write too, but not for the same key. The pattern can be explained with the following environment: A mutex for the cache write. A mutex for each key in the cache. This way if a thread requests a key from the cache ...

How to separate model from gui ?

Hello I hope this is not something very trivial and obvious. I have some similar programs that I am working at. In each program I have to implement future about saving projects. I came with following design : Project -- Program1Project -- Program2Project The base class Project : class Project { public: void NewProject(); vo...

How and where to handle exceptions in a 3-tier web application? Specifically Sql Database Exceptions

I'm building the standard 3-tier ASP.NET web application but I'm struggling as to where to do certain things - specifically handling exceptions. I've tried to have a look around on the web for some examples but can't find any which go as far as a whole project showing how everything links together. In my data-tier I'm connecting to SQL...

Creating a plugin feature in asp.net

I have an interface that others can implement. I want people to be able to create a concrete implementation of the interface, and then be able to drop their .dll into the /bin directory, and then have my asp.net web application use their implementation. Is this possible? Any other ideas on how to make a plugin type architecture so peo...

Can i add a workflow as an activity to another workflow?

I would like to create compositions of workflows in WF (3.5). Is it possible to directly use a workflow as an activity inside another workflow? I don't want to use the InvokeWorkFlowActivity, since it executes the workflow asynchronously. ...

Multiple inheritance design issue in Java

How do you deal with having only single inheritance in java? Here is my specific problem: I have three (simplified) classes: public abstract class AbstractWord{ String kind; // eg noun, verb, etc public String getKind(){ return kind; } } public class Word extends AbstractWord{ public final String word; ctor... ...

4 program design interview questions

I was preparing for technical interviews and would like to know how could I go about briefly explaining an interviewer about the approach to designing the following programs without going into unnecessary details 1. Program that lets people play tic tac toe with each other over the internet? 2. A suitable data structure f...

Order of programming

Hi, Is there any guidelines for what order of programming you should do? In other words, what should you code first? Stone ...

How to build a simple 2-player game, communicating over the internet, with no custom code on any server?

How can I build a simple 2-player game, that communicates over the internet? I need to solve the problems of: lookup or rendezvous - two players want to find each other. ongoing communications. Either player can initiate an action that requires delivering information to the other side, in a reasonbly quick timeframe (IM-type laten...

PHP searchable catalog design

I'm working on a PHP Real Estate catalog. I am working on the search part right now and I'm having trouble with the logic. Should the default view show all items in the catalog or the search page? Should the code flow handle search first or individual view first? Ideas, tips, links are appreciated. Thanks. ...