title: Why use interface in Dao design pattern or other design patterns
body: <p>Please see below components of a Dao design pattern: </p>
  
  <p>Data Access Object Pattern or DAO pattern is used to separate low level data accessing API or operations from high level business services. Following are the participants in Data Access Object Pattern.</p>
  
  <p>Data Access Object Interface - This interface defines the standard operations to be performed on a model object(s).</p>
  
  <p>Data Access Object concrete class -This class implements above interface. This class is responsible to get data from a datasource which can be database / xml or any other storage mechanism.</p>
  
  <p>Model Object or Value Object - This object is simple POJO containing get/set methods to store data retrieved using DAO class.</p>
  
  <p>Why do we need an INTERFACE when we have a concrete class and why can't we use it directly? This might be a naive question but please help me get this thing clear. Not only in DAO design pattern but in other design patterns also use of INTERFACE is bit confusing. I agree this is related to code reusabilty and reduced coupling. But can anyone please explain a bit further. </p>