The tag has no wiki summary.

learn more… | top users | synonyms

4
votes
1answer
567 views

Model independency in MVC and most efficient way to do method calls

TLDR: Are models supposed to be application-dependant and totally worthless when starting a new application, or are you supposed to design models independently so that they act as stand-alone ...
6
votes
3answers
231 views

How to design a system that allows for multiple parallel extensions of the same “component”?

As a player, I found the following problems about creating and using "extensions" (aka mods) for games: 1) Whenever the game is updated, all the mods break. 2) Most mods don't work with each ...
5
votes
2answers
499 views

Is it possible to refactor inheritance to composition when virtual methods are called inside the base class?

Let's say I have a class called Country and two subclasses called AI and Player. The Country class has a number of virtual methods to allow player-specific or AI-specific behavior. I want to make it ...
9
votes
5answers
1k views

How do we know to favour composition over generalisation is always the right choice?

Whether an object physically exists or not, we can choose to model it in different ways. We could arbitarily use generalisation or composition in many cases. However, the GoF principle of "favour ...
89
votes
14answers
24k views

Where does this concept of “favor composition over inheritance” come from?

In the last few months, the mantra "favor composition over inheritance" seems to have sprung up out of nowhere and become almost some sort of meme within the programming community. And every time I ...
2
votes
4answers
374 views

“Imprinting” as a language feature?

Idea I had this idea for a language feature that I think would be useful, does anyone know of a language that implements something like this? The idea is that besides inheritance a class can also ...
5
votes
1answer
436 views

Architectural Composition Languages

Recently stumbled upon this paper (PDF) talking about ACLs, or Architectural Composition Languages. They're a fusion of two earlier lines of research: Architectural Definition Languages (such as UML) ...
0
votes
5answers
2k views

Why does the use of interface-based programming appear to be limited to behaviour?

I have been doing a little thinking about inheritance vs. realization vs. composition. I am not about to post the whole detail here. So I was wondering, when we are not talking about creating ...
12
votes
9answers
1k views

Should a developer know the inner workings of the computers' hardware? [closed]

I'm not talking just how memory is assigned and memory management (things that you can learn from C for example) but rather the hardware aspect and how each component of the computer hardware works ...
11
votes
6answers
329 views

How do I get a feeling for visual design as a programmer?

Over the last years of web programming, I've noticed how bad I am at designing things. I have substantial knowledge of HTML and CSS, I can make a website look like I want it to, I have some pretty ...
37
votes
9answers
5k views

Code Smell: Inheritance Abuse [duplicate]

It's been generally accepted in the OO community that one should "favor composition over inheritance". On the other hand, inheritance does provide both polymorphism and a straightforward, terse way of ...