Linked Questions
10 questions linked to/from How to implement SOLID principles into an existing project
3734 votes
33 answers
2.7m views
What is the difference between public, protected, package-private and private in Java?
In Java, are there clear rules on when to use each of access modifiers, namely the default (package private), public, protected and private, while making class and interface and dealing with ...
1280 votes
37 answers
631k views
What is an example of the Liskov Substitution Principle?
I have heard that the Liskov Substitution Principle (LSP) is a fundamental principle of object oriented design. What is it and what are some examples of its use?
735 votes
24 answers
439k views
Inversion of Control vs Dependency Injection
According to the paper written by Martin Fowler, inversion of control is the principle where the control flow of a program is inverted: instead of the programmer controlling the flow of a program, the ...
595 votes
22 answers
510k views
What is the difference between association, aggregation and composition?
What is the difference between association, aggregation, and composition? Please explain in terms of implementation.
233 votes
17 answers
100k views
What is the dependency inversion principle and why is it important?
What is the dependency inversion principle and why is it important?
40 votes
8 answers
16k views
What is Protocol Oriented Programming in Swift? What added value does it bring?
From Apple's own website: "At the heart of Swift's design are two incredibly powerful ideas: protocol-oriented programming and first class value semantics." Can someone please elaborate what exactly ...
19 votes
6 answers
21k views
Swift 3: The difference between Public and Internal access modifiers? [duplicate]
I read the Apple's reference about access modifiers in Swift 3. I read also about the same on stackoverflow but I didn't get an answer as the person who asked. As I understood correctly, there are ...
2 votes
1 answer
2k views
How do I define an EventHandler in an abstract class using an event inherited from a base class?
My intent is to reuse the SelectedValueChanged event inherited from the ComboBox Class (which, in turn, inherits it from the ListControl Class) In the code below: SelectedValueChanged is tagged with ...
1 vote
1 answer
678 views
c# is it possible to change the field type of parent's class?
If i have 2 classes One for data, for example: public class Cords { public double x; public double y; } and one, that using this data: public class Geometry { public Cords() { ...
0 votes
1 answer
328 views
Log all queries to SQL Server made from single PHP script that use ODBC module?
I have 1,5k lines od PHP spaghetti code that have dozens of if's generating dozens more queries. All the conditions are simple "==" or "!=" against list of ~20 possibilities. Now I need to add 21st.....