Table of Contents
1.开源协议
2.系统框架
3.系统重点
4.前台功能
5.扩展
6.文档
7.开发者
8.总结
我个人的选择建议:
期待
Home Backend Development PHP Tutorial 用户管理系统,PHP项目开发银弹?

用户管理系统,PHP项目开发银弹?

Jun 20, 2016 pm 12:28 PM

银弹 ,是针对狼人等超自然怪物的特效武器。后来也被比喻为具有极端有效性的解决方法,作为杀手锏、最强杀招、王牌等的代称。

作为一个在php开发岗位上小有几年经验的开发者,我的日常工作是从事基于TP框架的php项目开发。一直以来,我都执着于独立自主开发,包括最基本的用户管理和后台管理系统。最困扰我的东西就是权限管理、用户的登陆注册等等。每个项目的需求不一样,所以我采用的方式就是修修改改,维护自己的用户管理系统。然后应用到各种项目中。

直到有一天,我在OSC上看到一个新的开源项目——Open Center php用户管理系统。让我突然产生一种相见恨晚的感觉。

我为什么会有这种感觉呢?

首先,OC是遵循Apache2.0开源协议的,也就是和TP一样的协议。打消了我在版权方面的疑虑。

再者,它作为一款用户管理系统,提供了较为完善的用户注册流程,包括多种注册方式,如手机号注册、邮箱注册、用户名注册,同时还支持真实性验证,可见开发团队的诚意。

另外,它对用户权限管理方面所做的努力,也可见一斑,开发团队称继承自OneThink,我也曾经在项目中使用OneThink,发现OC还是有很大不同之处的,它还加入了前台权限的管理。

为了给广大tper一个参考,我特别拿OneThink和OC进行了一个比较。

1.开源协议

两者都是基于Apache2.0的,没什么好比较的。

2.系统框架

两者都是基于ThinkPHP的。不过OC基于OneThink,这一点让我很疑惑。因为从表面上,很难看出来两个系统的是同一个内核。不过研究之后,还是发现一些共同之处。OC有很浓重的OneThink基因。

前端方面,OC采用zui,算是一个比较大胆的尝试(据我所知,zui就是bootstrap的一个改进版本,学习成本比较低),OneThink比较传统,采用了bootstrap。

3.系统重点

OneThink着重于内容管理,从后台的结构也可以看出来。导航栏中可以很醒目地看到内容管理的部分,内容管理部分的功能也已经初具雏形。

OC着重于用户管理,所以后台导航完全没有内容管理的部分,比较有特色的是,导航部分把“模块”概念突出了,左侧栏位专门放置模块,同时也支持模块的安装卸载,这一点应该说是比较大的改进吧。

OC还有一个比较突出的特性,就是支持用Php构建后台管理页面,这对像我这样的,没有太多前端经验的后端开发人员来说,是最大的吸引力。通过AdminBuilder类库,可以纯php来构建管理页面。还有更牛的开发者自己改进了一套用于前台的AdminBuilder。

图一、OC后台局部截图

4.前台功能

这方面,两者均只提供了一个基础的demo,OneThink提供了一个博客形式的demo。而OC更加彻底,只提供了一个演示模块和一个演示首页。不过OC的默认风格更加小清新,可能和采用zui框架作为前端有一定关系吧。

OneThink注册登录方面,并没有提供完整的流程。在这方面,OC做得可圈可点。多种形式的注册登录、第三方登陆、同时还支持头像的裁剪、扩展字段,密码修改等功能。值得一提的是,OC还提供了一种消息机制,研究之后,发现是基于轮询技术实现的,这里,我觉得还有可改进的空间。不过基本都能满足我的需求。

图二、资料修改界面

图三、消息提醒菜单

5.扩展

说到扩展,我觉得OneThink还是做得比较赞的,OneThink有比较多的开发者贡献插件,算是一个比较大的竞争优势。而OC,因为刚出来,没有这方面的支持,不过我试着把OneThink的插件移植到OC上,发现还是比较好兼容的,毕竟父子关系摆在那里。

不过OC的官方也是比较努力的,提供了一些内置插件,比如图片水印,空间换肤等。值得一提的是,开发团队改进了一些OneThink的第三方插件之后仍然保留作者,比起某些所谓的“具有分享精神”的人高尚一点。

6.文档

文档这块,我个人感觉OC还不具备和OneThink比较的能力。首先,OC的文档不够齐全,这一点也算是OC的痛处吧。虽然开发团队提供了一个离线文档,但还是很不详细。比起OneThink还差很多。不过群里面每天都有更新进度,也算是不错的了。

7.开发者

其实这一项进行比较,对OC挺不公平的,毕竟一个年前才推出第一个版本,而OneThink已经发布有个把年头了。不过个人觉得,OC作为一款用户管理系统,还是大有可为的,毕竟不是每个开发人员都喜欢自己去开发维护一套用户管理系统的,有一个现成可以用的项目会方便很多。

