Use decorator and factory together to extend objects?
I’m new to OOP and design pattern.
Representing complex object dependencies
I have several classes with a reasonably complex (but acyclic) dependency graph. All the dependencies are of the form: class X
instance contains an attribute of class Y
. All such attributes are set during initialization and never changed again.
OOD: All classes at bottom of hierarchy contain the same field
I am creating a class diagram for what I thought was a fairly simple problem. However, when I get to the bottom of the hierarchy, all of the classes only contain one field and it is the same one.
How to design a scalable notification system? [closed]
What services are being used to send messages?
Depends, some are classical REST webservice, other are some exotic protocol, it is really up to the provider.
Override methods should call base method?
I’m just running NDepend against some code that I have written and one of the warnings is Overrides of Method() should call base.Method()
.
Liskov substitution and abstract classes / strategy pattern
I’m trying to follow LSP in practical programming. And I wonder if different constructors of subclasses violate it. It would be great to hear an explanation instead of just yes/no. Thanks much!
Inheritance from the objects themselves
Making new inheritance hierarchy with the help of C++ I think about:
What are abstract classes and abstract methods?
I got several explanations but so far I’m not able to understand that what are the abstract classes and methods in Java.
Some said it has to do something with the security of the program, other said it isn’t anything like that.
Even from the Dietel & Dietel’s book I don’t get it’s purpose.
When, where and why do we use it?
Architecture Best Practice (MVC): Repository Returns Object & Object Member Accessed Directly or Repository Returns Object Member
Architecturally speaking, which is the preferable approach (and why)?
Good implementation strategies for encapsulating shared data in a software pipeline
I’m working on re-factoring certain aspects of an existing web service. The way the service APIs are implemented is by having a kind of “processing pipeline”, where there are tasks that are performed in sequence. Unsurprisingly, later tasks may need information computed by earlier tasks, and currently the way this is done is by adding fields to a “pipeline state” class.