dotvvm主页和继承
我正在考虑将DOTVVM用于现有的WebForms应用程序。 (这是一个政府Intranet应用程序) 它使用Web Experience Toolkit和CDTS-中央部署的模板解决方案,这些解决方案可以随时自动替换具有更新版本的主页和CS等文件。 因此,我要确保这将与DOTVVM兼容,尤其是关于主页和类层次结构,我无法更改。 该应用中的页面具有以下类层次结构: page< - 解决方案basepage< - basepage< - cdts dll< - system.web.ui.page
basepage&lt ;- 我只能更改前3个 提示和建议赞赏。
I am considering using DotVVM for an existing webforms application.
(It is a Government Intranet app)
It uses Web Experience Toolkit and CDTS- Centrally Deployed Templates Solution which can at any time automatically replace files such as master pages and css with updated versions.
For that reason, I want to ensure that this will be compatible with DotVVM especially with regards to the master pages and class hierarchy which I cannot change.
A page in the app has the following class hierarchy:
Page <- SolutionBasePage <- BasePage <- BasePage from CDTS DLL <- System.Web.UI.Page
I can only change the first 3
Tips and suggestions appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不确定是否正确理解问题,但是DOTVVM使用的类与Web表单不同 -
System.Web
没有依赖性。DOTVVM页面的ViewModel可以是任何类,但必须是JSON-Serializable(
System.web.ui.page
不是)。此外,它应该实现idotvvmviewmodel
;否则,该框架的许多功能可能无法访问。可能可以做的是DOTVVM ViewModel和Web表单中的页面基类之间的某种适配器。 ViewModel将包含基本页面作为字段(不是作为不应该序列化并发送给客户端的属性),并且只会使用页面属性和方法。
但是我不确定这有多困难。
I am not sure if I understand the problem correctly, but DotVVM is using different classes than the Web Forms - there are no dependencies on
System.Web
.The ViewModel of a DotVVM page can be any class, but it must be JSON-serializable (which
System.Web.UI.Page
is not). Additionally, it should implementIDotvvmViewModel
; otherwise many features of the framework may not be accessible.What may be possible to do is some kind of adapter between DotVVM ViewModel and the page base classes from the Web Forms. The ViewModel would contain the base page as a field (not as a property as it shouldn't be serialized and sent to the client) and would only use the page properties and methods.
But I am not sure how difficult would this be to integrate.