
Ask HN: Designing via Interface in Java? - antoaravinth
	Hi,
Often I see experienced Java developers asking us to develop the system using Interfaces rather than starting with classes. Yes, I do create interfaces, I know whats its usecases are etc. However the term &quot;design your system using interfaces&quot; is somewhat confusing to me. Is it a pattern for designing robust application in Java world? How should one learn it?<p>If so are there any online books &#x2F; blogs regarding the same?<p>Note: I had already asked the question in Java Subreddit, but I want to get HN community thoughts as well.
======
davelnewton
I'm not clear on what the conceptual hurdle is.

Of course it's a common pattern--that doesn't mean it's always necessary. It
_does_ make a lot of things easier, like testing, etc.

It's the same thing as declaring your vars as `List` or `Collection` instead
of `ArrayList`. If you do the same thing in your system you give yourself much
more flexibility.

