All Questions
7 questions
3
votes
4
answers
780
views
Is it a bad practice to have an interface method to tell whether it can handle an object?
interface Resolver {
boolean canResolve(SomeInput input);
SomeOutput resolve(SomeInput input);
}
public static void main(String[] args) {
List<Resolver> resolvers = ...;
...
-1
votes
1
answer
241
views
How to avoid cyclic dependency in UI application
I'm developing an UI application where I ran into an issue with a cyclic dependency. Here is the simplified code, to explain the problem.
#include <list>
class UiStyle;
UiStyle* CreateStyle();
...
-1
votes
3
answers
226
views
Difference between update a property and fire an event
It seems to me that update a property is always an 'event' and that all you can do with an event handler can be done in the property let/set routine.
And, in my limited experience, I never needed to ...
4
votes
1
answer
1k
views
How to implement a facade correctly
I have read multiple websites on this topic but none of them gave me a 'good' solution for the problem I am having. The problem is described in the following (related) questions:
How do I couple the ...
1
vote
1
answer
53
views
Filtering additions to a list
Hopefully Iʼm posting this in the right SX, and Iʼve tagged it correctly.
I have a legacy system that Iʼm making additions to which contains a custom list object.
This list object can contain two ...
1
vote
1
answer
333
views
Creating Set Subclasses or Allowing Outside Configuration
I have a TriggerCaller and a TriggerAction class. The Caller "calls" the do() method on the action, which is set with the TriggerCallers setAction() method. The rest of the program should deal with ...
8
votes
10
answers
3k
views
What should be first - functionality or design? [duplicate]
I've started reading a book from Head First series about OOP and Design. In a first chapter it is stated I have to worry about design of my application just after basic functionality is ready.
Basic ...