design

Mapping complex python objects to django models

I have a certain class structure in my app, that currently utilizes django for presentation. I was not using the model layer at all, - the database interaction routines are hand-written. I am, however, considering the possibility of actually using django to its full potential and actually using the database-abstraction layer. The quest...

Leader Election Algorithm - Comparison functions are not allowed

Suppose a network graph as a synchronous directed ring and some nodes over this network. I am trying to construct an algorithm that solves the Leader Election problem, but this without using any comparison except the equals(==) and non-equals(!=) functions. After a bunch of thoughts crossing my mind i wonder if there is no solution at a...

Game programming structure

I've been programming in c++ for a bit now and Im very familiar with the syntax. I'm trying to use Allegro to make a card game. I understand everything I need to do for the game logic and what not. What puzzles me is how to drive the game. I'm sort of new to loop based applications. I got used to event based programming in VB .Net. I'm j...

How to design applications for cloud computing where multiple clouds may be involved

I just finished looking at this question: http://stackoverflow.com/questions/753122/which-cloud-computing-platform-should-i-choose But, I am not certain what I should do in designing an application for safety engineers, so a high uptime is important. So, if my application is written in ASP.NET, using SQL Server, it would seem that my b...

Pre-populate capture records for one session.

I have capture screen where a user will capture daily production figures for several performance categories, i.e. they will enter a single figure per category on any particular day. Now I don't want the user to insert a new record for each category-figure record, so I plan to check if the day has records for all categories. If not, bef...

WPF Routed events firing?

I have a WPF form with 3 buttons and have routed events on them, commands are binded on start... private void InitCommandBinding(UIElement frameworkElement) { CommandBinding commandBinding; commandBinding = new CommandBinding(ViewModelCommands.Save, Save_Executed, Save_CanExecute); frameworkElement.CommandBindings.Add(com...

Stop Visual Studio Design mode from refreshing

Does anyone know how to stop Visual Studio from automatically refreshing the Design view everytime I modify the source file associated with a Form? I'm updating strings on a form that has about a million controls. I'm constantly going back and forth between the design and code for a form. The load time it takes to render the design ea...

Generic Interface

Hi All, Let's say I wanted to define an interface which represents a call to a remote service. Now, the call to the remote service generally returns something, but might also include input parameters. Suppose that an implementing class will typically only implement one service method. Given the above information, is the following a poor...

Design for using a mock connection

I have a simple application with a UI with a backend connection, from which i get the data. Now, during development, I wouldn't like to connect to the backend as it slows me down. So, i have some locally stored data and i 'mock' the connection to return the locally stored data instead of making a server call. Now, this is not for writin...

Message Design Patterns

For message based passing systems, what are your "message design patterns" e.g. Limit directed messages (i.e. specific destination) Avoid long cascade chains (i.e. react to MsgA with MsgB, MsgC etc.) Have a system "heartbeat" message Other examples? ...

Strategy for interleaving jobs on AppEngine?

Let's say I have 1000's of jobs to perform repeatedly, how would you propose I architect my system on Google AppEngine? I need to be able to add more jobs whilst effectively scaling the system. Scheduled Tasks are part of the solution of course as well as Task Queues but I am looking for more insights has to best utilize these resources...

Designing a grid website, with navigation in details pages

Hi all, Need help with technical-designing of a website. I have a main page with a multi-paged grid. Whenever you press on a row, you navigate to an extended details page about this row. Here comes my question, I want to be able inside the details page to add "Next" and "Prev" buttons according to the original grid. (Mind you, the grid...

Guidance on modelling system with Nhibernate

Hi guys, I'm having issues trying to model a new system with nhibernate or even databases. I have lot of hardware which can be connected via IP or Serial Com Port (maybe more in the future). I want to be able to have different information depending on which one it is. I was thinking of a ConnectionInformation abstract class with Seria...

Logging *Business* Events - use logging framework?

Hi, Something here doesn't feel right to me here, and so I would like the community's input - perhaps I am approaching this in the wrong way.... Q: Is is appropriate to use traditional infrastructure logging frameworks (like log4net) to log business events? When I say business events, I mean I want a global log like this: xx:xx Custo...

CRUD Class Library Design, to return useful messages about business logic failure, that is not exceptional

I'm building a basic CRUD library, that I anticipate use in both local (add reference) and wcf (add service reference) environments. What are the best return types for the Create, Uupdate, and Delete portions (that have more complex business rules) of a CRUD setup? I want to be able to minimize back-and-forth on the wire, but I also wa...

Batch Process while simultaneous transactions occur

I'm creating a batch process to move some information from my database to external files. This task is manageable, but there's a lot of data that needs to be processed and it will probably take about a month. During this month new information will be continuously uploaded. Is there any way I can do my batch processing and then come bac...

How can I start designing my program on paper without over engineering things?

I'm interested in starting to properly design my software on paper before I ever start coding. What is the standard approach for this? I'm thinking something along the lines of UML but I feel that it's a bit overkill for a one-man project. What are some of the things professionals say is best to do when developing hobby projects? Anti...

How do we share data between two different services

I am currently working on a web service which is periodically polled. It does not store its state and is instantiated everytime it is queried. Essentially, it retrieves the state of other external entities e.g. databases and delivers it back to the requester. Recently, the need to store state as arisen in that There is the need to con...

C#: where to put "save()" method?

I have a question, here is an example I have a Model class: Stock public class Stock{ //some properties, stock name, stock code; public String StockName{ get,set } public String StockCode{ get,set } } Also I have a service class StockService, which will load the data from database and crea...

Develop a Form Designer Application

I have been tasked to create a form designer application in Windows Forms. The application will be used to layout "controls" on a page. The controls would most likely be images that can be resized and repositioned within the form. The result of the designer would be a file with the relative positions of the images or "controls" on the...