Try implement an IOC framework by myself