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

learn more… | top users | synonyms (1)

4
votes
4answers
298 views

Should single purpose utility app use a class

When writing a small utility app, that does just one thing, should that one thing be encapsulated in a seperate class, or just let it be part of whatever class/module is used to start the application? ...
3
votes
2answers
468 views

Semantic coupling vs. large class

I have hardware I communicate with via TCP. This hardware accepts ~40 different commands/requests with about 20 different responses. I've created a HardwareProxy class which has a TcpClient to send ...
1
vote
3answers
6k views

Has anyone used “Design Pattern Framework (TM)”? [closed]

Has anyone purchased Design Pattern FrameworkTM? Are these samples worth investment? Are they practical? What are the pro and cons of the guidelines? Anyone used this in the real-world development?
12
votes
2answers
649 views

“Do it right, against customer's wishes” - how is it called? [closed]

We know the optimal situation of negotiating corrections of specifications with the customer, getting the specs to do what the client wanted, not what they said or thought they wanted. That's ...
10
votes
4answers
1k views

Should we rename overloaded methods?

Assume an interface containing these methods : Car find(long id); List<Car> find(String model); Is it better to rename them like this? Car findById(long id); List findByModel(String model)...
4
votes
3answers
959 views

How bad is it to have two methods with the same name but different signatures in two classes?

I have a design problem related to a public interface, the names of methods, and the understanding of my API and code. I have two classes like this: class A: ... function collision(self): ...
18
votes
4answers
2k views

Why many designs ignore normalization in RDBMS?

I got to see many designs that normalization wasn't the first consideration in decision making phase. In many cases those designs included more than 30 columns, and the main approach was "to put ...
5
votes
1answer
5k views

Functional/nonfunctional requirements VS design ideas

