Skip to main content

All 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 = ...; ...
Martin Tarjányi's user avatar
-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(); ...
mooko's user avatar
  • 33
-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 ...
DT1's user avatar
  • 209
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 ...
Faas's user avatar
  • 59
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 ...
Greg's user avatar
  • 111
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 ...
sinθ's user avatar
  • 1,311
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 ...
Eugene's user avatar
  • 698