title: Service and DAO classes are doing same thing. Why would you need them both?
body: <p>Hi Guys I am new to Spring.Just had a doubt .The service and DAO classes do the same thing? Why would you need them both? Apart from that we can connect our controller directly to our Dao methods and we can fetch data from them. Whats the need for SERVICE Layer exactly. I went through few portals some of whom told service layer provides modularity and few of them mentioned that its for security purpose also. I am still confused Can anyone provide a clear cut answer for this query?</p>