7,881 reputation
726
bio website
location Brno, Czech Republic
age
visits member for 1 year, 10 months
seen 2 hours ago

1d
comment When is it worth NOT using a Factory?
@DonalFellows And how is that related to what I said?
1d
comment When is it worth NOT using a Factory?
@DanPantry You shouldn't take everything anyone says literary. Especially if they are from academic world.
1d
revised When is it worth NOT using a Factory?
added 167 characters in body
1d
answered When is it worth NOT using a Factory?
1d
comment When is it worth NOT using a Factory?
@DanPantry So does calling non-virtual method on instance of different class.
1d
comment how to measure team productivity over time using consistent story sizes?
Please. Don't. martinfowler.com/bliki/CannotMeasureProductivity.html
1d
answered Can I use a package visible constructor for creation?
1d
comment How another popular language would avoid having to use factory pattern while managing similar complexity as in Java/JEE?
@Doval Because the attribute is related to the Command, not to the abstraction of the command. Also imagine 10 commands each having different attribute and still retain ability to add new commands without having to change the list of all commands and their attributes. Base of each command too is an interface. It is basically just a method. But compared to simple function delegate, it has more capability, as seen with the Command. And classes with same interfaces too are interchangeable. Thats the whole point of them.
1d
comment How another popular language would avoid having to use factory pattern while managing similar complexity as in Java/JEE?
@Doval Imagine a Command that has a field. This field is set when the command is called. This allows command to "return" value to whoever created the command. By having just pure function, this is not possible. It is possible with side effect using closure, but then you need to have two functions. One for the execution and second to read the value both around same closure. So you have two functions sharing a state, which is same as class.
1d
comment How another popular language would avoid having to use factory pattern while managing similar complexity as in Java/JEE?
@Doval Can you tell me how do you return value from executed command or called strategy when you can only pass function? And if you say closures, then keep in mind it is exactly same thing as creating a class, except more explicit.
2d
comment Design Pattern: Algorithm varies according to the input arguments
Design patterns are all about extension and reusability. You need neither or at least you don't sound like you need it.
2d
comment Implementing a strategy pattern with dependency injection
@Carvefx That still doesn't make it strategy pattern.
2d
comment OO design choice and single responsibility principle
How is it tricky? Just derive your mock class from Task, pretend it is still downloading and check if StartDownload is called when you call Start on Task.
2d
answered OO design choice and single responsibility principle
2d
comment OO design choice and single responsibility principle
How is it hard to test the Task class? Also, what is that LastDownload and NextDownload on ITask?
2d
comment How do you explain agile process tool (like Scrum or Kanban) to a (traditional) project manager?
You can't. Just as "You can't teach old dog new tricks."
2d
comment How does OOP make the creation of abstraction layers easy?
I think it is primarily about memory management. In C you have to worry a lot about passing memory between layers. In Java, this worry is taken over by GC. So it doesn't have much to do with OOP.
2d
comment Implementing a strategy pattern with dependency injection
I don't see any strategy pattern in your code. The instance of strategy should be attribute of class where it is used. Having it only locally in method completely defeats the purpose.
Apr
14
answered Rich domain model and container services
Apr
13
comment The problem of dependencies management
@EngineerSpock If we assume that module B contains abstract application policy, then it is not weird that module A, which implements details of this the policy, depends on it. Because implementation details are more likely to change than abstract policy. And dependencies follow this likeness to change. That actually makes application modular, extensible and SOLID.