Reputation: 120771
Assume two different scenarios:
X
and exactly one implemntation XImpl
. Every other (service) class (for example YImpl
) always interacts with other (service) classes through there interface (X
), but never directly refer to the implementation class (XImpl
) -- This is at least a very common pattern.XImpl
and YImpl
it refers directly to YImpl
.(I guess I know a lot of the purposes of a)
and b)
, so please do not discuss that here.)
My Question is: Does variant b) has a negative performance effect when working with Eclipse, Maven and M2E 1.0?
I can imagine this, because I you have way a)
and you editing something in XImpl
it does not effect YImpl
because they are completely decoupled by interface X
. But when removing the interfaces in b)
so they are not longer decoupled.
Upvotes: 0
Views: 93
Reputation: 691685
You don't want to sacrifice the design of your application to gain 2 micro-seconds each time Eclipse or Maven compiles your classes. BTW, if you edit XImpl, it has to check that it still respects the contract of the X interface which is used by YImpl, so it probably doesn't make any difference.
Upvotes: 2