Click here to Skip to main content
16,005,120 members
Home / Discussions / Design and Architecture
   

Design and Architecture

 
GeneralRe: general advice on starting to work with DB programming ? Pin
BillWoodruff15-Feb-15 22:25
professionalBillWoodruff15-Feb-15 22:25 
QuestionBetter language for complex GUI and input/output devices? Pin
ai_mc9-Feb-15 14:38
ai_mc9-Feb-15 14:38 
AnswerRe: Better language for complex GUI and input/output devices? Pin
Pete O'Hanlon9-Feb-15 19:54
mvePete O'Hanlon9-Feb-15 19:54 
QuestionLookups Table Design Problem Pin
Kevin Marois8-Feb-15 8:29
professionalKevin Marois8-Feb-15 8:29 
QuestionBetter language for email polling, C# or C++? Pin
Member 84569711-Feb-15 12:07
Member 84569711-Feb-15 12:07 
QuestionRe: Better language for email polling, C# or C++? Pin
Richard MacCutchan1-Feb-15 22:30
mveRichard MacCutchan1-Feb-15 22:30 
AnswerRe: Better language for email polling, C# or C++? Pin
Member 84569712-Feb-15 0:03
Member 84569712-Feb-15 0:03 
GeneralRe: Better language for email polling, C# or C++? Pin
Pete O'Hanlon2-Feb-15 0:19
mvePete O'Hanlon2-Feb-15 0:19 
GeneralRe: Better language for email polling, C# or C++? Pin
Richard MacCutchan2-Feb-15 0:31
mveRichard MacCutchan2-Feb-15 0:31 
QuestionHow do I load a UI based on a user specific role Pin
phyxian29-Jan-15 2:13
professionalphyxian29-Jan-15 2:13 
AnswerRe: How do I load a UI based on a user specific role Pin
Eddy Vluggen29-Jan-15 3:15
professionalEddy Vluggen29-Jan-15 3:15 
GeneralRe: How do I load a UI based on a user specific role Pin
phyxian29-Jan-15 14:27
professionalphyxian29-Jan-15 14:27 
GeneralRe: How do I load a UI based on a user specific role Pin
Richard MacCutchan29-Jan-15 23:02
mveRichard MacCutchan29-Jan-15 23:02 
GeneralRe: How do I load a UI based on a user specific role Pin
phyxian30-Jan-15 0:10
professionalphyxian30-Jan-15 0:10 
GeneralRe: How do I load a UI based on a user specific role Pin
Richard MacCutchan30-Jan-15 0:13
mveRichard MacCutchan30-Jan-15 0:13 
GeneralRe: How do I load a UI based on a user specific role Pin
Eddy Vluggen30-Jan-15 0:31
professionalEddy Vluggen30-Jan-15 0:31 
AnswerRe: How do I load a UI based on a user specific role Pin
BillWoodruff29-Jan-15 5:47
professionalBillWoodruff29-Jan-15 5:47 
AnswerRe: How do I load a UI based on a user specific role Pin
Mycroft Holmes30-Jan-15 13:34
professionalMycroft Holmes30-Jan-15 13:34 
AnswerRe: How do I load a UI based on a user specific role Pin
BillWoodruff31-Jan-15 18:34
professionalBillWoodruff31-Jan-15 18:34 
GeneralRe: How do I load a UI based on a user specific role Pin
CHill601-Feb-15 21:13
mveCHill601-Feb-15 21:13 
QuestionDesign question for a project in C# Pin
Malindor23-Jan-15 6:06
Malindor23-Jan-15 6:06 
AnswerRe: Design question for a project in C# Pin
Matt T Heffron23-Jan-15 14:10
professionalMatt T Heffron23-Jan-15 14:10 
Question'Interface' Considered Harmful : Uncle Bob Pin
popchecker14-Jan-15 17:48
popchecker14-Jan-15 17:48 
Hi,

In his recent blog[^] Uncle Bob come up with a situation that explains interface is harmful. Here is the code snippet taken from his blog.

Java
public class Subject {
    private List<Observer> observers = new ArrayList<>();
    private void register(Observer o) {
        observers.add(o);
    }
    private void notify() {
        for (Observer o : observers)
            o.update();
    }
}

public class MyWidget {...}

public class MyObservableWidget extends MyWidget, Subject {
    ...
}


Here he explains that to implement Observer pattern done correctly, compilers must allow multiple inheritance.

So my question is why don't the MyObservableWidget implement using dependency injection like below to avoid multiple inheritance with greater degree of separation of concerns?

Java
public class MyObservableWidget extends MyWidget {

   private Subject subject;

   public MyObservableWidget(Subject subject) {
     this.subject = subject;
   }

}


Of course the Subject class should be an abstract class. Please let me know your thoughts.

Thanks,
Pop
GeneralRe: 'Interface' Considered Harmful : Uncle Bob Pin
PIEBALDconsult14-Jan-15 17:53
mvePIEBALDconsult14-Jan-15 17:53 
GeneralRe: 'Interface' Considered Harmful : Uncle Bob Pin
popchecker14-Jan-15 18:20
popchecker14-Jan-15 18:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.