Future proofing software - we're doing it wrong (Part 1):http://kranglefant.tumblr.com/post/131808192355/future-proof …
-
-
@ChristinGorman Btw, I never would have thought that you liked cglib. :) If you need to mock something, interfaces really are your friend. -
@haagenhasle subclassing works just as well IF you need micking at all that is :) -
@ChristinGorman I agree that every class doesn't need an interface, but don't you feel that you're jumping throught hoops to avoid them? -
@haagenhasle On the contrary, I feel it's the interfaces that are pointless hoops that can be dropped -
@ChristinGorman You put demands and restrictions on the design of the class you're testing, to be able to test it without its dependencies. -
@haagenhasle but being able to inject whatever dependencies you need is good practice anyway. -
@ChristinGorman In your gist you refactor to be able to inject the output from the dep. Is that always possible/smart? Interfaces are easy.. -
@haagenhasle But this is easier, also clearer, more isolated test. In what way would mocking be better? - 2 more replies
New conversation -
-
-
@ChristinGorman I don't love interfaces, but.. Adding a new user is also a change, and we would never do that change in code, would we? .... -
@ChristinGorman So, there is no hard line between data and code. How do we decide what is data and what is code? -
@kjerstibb For me there's a clear distinction between data and behaviour. My post is about behaviour (in apps, not libraries/frameworks) -
@ChristinGorman How about a program sending emails, with one sender. Adddess could be hardcoded, or stored as configuration. Blurry line... -
@kjerstibb if there will only ever be one sender, then the sender email address could be hardcoded without severe implications, sure -
@ChristinGorman@kjerstibb I'm thinking the same more and more. Because do you roll out configuration differently than code? -
@bjartnes exactly! You don't want anyone manually messing with important system properties in production@kjerstibb
End of conversation
New conversation -
-
-
@ChristinGorman I agree with most of what you write, but I don’t by the “don’t use interfaces”-argument. Might be worth a separate post. -
@haakoo Write a post, or you could start discussing in the comments section on my post? :)
End of conversation
New conversation -
-
-
@ChristinGorman Interfaces makes it possible to remove/avoid circular dependencies -
@haagenhasle hiding them at best. Is hiding problems good? I only have issues with interfaces thal'll only ever have 1 implementation -
@ChristinGorman You remove a compile time dep, replace it with a runtime dep. I would not call that hiding, but I guess YMMV.
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.