我有一些与框架依赖有关的问题。 一般说来,最好的编码做法是,不把你的名字放在框架特定代码上。 例如,就春天而言,所有依赖性都应保留在编织档案中,而且你的申请法典中没有任何春季的特写法(这是在春天通知中选择春confXml文档的原因之一)。 如果是纯净重物,则总是最好不要将纯净重物法混为一谈,因此,你的意见可以与任何框架合作。 但我的问题是:
If we remove spring or puremvc from your code without replacing any other framework then you are end up in few beans (in case of spring) or some truly reusable views (in case of puremvc). But gluing beans or view requires large amount of coding effort, according to me its indirect dependency of framework without using framework specific api.
If we replace spring with other DI framework like pico container then also it requires substantial amount or rework. Which again leads to indirect dependency on framework.
因此,它为什么不把我们的申请名称放在具体框架中? 就我们而言,我们可以制定具体框架(如果它真正能够大大缓解我们的编码努力)。
据我说,不把申请名称空间与具体框架混为一谈,就使你的申请可以用于其他框架。 如果你想把你现有的设计良好的休战申请移到春天,以及它需要多少努力。
其他读者的观察。