如果我有自己的用户系统,论坛的解决方案可能是什么?
我正在考虑构建自己的带有会员系统的MVC系统。然而,我需要论坛,我想也许我只会使用论坛作为注册并让它处理会员,但是有没有更好的解决方案来同时需要 MVC 系统和论坛?
I was thinking of building my own MVC system with a member system. However, I will need forums and I thought maybe I will just use the forums as registration and let that handle the members, but is there a better solution to wanting both an MVC system and forums?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
老实说,我的答案是:不要开发论坛,而是选择众多可用的 PHP 实现之一,并将精力投入到主题化上。我知道这不是您想要的,但如果您对论坛应该如何运作没有真正的全新想法,那么从头开始就没有意义。
但回到你的问题:是的,MVC 应该可以工作,即使你可能会在代码中混合视图和控制器。但正如 @ford 已经建议的那样,值得寻找框架,以便您可以专注于论坛的独特功能。
Honestly, my answer is: Don't develop a forum, but take one of the many available PHP implementations and put your energy in theming it. I know this is not what you were looking for, but if you don't really have a completely new idea how forums should work, there is no point in starting from scratch.
But back to your question: Yes, MVC should work, even though you are probably going to mix view and controller a little bit in your code. But as @ford already suggests, it is worth looking for frameworks so that you can concentrate on the unique features of your forum.
我看不出为什么以 MVC 为中心的方法与开发论坛不兼容。
您的会员系统是 MVC 架构中的特定模型吗?如果是这样,我认为这将是一个很好的方法。这样,如果您想添加需要每个成员权限/身份验证的更多功能(即博客),则可以从相同的用户模型中提取。
否则,最好的解决方案就是已经写好的解决方案。 CakePHP 作为 PHP MVC 框架非常流行。用它制作论坛应该不会太困难。
I can't see any reason why an MVC centric approach would be incompatible with developing a forum.
Is your member system a particular model within your MVC architecture? If so, I think that would be a good way to go. This way, if you want to add more functionality (ie, blogging) that needs per member permission/authentication could draw from the same users Model.
Otherwise, the best solution is the one already written. CakePHP is pretty popular as a PHP MVC framework. Making forums with it shouldn't be too difficult.
Symfony 提供了一个 php 框架。需要更多的开发时间,但提供更大的灵活性。
有很多 CMS 提供用户管理以及开箱即用或作为插件的论坛。
有很多论坛可以管理用户,并且您可以扩展以提供您想要的其他功能。
Symfony provides a php framework. Takes more development time but provides greater flexibility.
There are lots of CMS's out there provide user management with forums available out of the box or as plugins.
There are lots of forums which can manage users and potentially you could extend to provide your desired other features.