Problem domain Functional requirements defines what a system does. Non-Functional requirements defines quality attributes of what the system does as a whole.(performance, security, reliability, ...
6
votes
3answers
15k views

Browser-based GUI for a python application [closed]

I want to create a web/browser-based GUI for a command-line python application. The goal is to make use of HTML/JS technologies to create this GUI. As the application itself, it needs to run on Linux ...
4
votes
5answers
596 views

Requring static class setter to be called before constructor, bad design?

I have a class, say Foo, and every instance of Foo will need and contain the same List object, myList. Since every class instance will share the same List Object, I thought it would be good to make ...
2
votes
1answer
302 views

Data Transformation Pipeline

I have create some kind of data pipeline to transform coordinate data into more useful information. Here is the shell of pipeline: public class PositionPipeline { protected List<...
0
votes
1answer
246 views

The balance between client and server functionality

I want to bring the discussion that started in our teams and get your opinion about it. Assume we have an user account which could have different credentials for authentication and associated email ...
5
votes
2answers
646 views

Buzzword for “performance-aware” software development [closed]

There seems to be an overabundance of buzzwords for software development styles and methodologies: Agile development, extreme programming, test-driven development, etc... well, is there any sort of ...
13
votes
5answers
23k 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 ...
5
votes
4answers
238 views

Get Info From Database, or Build Inferred Info?

Does it make more sense to store and retrieve properties or information directly related to an item in a database, or, say in such a case that a product's ID could describe information about it, ...
0
votes
2answers
191 views

Subclassing to avoid line length

The standard line length of code is 80 characters per line. This is accepted and followed by the most of programmers. I working on a state machine of a character and is necessary for me follow this ...
4
votes
2answers
409 views

Permissions and MVC

I’m in the progress of developing a web application. This web application is mostly a CRUD interface, although some users are only allowed to perform some actions and see only some parts of views. ...
0
votes
4answers
3k views

What is the difference between WCF service and a simple Web service in developing using .NET Framework?

My questions are: What is the difference between WCF service and a simple Web service in .NET Framework? What a WCF Service can do which a .NET Web service cant? In other words, what are the ...
5
votes
4answers
1k views

How do I decide to which class a method should belong

I have TopicBusiness.class and PostBusiness.class. I have no problem with deciding into which class methods such as addPostToDatabase() or getAllPostsFromDatabase() should go. But what about ...
2
votes
2answers
122 views

Designing a user-defined list to be stored in a relational database - Should I include user index?

By index, I mean, as the user creates the list, each item receives an integer index for its place in that particular list. Since there will be a table of ListItems, I'd prefer to avoid using the name ...
2
votes
5answers
167 views

Designing a single look up entity

In almost every application you have this look up entity that provides a dynamic references. This are things like type, category, etc. These entities will always have id, name, desc So at first I ...
2
votes
4answers
271 views

How to handle status columns in designing tables

How to handle multiple statuses for a table entry, for example an item table may have an active, inactive, fast moving, and/or batch statuses. And I wanted to handle them in single column with VARCHAR ...
10
votes
4answers
11k views

The term “interface” in C++

Java makes a clear distinction between class and interface. (I believe C# does also, but I have no experience with it). When writing C++ however there is no language enforced distinction between class ...
1
vote
2answers
671 views

Should I close database connections after use in PHP?

I wonder if I should close any unnecessary database connection inside of my PHP scripts. I am aware of the fact that database connections are closed implicitly when the block stops executing and '...
0
votes
0answers
23 views

Rails: The Law of Demeter [duplicate]

I am reading a book called Rails AntiPatterns and they talk about using delegation to to avoid breaking the Law of Demeter. Here is their prime example: They believe that calling something like this ...
1
vote
1answer
672 views

Applying DDD principles in a RESTish web service

I am developing an RESTish web service. I think I got the idea of the difference between aggregation and composition. Aggregation does not enforce lifecycle/scope on the objects it references. ...
6
votes
2answers
685 views

Is programming in layers real? [duplicate]

I am fairly new in product development and I am trying to work over a product. The problem that I have realized is that people draw diagrams and charts showing different modules and layers. But as I ...
12
votes
4answers
1k views

Rails: Law of Demeter Confusion

I am reading a book called Rails AntiPatterns and they talk about using delegation to to avoid breaking the Law of Demeter. Here is their prime example: They believe that calling something like this ...
1
vote
1answer
450 views

clone/copy constructor and child class

I just want feedback on what one considers 'most elegant design' for a situation like this. I have an object that is immutable with some (sort of) copy constructors to allow creating a similar but ...
2
votes
1answer
698 views

Rails: Useful example of delegate and Law of Demeter

I am currently learning about delegate and the Law of Demeter. I understand the Law of Demeter, but I can't seem to find a good example of where using delegate to avoid breaking the law would actually ...
10
votes
3answers
1k views

Why was Android's ContentProvider created?

The title sums up my question, but to elaborate basically what I want to understand is why the Android designers want apps that need to work with shared data to use a Content Provider rather than just ...
2
votes
2answers
4k views

business logic: client-side vs. server side

Let's say 3-5 years ago (more or less) n-tier application on the server side - and some javascript/html/CSS for the UI was a basic approach for web development. Nowadays we can see that traditional ...
2
votes
1answer
375 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 ...
3
votes
3answers
692 views

Is it bad practice to check object types with an identifying member variable?

Preamble: I am making a simple board game in C++, in which AI characters move around squares on the board. There are different types of squares, each inherited from an abstract class, each with ...
4
votes
1answer
26k views

Why would one prefer C# (ASP.NET MVC) or Java (JSP) instead of PHP for web applications/projects [closed]

I'm wondering, why would one (consider it not just a single developer, but a company) prefer C# or Java for web applications? What's their considerations regarding the question. I mean, a company, has ...
7
votes
2answers
622 views

Module system for OOP language

I'm designing a simple OO programming language. It's statically typed, compiled, and executed by a VM - similar to Java. The difference is that I don't want to have such a strong emphasis on OOP. ...
0
votes
1answer
141 views

In an optimal software design, would you ever need to throw InvalidOperationException?

.NET defines the InvalidOperationException as The exception that is thrown when a method call is invalid for the object's current state. In an optimal software design, would it ever make sense ...
0
votes
1answer
123 views

Choosing which application instance will do the updates when dealing with multiple workstations w/o server involved?

So, I've got an interesting design problem and I honestly don't know how to tackle this. I have an application that will be ran on a dozen of workstations. Of those workstations, it is impossible to ...
0
votes
2answers
583 views

How to design (just the outline) an enterprise class PHP application

For the last year or so, I have been working on a very large application. I am currently on version 17 of it, and every time, I start over with some of the code from before. But now, this is starting ...
4
votes
2answers
702 views

How much logic can be put into an object-pooling factory class before it does more harm than good?

The main language I'm interested in doing object pooling in is AS3, which is known to need it in many cases. In the past I've always made a brand new factory class for every type I was going to try ...
0
votes
1answer
166 views

Keywords for defining constructs in programming languages

I'm designing a language conceptually similar to Go. In Go, for example, the keyword func is used for defining functions: func abs (a int) uint { ... } Same for defining types. However, I was ...
2
votes
2answers
305 views

Graph to show decreasing desirability when taking shortcuts

I'm responsible for creating a presentation to management that details how a system should be refactored or rewritten. We have an existing system that has had production failures and the code base is ...
2
votes
2answers
389 views

How does aggregation work when databases are involved?

So I'm reading a book on Design Patterns (Design Patterns Explained 2nd Edition), and all throughout the book it says to "favor aggregation over inheritance". I'm trying to wrap my head around trying ...
0
votes
1answer
1k views

C# Design for SQL connection and commands

Currently I'm working on system that works with database, and I would like to have it done elegant way. So I have abstracted DBConnection into one class, DBCommands into another class. (DBCommands : ...
2
votes
5answers
580 views

software architecture (OO design) refresher course [closed]

I am lead developer and team lead in a small RAD team. Deadlines are tight and we have to release often, which we do, and this is what keep the business happy. While we (the development team) are ...
1
vote
3answers
488 views

Program design with multiple data sets, algorithms and results

I have a question regarding the design of my software. There are four different data sets and three consecutive algorithms operating on the data sets and on the results from the previous algorithm ...
2
votes
5answers
232 views

Method parameter takes object from it's own class?

I'm not absolutely sure if this is the right place for this question. But I guess StackOverflow won't be the right place. Is it for any reason a bad way to pass an object to a method from the same ...
3
votes
2answers
467 views

How relevant are “Requests per second” benchmarks?

Whenever a new framework is released it is a given that someone somewhere will benchmark it against other available solutions. One interesting benchmark is the "Requests per second" benchmark. For ...
4
votes
7answers
2k views

Is it a bad idea to create a class which will only have one instance?

Is it bad coding practice/design to make a class which will only be instantiated once? I have some variables and functions that can be grouped together under a class to "look good" (for a lack of a ...
1
vote
4answers
256 views

how to create a data model for the following problem

How to tackle 2-D and 3-D space in data ? lets say you are working on a power grid problem. You need to represent Towers; transmission lines; transformers and every thing else in a 2-D space. How ...