如何编写“可挂钩”的 mvc 应用程序
我正在尝试找出一种设计模式,允许“挂钩”到现有的 mvc 应用程序,而无需重新编译整个应用程序。
例如,我的公司目前为大多数大客户使用经典的 asp。我们的电子商务产品被许多客户使用,但它访问许多功能的共享脚本,因此,如果发现错误,我们可以修改单个脚本,而不是修改数百个站点。
有没有办法在mvc中复制这种能力?我的理解是,当我编译和上传网站时,对该网站的任何更改都需要再次重新编译该网站。这是真的吗?或者,有没有办法“挂钩”到网站进行更改?
I am trying to figure out a design pattern that would allow "hooking" into an existing mvc application without re-compiling that entire application.
For example, my company currently uses classic asp for most of their large clients. Our e-commerce product is used by many of our clients, but it accesses shared scripts fo many functions so that if a bug is found we can modify a single script rather than modifying hundreds of sites.
Is there a way to replicate this ability in mvc? My understanding is that when I compile and upload a site, any changes to that site would require the site to be recompiled again. Is that true? Or, is there a way to "Hook" into the site to make changes?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你研究过MEF吗?
http://code.msdn.microsoft.com/mef
顺便说一下 re 有什么问题- 编译带有 bug 的程序集并将 dll 放入到位?这与修复脚本并将其放入完全相同。
Have you looked into MEF?
http://code.msdn.microsoft.com/mef
As an aside what is wrong with re-compiling the assembly with the bug and dropping a dll into place? It is exactly the same as fixing a script and dropping it in.