8.总结

通过对两个开源项目的比较,不知道大家是不是了然了。从我个人的角度来说,不管黑猫白猫,能抓住老鼠就是好猫,看需求!

我个人的选择建议:

1.如果你是做CMS类的项目,那么首选OneThink,这个毫无疑问,毕竟OC,还没有这方面的模块扩展,而从OneThink中再整合这个部分,可谓难度不小。

2.如果你是做一些需要用户系统,并且用户交互比较多的新项目,那么选OC吧,OC的存在,无疑会让你如虎添翼,节省下大量的开发时间。

期待

通过两个开源项目的比较,很显然,OC目前尚达不到银弹的程度, 但最近我发现 OC在开源中国OSC@Git PHP类目排名是第一名, 无疑也是给了开发者一个不错的选择。

留在本文最后,容我发表一下自己对OC未来发展的期望。模块化的系统构建理念不错,如果OC的开发团队能够重视开发者,给开发者提供更多的支持,相信会有越来越多的php开发者采用OC,同时也希望用过OC的开发者能够积极分享功能扩展,这样OC才能够越走越远。

相关资料:

OneThink:项目主页   www.onethink.cn  

项目源码库: http://git.oschina.net/liu21st/onethink

OpenCenter:项目主页  www.ocenter.cn  

在线演示  demo.ocenter.cn  

项目源码库: http://git.oschina.net/yhtt2020/OpenCenter

Statement of this Website
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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Explain JSON Web Tokens (JWT) and their use case in PHP APIs. Explain JSON Web Tokens (JWT) and their use case in PHP APIs. Apr 05, 2025 am 12:04 AM

JWT is an open standard based on JSON, used to securely transmit information between parties, mainly for identity authentication and information exchange. 1. JWT consists of three parts: Header, Payload and Signature. 2. The working principle of JWT includes three steps: generating JWT, verifying JWT and parsing Payload. 3. When using JWT for authentication in PHP, JWT can be generated and verified, and user role and permission information can be included in advanced usage. 4. Common errors include signature verification failure, token expiration, and payload oversized. Debugging skills include using debugging tools and logging. 5. Performance optimization and best practices include using appropriate signature algorithms, setting validity periods reasonably,

Explain the concept of late static binding in PHP. Explain the concept of late static binding in PHP. Mar 21, 2025 pm 01:33 PM

Article discusses late static binding (LSB) in PHP, introduced in PHP 5.3, allowing runtime resolution of static method calls for more flexible inheritance.Main issue: LSB vs. traditional polymorphism; LSB's practical applications and potential perfo

How does session hijacking work and how can you mitigate it in PHP? How does session hijacking work and how can you mitigate it in PHP? Apr 06, 2025 am 12:02 AM

Session hijacking can be achieved through the following steps: 1. Obtain the session ID, 2. Use the session ID, 3. Keep the session active. The methods to prevent session hijacking in PHP include: 1. Use the session_regenerate_id() function to regenerate the session ID, 2. Store session data through the database, 3. Ensure that all session data is transmitted through HTTPS.

Describe the SOLID principles and how they apply to PHP development. Describe the SOLID principles and how they apply to PHP development. Apr 03, 2025 am 12:04 AM

The application of SOLID principle in PHP development includes: 1. Single responsibility principle (SRP): Each class is responsible for only one function. 2. Open and close principle (OCP): Changes are achieved through extension rather than modification. 3. Lisch's Substitution Principle (LSP): Subclasses can replace base classes without affecting program accuracy. 4. Interface isolation principle (ISP): Use fine-grained interfaces to avoid dependencies and unused methods. 5. Dependency inversion principle (DIP): High and low-level modules rely on abstraction and are implemented through dependency injection.

How to automatically set permissions of unixsocket after system restart? How to automatically set permissions of unixsocket after system restart? Mar 31, 2025 pm 11:54 PM

How to automatically set the permissions of unixsocket after the system restarts. Every time the system restarts, we need to execute the following command to modify the permissions of unixsocket: sudo...

Explain late static binding in PHP (static::). Explain late static binding in PHP (static::). Apr 03, 2025 am 12:04 AM

Static binding (static::) implements late static binding (LSB) in PHP, allowing calling classes to be referenced in static contexts rather than defining classes. 1) The parsing process is performed at runtime, 2) Look up the call class in the inheritance relationship, 3) It may bring performance overhead.

How to debug CLI mode in PHPStorm? How to debug CLI mode in PHPStorm? Apr 01, 2025 pm 02:57 PM

How to debug CLI mode in PHPStorm? When developing with PHPStorm, sometimes we need to debug PHP in command line interface (CLI) mode...

See all articles