design

JS - Advice on how to merge multiple user input to one form field design

I have a page that allows users to enter a lot of information about them (metadata) they can then click on a icon which opens a modal window containing a googlemap which allows them to add locations, and a title for that location. Using mootools I can pass the value of a form field back to the original form, using onclose. The main page...

ASP.NET Web Site + Windows Forms App + WCF Service: Client Credentials

Let's say that I'm considering designing a WCF service whose primary purpose is to provide broad services that can be used by three disparate applications: a public-facing Web site, an internal Windows Forms application, and a wireless mobile device. The purpose of the service is twofold: (1) to consolidate code related to business proce...

What are the tell-tale signs of bad object oriented design?

When designing a new system or getting your head around someone else's code, what are some tell tale signs that something has gone wrong in the design phase? Are there clues to look for on class diagrams and inheritance hierarchies or even in the code itself that just scream for a design overhaul, particularly early in a project? ...

How do I design backing data types for a databound WPF dialog with Ok/Cancel buttons?

I've created a table in Microsoft Sql CE that I'm using to hold some data. I've generated an ORM via SqlMetal and I've pulled the datasource into my WPF project. I want to create a simple WPF form that can be used to edit a record in the table via the ORM-generated classes. I want this form to support typical OK/Cancel semantics. I'v...

What are some blogs that discuss smart software design?

I read plenty of blogs on coding, but don't know many that focus on making good design decisions. I mean things a product/program manager would do, like: Coming up with creative solutions to design problems Creating good usability/user experience (e.g. Usability Post, http://www.usabilitypost.com/) Designing scalable, extensible, futur...

Update the values in the database directly or delete - add them again

Whenever we have to update the database; we delete the values from the table first and then add the latest values. This ensures that everything is updated correctly. This adds little bit overhead to the system but we haven't faced any performance issues because of this. Is this always the best thing to do? ...

Domain Logic and Data Access of MVC at Remote API/Web Service Layer

Hi all, In our system, we have a Remote API layer (e.g. SOAP, XML-RPC, REST, etc.) to handle the domain logic and data access for web application and any client applications that're developed on top of it. Unlike in the past, I do not have business logic code and DB connectivity at the web application, all user actions are translated to...

Should Programmers be Designers?

With the advent of the web, most software is now geared towards that. But as a software developer, do I need to become better in the art of Visual Design (by practice or through classes)? Or should I make it clear in contracts and other jobs that my work is not about design? Maybe I should just put a much larger chunk of my project in th...

Best practices for wrapping an external library

Our code base uses several external libraries, in order to save time and focus on developing important features instead of reinventing the wheel. Currently the code is littered with direct usage of the libraries. This means that switching to other libraries that have more-or-less the same features will mean rewriting almost everything f...

Are there any situations where a side effect on a "get" or "calculate" operation is legitimate?

I've just finished a six hour debugging session for a weird UI effect where I found that my favorite framework's implementation of an interface function called "getVisibleRegion" disabled some UI feature (and apparently forgot to restore it). I've filed a bug with the framework, but this made me think about proper design: under what co...

ASP.NET MVC Index vs. Index and List views

I'm developing my first ASP.NET MVC application. This application tracks events, users, donors, etc. for a charitable organization. In my events controller I support standard CRUD operations with New/Edit/Show views (delete is done via a button on Show view). But I also want to list all of the events. Is it better to have a List vie...

Organizing pictures (or any files)

This is a bit of a stretch, but I have an interesting (to me) programming (err... scripting? algorithmic? organizational?) problem. (I am tagging this in Ruby, because of my preference for Ruby for scripting.) Imagine you have 100 gigabytes of pictures floating around on multiple drives. There are likely a total of 25 gigabytes of uniqu...

Book Recommendation for Winforms Design & Programming

I'm looking for a book or a good resource about the following subjects : Best Practices on Windows Forms design (such best way to design GUIs -using anchors-, using default fonts, avoiding changing colours etc.) Advice about common GUI pitfalls (usability, accessibility, compatibility) Basically I've got a WinForms application and I...

How do I track a repeating calendar event in C# / SQL Server?

I'd like to display a repeating event on a date/time display in an app. This date time display can take the form of a calendar, but it could also just be a list of upcoming events. What is the best way to handle tracking this event that can repeat? For example: Should the event be stored once in the database and projected out / r...

Design Pattern for Components that depend on each other

We are building a "configurator" application for conveyors. Basically user comes in and picks a model, then start picking the parts they want. Some components have dependencies on other components. E.g. if I pick Part A, then I am required to select 1 or more Part B's. It is somewhat similar to configuring a PC at Dell.com. The app will ...

How would you refactor this conditional to use polymorphism?

I just finished watching the Google clean code video on YouTube (see link, first article) about removing if statements from your code and using polymorphism instead. After watching the video I had a look at some code that I was writing before watching the video and noticed some places where I could use this method, mainly places where...

Maintaining referential integrity

Given the schema: MACHINE_TYPE { machine_type } MACHINE { machine, machine_type } SORT_PLAN { sort_plan, machine_type } SCHEDULE { day_of_week, machine, sort_plan } and the business rule: A sort plan can be assigned to any machine of the same machine_type. How do I enforce that, in SCHEDULE, the tuples referenced by machine a...

Lifespan of Software: How often do you expect to do start from scratch?

I've heard people say that the average lifespan of software is about 3 years, but that seems shockingly low to me. I don't buy it. After all, some of my clients have lumbering mainframes that have been around for 20 years, and they're so entrenched that they might live forever. I personally tend to start talking about severe refactori...

Database data upload design question

I'm looking for some design help here. I'm doing work for a client that requires me to store data about their tens of thousands of employees. The data is being given to me in Excel spreadsheets, one for each city/country in which they have offices. I have a database that contains a spreadsheets table and a data table. The data tabl...

What is domain logic?

What is domain logic? The Wikipedia page for domain logic redirects to business logic. Are they the same thing, and, if not, how do they differ? ...