Questions about problem solving and planning for a solution through software design.

learn more… | top users | synonyms (1)

31
votes
6answers
6k views

Should I use Dependency Injection or static factories?

When designing a system I am often faced with the problem of having a bunch of modules (logging, database acces, etc) being used by the other modules. The question is, how do I go about providing ...
35
votes
10answers
2k views

Clarify the Single Responsibility Principle

The Single Responsibility Principle states that a class should do one and only one thing. Some cases are pretty clear cut. Others, though, are difficult because what looks like "one thing" when ...
38
votes
7answers
3k views

Can a system be 100% Data Driven?

My new boss has been working on this project for many years. I've only been here a few weeks, but I am not sure it's possible. He would like to design a system that is "100% data driven". So if we ...
19
votes
18answers
1k views

What order do you develop program layers?

I liked the question about favorite program layer: What is your favorite program layer to work on? What order do you build them in or do different team members develop corresponding parts ...
27
votes
8answers
3k views

Can manager classes be a sign of bad architecture?

Lately I've begun to think that having lots of manager classes in your design is a bad thing. The idea hasn't matured enough for me to make a compelling argument, but here's a few general points: I ...
15
votes
4answers
474 views

How can I get free artwork for my free software? [closed]

So many free software projects have beautiful art, specially websites, that I wonder where the coders meet their artists. Is there some place to ask for this besides the local art majors' schoolboard? ...
22
votes
2answers
12k views

When to use Advanced Message Queuing Protocol like RabbitMQ? [closed]

Can somebody explain me in what use-cases I should consider using AMQP like e.g. RabbitMQ? What are the pros and cons?
15
votes
3answers
717 views

How would one go about building pluggable software?

If you have an application of some sort and you want your users to be able to write plugins for it, how should the application be designed? What do you have to take into account, what design ...
11
votes
6answers
804 views

Development Approach: User Interface In or Domain Model Out?

While I've never delivered anything using Smalltalk, my brief time playing with it has definitely left its mark. The only way to describe the experience is MVC the way it was meant to be. ...
8
votes
6answers
931 views

What are the practical ways to implement the SRP?

Simply what are the practical techniques people use to check if a class violates the single responsibility principle? I know that a class should have only one reason to change, but that sentence is ...
13
votes
3answers
6k views

Is there a list of common usernames to reserve in a new system?

I need to reserve usernames in my new website. These generally fall into three categories 1) usernames no-one should have (eg: admin, user, service, help, root, etc) 2) names of super famous people ...
6
votes
4answers
1k views

How much time do you spend on design before coding? [duplicate]

In my experience, it is useful to spend a little while sketching plans for a project before getting into code. Such planning usually includes choosing frameworks/tools, writing requirements and ...
4
votes
2answers
6k views

