Hi everyone:
I am new to Spring . There is an problem puzzled me some time.
I use DAO pattern in this way before:
But in Spring I use IOC in this way:Code:ITradeDAO tradedao=DAOFactory.getInstance().getTradeDAOInstance(); // use the tradedao here ........................ .......................
Is there any difference between them? I mean that is there any benefit if I use Ioc? Is it more benefit than DAO design pattern?Code:ITradeDAO tradedao; public void setTradeDAO(ITradeDAO tdao){ this.tradedao=tdao; } // use the tradedao here .....................................
Could some friends tell me that difference? Thks!![]()


Reply With Quote
