Skip to main content

All Questions

Filter by
Sorted by
Tagged with
3 votes
0 answers
238 views

Understanding Typescript's views on inheritance

I have been struggling to understand the reasons why typescript developers choose the way they implemented inheritance. What I would expect from any language supporting inheritance is these order of ...
Funonly's user avatar
  • 141
4 votes
2 answers
5k views

Is coupling a good thing or bad thing when I'm developing standalone modules in a framework?

Encapsulation is a mechanism of wrapping the data (variables) and code acting on the data (methods) together as a single unit. Client code is expected to inherit from system-supplied classes and then ...
Josip Ivic's user avatar
  • 1,667
2 votes
3 answers
213 views

Data duplication, can it be an unavoidable practice in this example?

Say I have different employees of type Employee stored in a list inside a class SubCase. public class SubCase{ protected ArrayList<Employee> employees; ... } SubCase represents a part ...
CedricCornelis's user avatar
2 votes
2 answers
52 views

Refactor using CTI or create new Entities

I'm currently developing on a rather large e-commerce application that handles multiple different business-fields. Like every e-commerce application we have a Concept called an Order which has one or ...
gries's user avatar
  • 239
38 votes
5 answers
9k views

When should I extend a Java Swing class?

My current understanding of Inheritance implementation is that one should only extend a class if an IS-A relation is present. If the parent class can further have more specific child types with ...
Paras's user avatar
  • 491
4 votes
1 answer
2k views

The Better Parts and Delegation: Is Crockford Too Extreme?

Douglas Crockford has recently been giving a talk called The Better Parts. The gist of the talk is that JavaScript developers should actually avoid a superset of the The Bad Parts, which now includes ...
Carl Younger's user avatar
37 votes
9 answers
11k views

Is creating subclasses for specific instances a bad practice?

Consider the following design public class Person { public virtual string Name { get; } public Person (string name) { this.Name = name; } } public class Karl : Person { ...
Ignacio Soler Garcia's user avatar
0 votes
1 answer
235 views

When is it suitable to use inheritance [duplicate]

I recently had a small "argument" about inheritance with a friend. I think people overuse it a lot. Intuition tells me that that the only good reason for class inheritance is polymorphism - when there ...
Andrzej Gis's user avatar
  • 1,023
3 votes
11 answers
2k views

OO Software Architecture - base class that everything inherits from. Bad/good idea?

I am reviewing a proposed OO software architecture that looks like this: Base Foo Something Bar SomethingElse Where Base is a static class. My immediate thought was that every object in any class ...
ale's user avatar
  • 1,062