design

Learning Modelling

Is there a good book which I can follow to learn modelling/doing architecture? Good samples? What would you do if you have to learn modelling from very basics? Thanks ...

Business Objects/Custom Classes DAL Design

I need some advice on how to handle this scenario. My application has many tables and custom classes mapped to those tables. Let's use the following as an example (pseudo-code): Public Class Country Name As String Language As String Capital As String President As String Public Class State Name As String Capital As String Country As S...

Android widget design - default black background

In the new version(s) of Android such as version 2.1, default widget (music widget, news and weather widget, youtube widget) have been restyled to use a black background with a white radial gradient at the top in the middle. I've seen other widgets starting to use the exact same background. However, I can't find this background anywhere...

ASP.NET MVC: customized design per domain

Hi. I'm thinking about ASP.NET MVC 2 project which should display the same Domain Model(with different data) in different mark-up or page design(selected by url domain). I'm not sure which one ot these to use : set of views per unique domain + one default? use areas? any other idea? How would you do that? Thank you. EDIT I have f...

How to implement "drag n drop" user interface on website?

Hello, I was wondering what would be the best way to implement some kind of "drag n drop" user interface? What i mean is that there would be one main page and every link click (eg. other sections like about, gallery, contact form) would open a new drag n drop element on top of that main page. Something like windows desktop where you ca...

Elegent way to collapse or expand sub-sequences of a list in Python?

I want to collapse or expand sub-sequences of a list e.g. ['A', 'B', 'D', 'E', 'H'] -> ['AB', 'DE', 'H'] and vice versa EDIT: the example above may cause misunderstanding. the following is better: e.g. ['foo', 'bar', 'wtf'] <-> ['baz', 'wtf'] currently I wrote some ugly code like: while True: for i, x in enumerate(s): if x ==...

Advice on designing and building distributed application to track vehicles

I'm working on application for tracking vehicles. There will be about 10k or more vehicles. Each will be sending ~250bytes in each minute. Data contains gps location and everything from CAN Bus (every data that we can read from vehicle computer and dashboard). Data are sent by GSM/GPRS (using UDP protocol). Estimated rows with this data ...

Can Drupal Taxonomy module be used to categorize court records and briefs?

I'm currently working on a project that involves moving a database of documents for court records and briefs over to a Drupal environment. One of the problems that we are faced with is how to index these documents. In our court district, records and briefs all have a docket number which is assigned to a case. The interesting thing is ...

Best approach to design a service oriented system

Thinking about service orientation, our team are involved on new application designs. We consist in a group of 4 developers and a manager (that knows something about programming and distributed systems). Each one, having own opinion on service design. It consists in a distributed system: a user interface (web app) accessing the services...

When should methods be made private?

There are lots of times where I'm not sure whether a particular method should be made private or not. For example, I'm building a class right now, which, is responsible for generating a report. This class has a buildReport method and several methods which collect the necessary data for buildReport. // single public method // uses a set...

Observing multiple windows services

I would like input on the design I currently have planned. Basically, I have some number of external instrumentation, each of which should always be running, collecting specific data. My thought was to create a service for each, always running and polling the instruments, performing logging, etc. There could be one instrument, or there ...

how to avoid returning mocks from a mocked object list

I'm trying out mock/responsibility driven design. I seem to have problems to avoid returning mocks from mocks in the case of objects that need a service to retrieve other objects. An example could be an object that checks whether the bills from last month are paid. It needs a service that retrieves a list of bills. So I need to mock tha...

implementing a Intelligent File Transfer Software in java over TCP/IP

Hello Can you please provide answer to some of these? Thanks ...

Coming from a class diagram to a dialog window

Hello, I have a class diagram ("Customer") with some private and public attributes as well as some operations. Now I want to model a dialog (GUI) for editing this customer. The window represents the class Customer and some drop downs and checkboxes the attributes. The operations ("save", "refresh") are represented by buttons. Design Qu...

How can I write good "research code"?

"Research code" is often held up as a paragon of what not to do when writing software. Certainly, the kind of code that often results from trying to solve a research problem can end up being poorly-designed, difficult to debug, etc. But my question is this: does research code have to be this way? Is it possible to write good research ...

Implementation/interface inheritance design question.

I would like to get the stackoverflow community's opinion on the following three design patterns. The first is implementation inheritance; the second is interface inheritance; the third is a middle ground. My specific question is: Which is best? implementation inheritance: class Base { X x() const = 0; void UpdateX(A a) { y_ = g(...

Need advice on C++ coding pattern

Hi! I have a working prototype of a game engine and right now I'm doing some refactoring. What I'm asking for is your opinion on usage of the following C++ coding patterns. I have implemented some trivial algorithms for collision detection and they are implemented the following way: Not shown here - class constructor is made private a...

Desiging a AJAX website

What are the things to consider and watch out for when designing a website with AJAX? Must take care of conditions, say timeouts, error handling, for instance? Best practices? What parameters to take care of while designing and coding? ...

Another design-related C++ question

Hi! I am trying to find some optimal solutions in C++ coding patterns, and this is one of my game engine - related questions. Take a look at the game object declaration (I removed almost everything, that has no connection with the question). // Abstract representation of a game object class Object : public Entity, IRenderable...

Application Design: Single vs. Multiple Hits to the DB

I'm building a service that performs a set of configured activities based on the type of request that it receives. Each activity involves going to the database and retrieving/updating some kind of information. The logic for each activity can be generalized and re-used across different request types. The activities may need to particip...