Home  >  Article  >  Backend Development  >  关于模块的划分

关于模块的划分

WBOY
WBOYOriginal
2016-06-23 14:23:571108browse

我用框架开发网站,类似discuz的bbs。
在划分模块时遇到了困难,像discuz的回一个帖子就有积分之类的积分功能遍布bbs各页面,应该如何划分模块比较好呢?整个积分归为一个模块?


回复讨论(解决方案)

是啊,写一个公共的class,然后后台当然有多不同的动作做配置(配置积分),在有操作的时候调用指定动作。

但是前台很多地方都有对积分的操作,那就要每个页面都调用class。以后维护起来不是很麻烦么?

一个访问20个class是可以的,正常的。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn