Questions tagged [design-decisions]

general tips and guidelines for designing better applications, regarding APIs, Architecture and internal structures.

93 questions
6
votes
2 answers

How to go about creating a prolog program that can work backwards to determine steps needed to reach a goal

I'm not sure what exactly I'm trying to ask. I want to be able to make some code that can easily take an initial and final state and some rules, and determine paths/choices to get there. So think, for example, in a game like Starcraft. To build a…
Ciph3rzer0
  • 567
  • 2
  • 4
  • 15
6
votes
1 answer

Why was "immediate" attribute added to the EditableValueHolders?

Initially immediate flag was only intended for ActionSource interface. But later on it was added to the EditableValueHolder interface also. What was the reason for design decision ?
Geek
  • 26,489
  • 43
  • 149
  • 227
5
votes
2 answers

Why is CompareTo on short implemented this way?

Consider the following code: namespace ConsoleApplication1 { class Program { static void Main(string[] args) { Console.WriteLine(100.CompareTo(200)); // prints -1 …
sloth
  • 99,095
  • 21
  • 171
  • 219
5
votes
1 answer

Web vs Desktop Development (Online vs. Smart-Client)

I work at a company with a large SAP investment, and we also have dozens of large .Net systems (mostly internally for engineering systems), and Java platforms (mostly for external web applications). As such, we have large development shops on ABAP,…
Kaiser Advisor
  • 1,446
  • 2
  • 16
  • 26
5
votes
6 answers

How to decide on WebForms vs ASP.NET MVC 3 for new project?

Possible Duplicate: MVC versus WebForms ASP.NET MVC Performance I'll be starting a new web project in the coming weeks. It's a public facing web site for a somewhat famous person. I have 2 choices: use good-old ASP.NET 4 or new ASP.NET MVC 3 with…
Sahat Yalkabov
  • 32,654
  • 43
  • 110
  • 175
5
votes
3 answers

Why isn't the Type class in the System.Reflection namespace?

Everything about Type is reflective in nature. Is it because Type is used more often than the rest of the classes in System.Reflection? Or because it functions more like a system class than a reflection class? In short, I've always wondered what the…
Joe
  • 16,328
  • 12
  • 61
  • 75
4
votes
5 answers

What should I do with an object that should no longer be used in Perl?

I am writing a class that is linked to an external resource. One of the methods is a delete method that destroys the external resource. No further method calls should be made on that object. I was thinking of setting a flag and die'ing inside of…
Chas. Owens
  • 64,182
  • 22
  • 135
  • 226
4
votes
4 answers

Use Django User-Model or create a own Model?

I'm currently designing a Django based site. For simplicity lets assume that it is a simple community site where users can log in and write messages to other users. My current choice is wether to use the buildin User-Model or to build something my…
Martin Thurau
  • 7,564
  • 7
  • 43
  • 80
4
votes
4 answers

Design decision - What is the use/advantage of separate RandomNumberGeneratorHolder class in Math.java?

So I was going through the Math.java source code and I found that there is a holder class created to hold the randomNumberGenerator static variable. Here is the relevant piece of code. public final class Math { // other methods. public static…
Hardik Modha
  • 12,098
  • 3
  • 36
  • 40
4
votes
1 answer

Sphinx for writing "parallel text"

Problem: I am trying to write "parallel text" using reStructuredText. By "parallel text", I mean something like annotated works of fiction, where the text is in two columns. The left column contains the main text, and the right column contains…
Alok Singhal
  • 93,253
  • 21
  • 125
  • 158
4
votes
1 answer

Why does ContinueWith pass the Task as the parameter

I have a Task t1. I want to run another Task t2 after t1 completes. I choose to use the .ContinueWith method of t1. void ThenFrob(Task t1) { t1.ContinueWith(frobber => frobber.Frob()) } Except, I cannot do this, because the Action…
psaxton
  • 1,693
  • 19
  • 24
4
votes
2 answers

Efficiently pass notifications between decoupled design layers

I am upgrading a design where data was lightly coupled with the UI: class Object { UI * ui; }; class UI { Object * object; }; It was fairly straightforward to push update notifications to the ui through the UI pointer, but new…
dtech
  • 47,916
  • 17
  • 112
  • 190
4
votes
7 answers

Best way to implement plugin framework - are DLLs the only way (C/C++ project)?

Introduction: I am currently developing a document classifier software in C/C++ and I will be using Naive-Bayesian model for classification. But I wanted the users to use any algorithm that they want(or I want in the future), hence I went to…
Microkernel
  • 1,347
  • 4
  • 17
  • 38
3
votes
2 answers

Hosting multiple sites via rails - Should I use one rails instance, or many?

I am building a rails app that will host multiple archery league websites. Lets call it myarchery.com, and say I have 2 sites: billsleague.myarchery.com and jimsleague.myarchery.com. Now when I build this I can either: Have one rails app serve up…
Mike Vormwald
  • 2,280
  • 22
  • 29
3
votes
5 answers

Why does WPF use attached properties for things like positioning in a grid?

Why do we need "attached properties"? The concept of it bugs me a bit, since you can conceivably set values of properties that don't even exist on a particular DependencyObject (and they will just be silently ignored). It almost seems like a…
J Cooper
  • 16,891
  • 12
  • 65
  • 110