Stella981 Stella981
2年前
31、最简单的mvc框架tiny,增加Ioc,jdbc工具类(1个类),连接池(1个类)
Ioc按照mvc,我们需要把tiny分成3层,其中视图(Renderer抽象类)和Action我们已经在前面实现了,这次我们用最少的代码实现Model。    model沿用Action的想法,用户自定义类,类名必须以Model结尾,同Action一样在初始化时放入Container容器内。model就是数据模型,我们这里充血模型,model