design

Design - Where should objects be registered when using Windsor

I will have the following components in my application DataAccess DataAccess.Test Business Business.Test Application I was hoping to use Castle Windsor as IoC to glue the layers together but I am bit uncertain about the design of the gluing. My question is who should be responsible for registering the objects into Windsor? I have a coup...

use of goto versus runtime code evaluation

Recently for a programming class, we were given the assignment to write a program in any language that, given n, will produce all the possible derangements for an array p of size n such that p[i] != i for all i: 0 <= i < n. We had to use iterators, e.g. yield. Example: n=3, [0, 1, 2] is not a derangement, but [2, 0, 1] is as well as [...

How to redefine Distinct

My boss has given me an assignment that I'm not sure is possible since after about two weeks, I can't figure out a solution, so I'm throwing this out to ask for any sort of help from the SO group. If this breaks your brain, I apologize. A little background first: We develop a database querying application that allows users to get back...

Should I refactor my Django object model?

For reasons it's not worth getting into, the object Model of the django application I am working on is now "wrong" insofar as a number of relations that are 1 to Many are represented as Many to Many. The application functions correctly and is most of the way through QA. It has never been deployed. My design OCD makes me want to refact...

How can I insert dynamic text into a div with absolute position ?

Hi, Take a look at http://www.barelyfitz.com/screencast/html-training/css/positioning/ item 6. It says: It is not a viable solution for most designs, because we usually do not know how much text will be in the elements, or the exact font sizes that will be used. What workaround do I need to use in order to insert dynamic text into...

Mobile phone application design guidelines

Any documents or articles that contain design guidelines for creating mobile phone applications? How applications should be built for ideal user experiences. User Interface & Keypad Graphics Languages Links from specific manufacturers are also welcome. ...

Are Interfaces in JavaScript necessary?

I suppose this could apply to any dynamic language, but the one I'm using is JavaScript. We have a situation where we're writing a couple of controls in JavaScript that need to expose a Send() function which is then called by the page that hosts the JavaScript. We have an array of objects that have this Send function defined so we iterat...

Handling decimal item quantities

I am currently working on developing a program that stores Quantity as a decimal with four digit places for the very small minority of products that are sold in part (eg 100ml liquid being sold in variable amounts like 1mg-3.5mg). I dislike this design as it causes problems for the entire program in deciding how to present the quantity a...

High scalability technology stack

I'm building a webservice that is going to be under ridiculous load (thousands to ten-thousands of queries per second). My normal stack of apache, PHP, memcache and some DB will be able to handle it with a nice load balancer infront and lots of machines, but I'm wondering if there are better solutions. The endpoint will be hit by a beac...

web Designer skills

As a web designer should i learn 3d programs too over development skills? curious to see what people say. ...

How should I design user login functionality

Hello, I'm building Rails application and I want to have user registration/login functionality. I also need to have other fields in the User's model such address(street, city, country), facebook info, twitter info, last login time...etc From a design perspective, is it better to have the User model very light-weight and have just usern...

How do you design a C++ application so that Mock Objects are easiest to use?

I've never developed using Test Driven Development, and I've never used Mock Objects for unit testing. I've always unit tested simple objects that don't incorporate other aspects of the application, and then moved on to less simple objects that only reference objects that have already been unit tested. This tends to progress until the f...

Do I have to design for separate database & server runtime per different module?

Hi! When designing a new J2EE based enterprise framework, do I have to prepare for the situation where separate business modules have to use different databases and have to run on different application server instances? From another point of view: has anyone ever experienced a real life requirement for different databases & servers p...

Best Practices in Design of Billing / Invoice Software in .NET

I am currently working on a project where I have to design / implement the billing/invoicing system for our companies new project. We will be generating the invoices once a month as pdf files and sending out a link to the file to the customer. The framework in use will be .Net 3.5 / C#. As I do not have a lot of experience doing thi...

How can I represent a Map class member in UML?

When I have a class with a Map member, I don't want to draw a separate class/interface object to represent the Map itself, but I'd prefer to treat the map as if it was a native type, rather than a complex object. Consider the following example public class IndexManagerImpl implements IndexManager { /* ... */ private static Map...

"Persistence" in C#. How to store objects between procedures?

I have GUI that allows an user to create and modify a point object. I need to store a list of these points to insert at a specific drawing. Here's how I came up with it: In the form code, I opened a private property List<Points> and I manipulate it directly inside form code. Is this the correct way to handle? Something like: public p...

Total Rails noob - Am I thinking right about the main page for my Web app?

I'm coming from the .NET world, and I'm trying to figure out the "Rails way" to design software. In ASP.NET, my usual instinct is to think in terms of pages. Very often I'll start with default.aspx (the main or index page) and build off that. But under Rails, that seems wrong. On the main page for my app, I want to show a list of ite...

exposing or hiding objects of dependencies ?

Common scenario: I have a library that uses other libraries. For example, a math library (let's call it foo) that uses numpy. Functions of foo can either: return a numpy object (either pure or an inherited reimplementation) return a list return a foo-implemented object that behaves like numpy (performing delegation) The three soluti...

Design of Inventory Application(C#)

I would like to design a Inventory system. Some key features listed below. Multi User Multi Branch Support Online and offline Invoicing Multi Currency Language requirements : - C# 2.0 SQL2005 Server I appreciate your valuable suggestions and ideas to design perfect Inventory system. If you have any Database sample model to des...

Calculating ad impression rank

I am currently working on a database ad rotating system where some of the ads have higher impression (or rank) than others and should be shown more often. What is the best way for calculating the impression rank while still keeping the appearance of "random" ads? What would the table structure for the database look like? Should the cal...