ASP.NET MVC 3 (C#) Software Architecture

I am starting on a relatively large and ambitious ASP.NET MVC 3 project and just thinking about the best way to organize my code. The project is basically going to be a general management system that ...
14
votes
6answers
2k views

Loose Coupling in Object Oriented Design

I am trying to learn GRASP and I found this explained (here on page 3) about Low Coupling and I was very surprised when I found this: Consider the method addTrack for an Album class, two possible ...
13
votes
5answers
8k views

Design documents as part of Agile

At my workplace, we face a challenge in that "agile" too often has meant "vague requirements, bad acceptance criteria, good luck!" We're trying to address that, as a general improvement effort. So, ...
12
votes
3answers
692 views

Is reliance on parametrized queries the only way to protect against SQL injection?

All I have seen on SQL injection attacks seems to suggest that parametrized queries, particularly ones in stored procedures, are the only way to protect against such attacks. While I was working (back ...
25
votes
7answers
2k views

Are classes with only a single method a problem?

I am currently working on a software project that performs compression and indexing on video surveillance footage. The compression works by splitting background and foreground objects, then saving the ...
10
votes
3answers
775 views

Dependency Inversion Principle: How to define “high-level policy” and “low-level detail” to other people?

I am trying to explain the dependency inversion principle to my (mostly junior) colleagues. How can we define which one is the "high-level policy" and which one is the "low-level detail" in a ...
6
votes
3answers
541 views

How can I get better at explaining complex software processes to developers?

I'm really struggling with my software specs. I am not a professional programmer but enjoy doing it for fun and made some software that I want to sell later but I'm not happy with the code quality. ...
6
votes
3answers
553 views

Why it is not recommended to have set-only property?

Today at work one of my colleague reviewed my code, and suggested me to remove set-only property and use method insted. As we both were busy with other stuffs, he told me to look at Property Design ...
19
votes
3answers
13k views

Which is a better practice - helper methods as instance or static?

This question is subjective but I was just curious how most programmers approach this. The sample below is in pseudo-C# but this should apply to Java, C++, and other OOP languages as well. Anyway, ...
12
votes
7answers
845 views

Should a design document contain a discussion of the pros/cons to a given design or should it focus on facts and rationale?

I'm currently in the process of updating a design document so that it is correct and up-to-date for future developers. Currently, the document focuses on only the facts, presenting how the design is. ...
11
votes
5answers
551 views

Is it reasonable to expect knowing the whole stack bottom up?

I am an Sr. developer/architect/Product Manager for embedded systems. The systems that I have had experience with have typically been small to medium size codebases - typically close to 25-30K LOC in ...
8
votes
8answers
455 views

Refactoring or upgrading databases to handle new features

Several responses to a database schema question, suggested an additional table to normalize a database for a feature that is not part of the current requirements (A UserDepartment table to allow for a ...
8
votes
10answers
891 views

What should be first - functionality or design? [duplicate]

I've started reading a book from Head First series about OOP and Design. In a first chapter it is stated I have to worry about design of my application just after basic functionality is ready. Basic ...
6
votes
6answers
2k views

How does rapid prototyping fit into an agile methodology?

I work for a large company, which dictates the use of agile processes. For example, for our projects, we use cloud-based services that are specifically targeted at managing agile development. The ...
6
votes
3answers
866 views

Avoid having an initialization method

I have this existing code where they have a class and an initialization method in that class. It is expected that once the object of the class is created, they need to call initialize on it. Reason ...
2
votes
1answer
247 views

How should object identification be managed?

I have a java/swing application in (hopefully good) MVC structure. Here is a overview of my model classes: One or more workers may work at one working location and one worker may work at different ...
11
votes
3answers
16k views

Best way to unit test methods that call other methods inside same class

I was recently discussing with some friends which of the following 2 methods is best to stub return results or calls to methods inside same class from methods inside same class. This is a very ...
8
votes
5answers
453 views

Reengineering the project from scratch [duplicate]

Possible Duplicate: When do you rebuild an application or keep on fixing the existing one I am currently working on a project that has been in development for the last few years used ...
7
votes
5answers
1k views

Abstract DAL - Use Interface with Internal Class?

We have a business logic layer (BLL) that is tightly coupled to our data access layer (DAL). We make calls like this: using (FooData data = new FooData()) { data.DoSomething(); } It's important ...
6
votes
6answers
2k views

Can the Strategy pattern be implemented without significant branching?

The Strategy pattern works well to avoid huge if...else constructs and make it easier to add or replace functionality. However, it still leaves one flaw in my opinion. It seems like in every ...
5
votes
1answer
495 views

Design For Asynchronous User Interface

I have been working on a integration that has posed an interesting user interface conundrum that I would like suggestions for. The user interface is displayed within a third party product. The state ...
4
votes
3answers
605 views

What should I name these methods?

I have two interfaces, one with and one without generic type parameters. The non-generic interface is used internally so that I can store instances of the generic interface in a collection. All would ...
3
votes
5answers
522 views

Proper OO design for State and Command

I'm working (a bit) on a (turn-based strategy) game. There are two classes relevant for the question: State: This is an immutable class, which exposes all its fields (either via getters or another ...
2
votes
1answer
349 views

Should we create classes just to group properties

I am designing a bit of software that will integrate with our enterprise system using web services. We are dealing with work orders that are needed to maintain equipment. We have a bit of a ...
2
votes
1answer
960 views

Recovering an anemic domain model into a multitier architecture

I have spent the past several days learning about domain driven design and attempting to apply it to a current project. I decomposed the problem domain into the canonical logical components: domain, ...
2
votes
1answer
209 views

Would you choose a database or a dvcs as storage for a documentation wiki?

I'm about to start coding a documentation oriented wiki, as a pet project. The core features are: Extremely easy grouping of documents per version Markdown syntax (subset of) Multiple authors ...
1
vote
1answer
849 views

How to design a log() method that can easily be accessed from the outside of the Console class?

Recently my team has programmed a custom developer console in a video game which can easily be hidden or displayed, because it's more comfortable and less of a hassle. The Console class contains a ...
0
votes
2answers
765 views

Designing an administrator area in my CMS

I am trying to create a small CMS with ASP.NET MVC3, but I got confused in designing the administrator section. I decided to create two areas, one for users and another for admin. In my CMS I have a ...
35
votes
14answers
12k views

Isn't MVC anti OOP?

The main idea behind OOP is to unify data and behavior in a single entity - the object. In procedural programming there is data and separately algorithms modifying the data. In the ...
8
votes
3answers
11k views

PHP web application architecture/design [closed]

I've been thrown head-first into a new job developing web applications in PHP. I'm by no means new to PHP, but I haven't developed large-scale applications before. I'm wondering how to structure my ...
36
votes
19answers
4k views

Overused or abused programming techniques [closed]

Are there any techniques in programming that you find to be overused (I.E. used way more excessively than what they should be) or abused, or used a bit for everything, while not being a really good ...
30
votes
8answers
2k views

S.O.L.I.D., avoiding anemic domains, dependency injection?

Although this could be a programming language agnostic question, I'm interested in answers targeting the .NET ecosystem. This is the scenario: suppose we need to develop a simple console application ...
23
votes
9answers
2k views

How do you organize highly customized software?

I'm working on a large software project which is highly customized for various customers arround the world. This means that we have maybe 80% code which is common between the various customers, but ...
21
votes
8answers
3k views

Decoupling classes from the user interface

What is the best practice when it comes to writing classes that might have to know about the user interface. Wouldn't a class knowing how to draw itself break some best practices since it depends on ...
48
votes
4answers
10k views

What is inversion of control, and when should I use it?

I am designing a new system and I want to know what inversion of control (IOC) is, and more importantly, when to use it. Does it have to be implemented with interfaces or can be done with classes?
17
votes
8answers
5k views

What is the best way to design a web site to be highly scalable?

For websites that need to be highly scalable, such as social networks like facebook, what's the best way to design the website? Should I have a web service which the site queries to get data that it ...
13
votes
5answers
13k views

Fastest way to document software architecture and design [closed]

We are a small team of 5 developers and I'm looking for some great advices about how to document the software architecture and design. I'm going for the sweet spot, where the time invested pays off. I ...
20
votes
6answers
4k views

Front end first or Back end first. Of the two which is a Good system design pratice?

I have a client right now requiring me to develop a school enrollment system. Now this is the first time im having this kind of challenge. Most of the past software that i created are not that ...