ASP.MVC: Implementing a non-templated view engine?

两盒软妹~` 提交于 2019-12-06 00:51:17

I've seen approaches like this used in other projects, and in general they're more trouble than they're worth. The flexibility you lose is just too high a price to pay for the automatic-ness of the generation phase. Think of how often requirements turn out to apply just to one special case, and now imagine how you'd have to handle that here.

Additionally, if your views are causing you that much pain, I would suggest you might not be using views correctly. You should see very little repetition in your views across the site. Common pieces should be refactored into separate chunks and pulled in from there, for example.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!