design

Do web applications need HTML header tags?

The question is, should we design applications/forms using headers or stick to spans and divs? When the world was using html to link documents, these header tags looked like the 'Table of contents'. In the new era where html is used for applications, using header tags in the orthodox fashion (i.e. h1 contains h2, h2 contains h3 ...) does...

best design for a changelog / auditing database table?

i need to create a database table to store different change log/auditing (when something was added,deleted,modified,etc). i dont need to store particularly detailed info, so i was thinking something along the lines of: id (for event) user that triggered it event name event description timestamp of the event am i missing something her...

What is the best absolute width for a webpage?

Assuming a fluid layout is not an option (since that is a different discussion all together), what is the recommended width for a site layout? What are the pros and cons of different sizes? ...

When should I write Static Methods?

So I understand what a static method or field is, I am just wondering when to use them. That is, when writing code what design lends itself to using static methods and fields. One common pattern is to use static methods as a static factory, but this could just as easily be done by overloading a constructor. Correct? For example: var b...

Is gtk+ responsible for the awkward look of most linux applications?

Now, I know this is completely subjective, so please don't flame me. I've never been entirely satisfied with linux whenever I decided to install a distro like Ubuntu, Fedora etc. because of their awkward positioning and spacing of widgets. Have a look at this: Notice the awkward spacing of the text field's text. I've seen many Gno...

Design problem: shared, synchronized, data access in application... the best approach?

I have a web application (asp.net) where work items are submitted and allocated to users according to their workload. A user's workload is calculated using an algorithm based on the number of items currently allocated to the user (and some other factors). Each new item is allocated to the user with the lowest current workload, increasin...

Should a 'Cancel' button be used as a 'Close' button on a Windows Form?

Three buttons, Save, Cancel, Close looks messy, yet after the user has saved the data should they really click a Cancel button? I need the 'Save' button to leave the form open. What is best practice? Thanks ...

Need help choosing a name for an interface

I'm refactoring a number of classes in an application to use interfaces instead of base classes. Here's the interfaces I created so far: ICarryable implemented by all Item objects IActable implemented by all Actor objects IUseable implemented by some Item sub-classes IWieldable implemented by some Item sub-classes You can see the...

RESTful URL design for search

I'm looking for a reasonable way to represent searches as a RESTful URLs. The setup: I have two models, Cars and Garages, where Cars can be in Garages. So my urls look like: /car/xxxx xxx == car id returns car with given id /garage/yyy yyy = garage id returns garage with given id A Car can exist on its own (hence the /car), ...

Combining two interfaces into one

As I mention in an earlier question, I'm refactoring a project I'm working on. Right now, everything depends on everything else. Everything is separated into namespaces I created early on, but I don't think my method of separtion was very good. I'm trying to eliminate cases where an object depends on another object in a different namespa...

What benefits/impact will IPv6 have on application development & design?

There has been a lot of press about IPv6 and the impending switch over to IPv6 from IPv4. I have some understanding of IPv6, but I've often wondered how much impact IPv6 has on application development & design (specifically)? Are there some tangible/well known benefits IPv6 provides which we don't already have today? I know Windows Vi...

Class design: Wrapping up a datafile into a class with respect to thread-safety and testability.

I'm writing an app in C# (.net 3.5) and I have a question about class design: I'd like to create a class which accesses a file (read, write) and provides its content to the users (instanciators) of the class. The most common operation on an instance will be to retrieve a certain value from the file. The actual read and write (io) opera...

Rails x FastCGI

Should i stay out of rails if a client has a cheap hosting service with a provider that do not support mod_rails? Will rails + fast.cgi provide a good experience for a user or should I choose, in this scenario, php + my-favorite-framework as platform ? Regards, Victor ...

Architectual design patterns

I am looking for some architectual design patterns for enterprise application development. I am aware of the all of the GoF patterns, and MVC, and such things, but I am looking for patterns that emerge at a larger scope. In particular I have a somewhat larger enterprise desktop and website application, they share certain functionality, a...

Is premature optimization really the root of all evil?

A colleague of mine today committed a class called ThreadLocalFormat, which basically moved instances of Java Format classes into a thread local, since they are not thread safe and "relatively expensive" to create. I wrote a quick test and calculated that I could create 200,000 instances a second, asked him was he creating that many, to ...

What is a metaphor in the context of XP?

'Metaphor' seems to be one of the least understood precepts of XP (Extreme Programming) although its supposed to be (one of?) the most important. Its diff to grasp and supposedly 'the bulb over your head when you get it'. Metaphor seems to be a front for 'programming is a mystic art'.. the others are easy to follow relatively. I've read ...

What Java exception class to use for HTTP errors?

I am using Apache HttpClient and would like to communicate HTTP errors (400 Bad Request, 404 Not Found, 500 Server Error, etc.) via the Java exception mechanism to the calling code. Is there an exception in the Java standard library or in a widely used library that would be appropriate to use or to subclass for this purpose? The alterna...

What tools do you design software with?

Years ago, I used to use Rational Rose. It was big and bulky, and I only used a subset of the features, but it got the job done. Lately (last few years or so), I've just been sitting down with sheets of plain white paper and a pencil. I usually break out a UML cheat sheet and just iterate over the problem. What tools do people use today...

Simple C++ UML w/ reverse engineering

I need a way to build C++ code from UML diagrams and vice versa. Should be simple too hopefully. I don't mind paying too much. ...

What is the most common mistake you make while writing unit tests?

What is the one most common mistake you make while writing unit tests? Coupling? Lack of cohesion? Try to test too much functionality at once? Not testing enough functionality? Post some example code if you have an example of that mistake ...