简体   繁体   English

Zend 2骨架。 定制应用程序模块还是创建自己的模块?

[英]Zend 2 Skeleton. Customize Application module or create own module?

I downloaded the Zend 2 Skeleton Application which comes with the module "Application". 我下载了“应用程序”模块随附的Zend 2 Skeleton应用程序。 This module is the central point of the "Framework". 该模块是“框架”的中心点。 Now I want to add some routes/pages like "terms", "contact" etc. That brings me to the essential question: 现在,我想添加一些路线/页面,例如“条款”,“联系方式”等。这使我想到了基本问题:

Is it best practise to customize the "Application" module or am I supposed to create my own module? 定制“应用程序”模块是最佳实践还是应该创建自己的模块? Especially if I want to add some static pages? 特别是如果我想添加一些静态页面? If I'm gonna customize the Application module I can't update the Framework via composer anymore, I guess. 我想,如果我要自定义应用程序模块,我将无法再通过作曲家更新框架。

Thanks for everyone's help. 感谢大家的帮助。

It depends. 这取决于。 If you wanna edit this "static pages" via wysiwyg make separate module for pages (CMS ?) If you will have pure static pages just add new controllers to Application. 如果要通过wysiwyg编辑此“静态页面”,请为页面创建单独的模块(CMS?)。如果您有纯静态页面,只需向Application添加新的控制器。

Current trend is to make API in backend and use some frontend framework for front (so front-end will be responsible for load proper views) 当前的趋势是在后端使用API​​,并在前端使用一些前端框架(因此前端将负责加载适当的视图)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM