design

Design problem causing inability to get returned proper dataType

I have an object that has properties of another object and one called DataValue, but the type that I want DataValue to return depends on information contained in the object in the other property. I'm not convinced my way is the best way to do this. I have this business object called an AssetStructure. An AssetStructure object contains...

How to test anonymous classes?

I believe you must be familiar with this idiom, which is sort of java's excuse for closures //In the "Resource Manager" class public void process(Command cmd){ //Initialize ExpensiveResource resource = new ExpensiveResource(); //Use cmd.execute(resource); //Release / Close resource.close(); } //In the Client class... manage...

Django Forms Template design classes

Django Forms framework is excellent and renders the entire form by just the following. {{ form.as_p }} For a registration form, it converts above into: <p><label for="id_username">Username:</label> <input id="id_username" type="text" name="username" maxlength="30" /> Required. 30 characters or fewer. Alphanumeric characters only (let...

Business Layer, Data Access Layer. Is there any resource to learn how to make relation between Business layer classes with Data Access layer classes?

Business Layer, Data Access Layer. Is there any resource to learn how to make relation between Business layer classes with Data Access layer classes? ...

When and how do I design with my security model?

I'm not sure how to proceed. I have an idea for a web application(s) but I'm not sure which part to do first. If my application has an authorization and authentication need, do I create that first and then the rest of the program or do I do the other (to me more fun) stuff first and then plug in the user authentication later? I'm not ...

(.net) Kind of design question

Hello. My typical application has a couple of textboxes, checkbuttons, radiobuttons, and so. I always want to load the settings the user used the last time when the program starts, and also want to save the settings as the users clicks "Save settings" or closes the application. When the user attempts to save the settings, I'll have to c...

OO and SQL

In trying to understand the correlation between program objects and data in tables (here:http://stackoverflow.com/questions/1149877/oo-program-and-sql-database), which I still don't really understand, a strong difference of opinion was revealed over whether it's ok to use a SQL db to store data for an OO program. For a new programmer...

Design considerations for an adaptive thread pool in Java

I would like to implement a thread pool in Java, which can dynamically resize itself based on the computational and I/O behavior of the tasks submitted to it. Practically, I want to achieve the same behavior as the new Thread Pool implementation in C# 4.0 Is there an implementation already or can I achieve this behavior by using mostl...

Best practices for writing data access in ASP.NET

Ideally I would like to put all the code to access and fetch the data from the database in a separate utility files and all those methods at data binding times from the .net code behind file. The problem comes is when should the connection object be closed. For simple stuff, the helper method can close the connection but for things like ...

Implementing debugger support: choice of debugging API

The .NET Framework has unmanaged debugging and profiling APIs that I assume people/companies are familiar with. If someone was implementing debugger and profiler support for a new CLI runtime¹: What would be the pros/cons of basic their operation on these existing APIs? These APIs retain backward compatibility² by incrementing interfac...

Mac OS X / Good terminal template

Does anyone know of a good terminal template? I prefere the black one but when I connect to a computer over SSH I get ugly bold fonts with strange collors :). THX! ...

Developer and Graphic Designer in one?

I received a BSCS two years ago and find myself bored in just doing development. I'm a good programmer from my what peers and managers tell me but I've always found graphic design interesting and know that I would succeed at that as well. I hear so many programmers say I have no design skill and I'm thinking, you know I have some design...

ASP.NET Application Architecture

Hey all, My company is going to be "breaking ground" on a (large!) ASP.NET application in the near future here. We're currently in the design phase and most of the ASP.NET application's I've developed in the past were relatively small -- less than a few dozen pages and 1 or 2 developers. Can anyone point out any resources, either onlin...

When to use events?

At work, we have a huge framework and use events to send data from one part of it to another. I recently started a personnal project and I often think to use events to control the interactions of my objects. For example, I have a Mixer class that play sound effects and I initially thought I should receive events to play a sound effect. ...

Caching Proxy Design Advice

Hi, I'm relatively new to proxies. I am currently required to design a caching proxy for work. We have a webservice which serves up data based on calls to it, naturally. I am required to create a proxy for a rich client application that caches the results of these calls. The results are basically string names of products identified by a ...

How to design a service that processes messages arriving in a queue

I have a design question for a multi-threaded windows service that processes messages from multiple clients. The rules are Each message is to process something for an entity (with a unique id) and can be different i.e DoA, DoB, DoC etc. Entity id is in the payload of the message. The processing may take some time (up to few seconds). ...

Why InputStream and OutputStream implement Closeable and Socket doesn't?

Have seen this comment in a method: //I wonder why Sun made input and output streams implement Closeable and left Socket behind It would prevent creation of wrapper anonymous inner class which implements Closeable which delegates its close method to an instance of Socket. ...

DDD or old fashion ?

We are about to design a site for rentacar reservations using asp.net. There is a change that the application will scale up and I was wondering what if using DDD would help in maintenance and performance. I was wondering on what if there are new similar sites designed using datasets and SPs or DDD. So my friends to DDD or go old fashion ...

command pattern returning status

Once I had a discussion about design, relative to the command pattern. My peer stated that a command object should not return the status (successful, unsuccessful, and why) after the .execute() method is called. The reason is that you should not be concerned if the command gets executed or not, because the command must contain no state. ...

Resources for business users to help them develop requirements

Hi gang, In my organization, developing rough UI layouts is part of the role of the business user during the requirements phase. I'm interested in finding a resource or collection of resources to assist the Biz in getting UI prototypes together to add to requirements documents. So far, I've discovered http://wufoo.com/ to quickly mock ...