dougui2254 2013-05-29 13:15
浏览 37
已采纳

如何在一个大多数静态的网站上正确使用MVC? [关闭]

I'm using the Nette framework, which uses the MVC paradigm. Thing is, my site is supposed to be mostly static, just having a register/login form and a mini-forum/guestbook, other pages will be static. How do you properly employ the use of this paradigm on such sites? For one, I am not sure how many controllers/views I want for this or if there are supposed to be any models for the static parts. I also am not sure whether the static data should be hardcoded or if it should be grabbed from the database. Could anyone enlighten me about this? I have read many articles about MVC and understand how it should work in theory, but I can't apply it myself...

  • 写回答

1条回答 默认 最新

  • drztpx8735 2013-05-29 13:19
    关注

    A static page is just the view which will sent to the client by the controller, no model involved as there is no business logic. So what you will have is effectively VC, with the controller serving the view.

    If you make your static pages from a template, then there won't be much work to do if you decide they need some dynamic content later.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 如何用stata画出文献中常见的安慰剂检验图
  • ¥15 c语言链表结构体数据插入
  • ¥40 使用MATLAB解答线性代数问题
  • ¥15 COCOS的问题COCOS的问题
  • ¥15 FPGA-SRIO初始化失败
  • ¥15 MapReduce实现倒排索引失败
  • ¥15 ZABBIX6.0L连接数据库报错,如何解决?(操作系统-centos)
  • ¥15 找一位技术过硬的游戏pj程序员
  • ¥15 matlab生成电测深三层曲线模型代码
  • ¥50 随机森林与房贷信用风险模型