MVC 模式在 ZKoss 中的工作原理
我正在尝试使用 zkoss 库,这有点酷。我只是碰巧学会了 通过 zend 框架的 MVC 模式,我感觉有点迷失了。 我有几个问题希望有人能解答一下。
1 我们是否有页面作为索引页面(一个文件)登录页面(另一个文件)的概念?
2 我们是否有布局的概念作为装饰器模式,其中我有一个布局并用于显示不同的视图(很像 php 中的 zf 和 symfony)?
我想我已经在某处读过有关带有注释的模板的内容,但这仍然不是每个视图是否有页面或其他内容的问题(问题1)
感谢您阅读本文。
i'm trying my hands around the zkoss library and it's kinda cool.I just happen to have learnt
the MVC pattern through zend framework and it's like i'm kind of lost a bit.
i have a couple of question that i would like somebody to shed some light over.
1 Do we have the concept of page as index page (a file) login page (another file) ?
2 Do we have the concept of layout as decorator patterns where i have a layout and it's used to display different view (much like zf and symfony in php) ?
i think i've read somewhere about the templating with annotations but still that doesn't the questions of if there is page per view or something else (question 1)
thanks for reading this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
对于问题一,简单的回答是“是”。您可以选择从一个页面跳转到另一页面。然而,ZK 是一个 Ajax 框架,您也可以毫无问题地轻松编写单页应用程序。例如,您可以通过单击按钮弹出登录对话框,而无需更改页面。这是你的选择。
For question one, simple answer is "Yes". You have the option to jump from one page to another page. However, ZK is an Ajax framework that you can also easily write a one-page application without problem. E.g., you can popup a login dialog on a click of button without change the page at all. It is your option.
在ZK中,有一个叫做组合的概念,我不确定这是否是你想要的:
按组合划分的 ZK 模板
In ZK, there's a concept named composition, I'm not sure if this is what you want:
ZK Templating by Composition