Home Backend Development PHP Tutorial 个人观点,道一下对 PHPCMS 的网站架构的看法

个人观点,道一下对 PHPCMS 的网站架构的看法

Jun 13, 2016 pm 12:00 PM
content discuz mvc phpcms

个人观点,说一下对 PHPCMS 的网站架构的看法

PHPCMS应该是国内第一家用MVC架构来写开源PHP产品的,我第一次工作上接触到PHPCMS是在两年前,那个时候对MVC还是不理解,然后因为工作需要,需要修改一下PHPCMS的源码。拿到代码后,我一开始还本着一种从PHPCMS入手来理解MVC模式,可研究了半天,心里一直想着这就是人人称赞的MVC架构吗?怎么而看都感觉不出哪里的优势,却让人很容易联想到discuz的架构。


(截图:phpcms的源码,来自文件D:\www\phpcms\phpcms\modules\content\content.php)


今天重新拿到PHPCMS的代码,重新看了下。

在自己理解了MVC,并且看过大部分的人气比较高的MVC框架,国内的ThinkPHP、国外的symfony2 laravel以及yii之后再来看PHPCMS,再来评价下PHPCMS:

1)结构混乱,命名没有任何规则,比如前台可以访问的加action前缀之类的。

2)有必要在开头第一段写上判断吗?为什么不直接用.htaccess禁止任何人访问 /phpcms这个目录?

3)phpsso_server 这个目录写法完全是抄袭discuz,拖油瓶。

4)phpcms一直宣称MVC,让人觉得技术上很厉害,但是实际上运行起来非常缓慢,卡得无比。


PHPCMS是用PHP4的架构思路来完成MVC模式。

今天重新看了PHPCMS的源码,才明白了自己当时为什么会有那种感受“这就是传说中人人称赞的MVC吗”,还对MVC产生排斥感。PHPCMS的写法完全是一种PHP4的写法,严格来说根本就不符合MVC规范,根本就不是MVC架构!最后要说的是,用PHP4的思路架构写出PHPCMS这样一个系统来,比用MVC写出来累,且维护成本比流行MVC框架开发出来的程序高(时间精力上)。(by default7#zbphp.com)


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)

Detailed explanation of Discuz registration process: allowing you to easily modify personal information Detailed explanation of Discuz registration process: allowing you to easily modify personal information Mar 13, 2024 pm 12:21 PM

"Detailed Explanation of Discuz Registration Process: Allowing you to easily modify personal information, specific code examples are required" Discuz is a powerful community forum program that is widely used in various websites. It provides a wealth of user registration and personal information modification. functions and interfaces. This article will introduce you to Discuz's registration process in detail and provide specific code examples to help you easily customize and modify your personal information. 1. User registration process In Discuz, user registration is one of the important functions of the site. The smoothness of the registration process and

A must-have for Discuz users! Comprehensive analysis of renaming props! A must-have for Discuz users! Comprehensive analysis of renaming props! Mar 12, 2024 pm 10:15 PM

A must-have for Discuz users! Comprehensive analysis of renaming props! In the Discuz forum, the name change function has always received much attention and demand from users. For some users who need to change their name, name change props can easily modify the user name, and this is also an interesting way of interaction. Let’s take an in-depth look at the renaming props in Discuz, including how to obtain them, how to use them, and solutions to some common problems. 1. Obtain name-changing props in Discuz. Name-changing props are usually purchased through points or the administrator

Discuz Editor: Powerful web page editing tool Discuz Editor: Powerful web page editing tool Mar 09, 2024 pm 06:06 PM

Discuz Editor: A powerful web page editing tool that requires specific code examples. With the development of the Internet, website construction and content editing have become more and more important. As a common web page editing tool, Discuz editor plays an important role in website construction. It not only provides a wealth of functions and tools, but also helps users edit and publish content more conveniently. In this article, we will introduce the features and usage of the Discuz editor, and provide some specific code examples to help readers better understand and use

Discuz background account login exception, how to deal with it? Discuz background account login exception, how to deal with it? Mar 09, 2024 pm 05:51 PM

Title: Discuz background account login exception, how to deal with it? When you use the backend management of the Discuz forum system, you may sometimes encounter abnormal account login. This could be due to a variety of reasons, including a wrong password, account being blocked, network connection issues, etc. When encountering this situation, we need to solve the problem through simple troubleshooting and processing. Check whether the account number and password are correct: First, confirm whether the account number and password you entered are correct. When logging in, make sure the capitalization is correct and the password is

Discuz Editor: an efficient post layout tool Discuz Editor: an efficient post layout tool Mar 10, 2024 am 09:42 AM

Discuz Editor: An efficient post layout tool. With the development of the Internet, online forums have become an important platform for people to communicate and share information. In the forum, users can not only express their opinions and ideas, but also discuss and interact with others. When publishing a post, a clear and beautiful format can often attract more readers and convey more accurate information. In order to facilitate users to quickly type and edit posts, the Discuz editor came into being and became an efficient post typesetting tool. Discu

Detailed explanation of steps to modify Discuz domain name Detailed explanation of steps to modify Discuz domain name Mar 11, 2024 am 11:00 AM

Detailed explanation of the steps to modify the Discuz domain name. Specific code examples are required. With the development and operation of the website, sometimes we need to modify the domain name of the Discuz forum. This may be due to brand change, website SEO optimization, or other reasons. No matter what the reason is, modifying the Discuz domain name is a process that requires careful operation. Today we will introduce the steps of modifying the Discuz domain name in detail and provide specific code examples. Step 1: Back up data. Before modifying the domain name, you must first ensure that the website

Discuz database location query skills sharing Discuz database location query skills sharing Mar 10, 2024 pm 01:36 PM

Forum is one of the most common website forms on the Internet. It provides users with a platform to share information, exchange and discuss. Discuz is a commonly used forum program, and I believe many webmasters are already very familiar with it. During the development and management of the Discuz forum, it is often necessary to query the data in the database for analysis or processing. In this article, we will share some tips for querying the location of the Discuz database and provide specific code examples. First, we need to understand the database structure of Discuz

What framework is phpcms? What framework is phpcms? Apr 20, 2024 pm 10:51 PM

PHP CMS is a PHP-based open source content management system for managing website content. Its features include ease of use, powerful functionality, scalability, high security, and free open source. It can save time, improve website quality, enhance collaboration and reduce development costs, and is widely used in various websites such as news websites, blogs, corporate websites, e-commerce websites and community forums.

See all articles