search
HomeBackend DevelopmentPHP Tutorial我感觉看DZ论坛的的源码简直就像看天书一般,跟现在的MVC开发流程完全不同,没有什么控制器模型的概念啊?

我感觉看DZ论坛的的源码简直就像看天书一般,跟现在的MVC开发流程完全不同,没有什么控制器模型的概念啊?

随便一个文件,里面函数写的都看不懂,哪是哪儿,不知道是干什么的,是DZ太复杂了吗?

回复内容:

我感觉看DZ论坛的的源码简直就像看天书一般,跟现在的MVC开发流程完全不同,没有什么控制器模型的概念啊?

随便一个文件,里面函数写的都看不懂,哪是哪儿,不知道是干什么的,是DZ太复杂了吗?

复杂度不是大程序组织不好的借口。DZ那个样子几乎都只是历史遗留的后果:

  • 长年的开发历史

  • 巨大的用户量

  • DZ自己开发者素质的相对低下

  • 巨大的开发者量 + 扩展开发者素质的相对低下
    (低端开发者换来的扩展生态的繁荣,虽然畸形,也不好随意放弃对吧)

  • 外加上(投靠腾讯)跟爹加入大组织之后带来的变数

每一个都让DZ想做修改和重构也很艰难。另外还有一点就是,DZ官方™自己想不想改还两说呢……


实际上DZ这样的产品,在迭代轨迹上如同WordPress——

  • 诞生时足够先进

  • 但随着时间推移,定位和品味本身落后了

  • 自己却受制于用户增长、历史积累和产品生态,无法以一个革命性的姿态迎头跟上

  • 最后只能困在旧的路线上修修补补

  • 可是这样反倒对旧的用户群形成了有效的保护

  • 旧用户群的拥护,更加坚定了旧路线走到黑的决心

曾经有不少大热的产品试图打破这个循环,但结果基本上不是很成功,两个典型的例子:

  • Py3K 试图后向不兼容的取代 Python 2.x 最后落得社区分裂,鸡飞蛋打
    我感觉看DZ论坛的的源码简直就像看天书一般,跟现在的MVC开发流程完全不同,没有什么控制器模型的概念啊?

  • LoveLive! Sunshine!! 和 偶像大师 灰姑娘女孩 新企划,都没有能够达到甚至追近原版的高度
    我感觉看DZ论坛的的源码简直就像看天书一般,跟现在的MVC开发流程完全不同,没有什么控制器模型的概念啊?我感觉看DZ论坛的的源码简直就像看天书一般,跟现在的MVC开发流程完全不同,没有什么控制器模型的概念啊?

所以我们不得不承认的一个现实就是:任何一个产品都是有其不可改变的基本点(这些基本点可能是各种内容——目标需求、用户定位、技术根基等等)。如果妄想脱离开这些基本点,那么不是推不动,就是失败,或者是分裂。

也许这就是宿命和轮回——产品总会生存、绚烂、落后、死亡,唯有历史的车轮滚滚向前不曾停息。

37signals公司的《Rework》也这样告诉过我们:

谁管他们在做什么,做好你的产品。当你要以“iPod杀手”或“下一个Pokemon”为目标的时候,你就已经死定了。

在我的解读看来,这个除了商业竞争的哲学之外,应该也包含着“不要追随已经过时的产品定位”这层意思吧。

dz是一个2001年诞生的项目,那时的PHP版本是PHP4,你看到的都是老系统的通病。

dz不具备参考性
不算优秀的代码案例~
我是这个项目的老大 我马上重写这个项目~

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
PHP Performance Tuning for High Traffic WebsitesPHP Performance Tuning for High Traffic WebsitesMay 14, 2025 am 12:13 AM

ThesecrettokeepingaPHP-poweredwebsiterunningsmoothlyunderheavyloadinvolvesseveralkeystrategies:1)ImplementopcodecachingwithOPcachetoreducescriptexecutiontime,2)UsedatabasequerycachingwithRedistolessendatabaseload,3)LeverageCDNslikeCloudflareforservin

Dependency Injection in PHP: Code Examples for BeginnersDependency Injection in PHP: Code Examples for BeginnersMay 14, 2025 am 12:08 AM

You should care about DependencyInjection(DI) because it makes your code clearer and easier to maintain. 1) DI makes it more modular by decoupling classes, 2) improves the convenience of testing and code flexibility, 3) Use DI containers to manage complex dependencies, but pay attention to performance impact and circular dependencies, 4) The best practice is to rely on abstract interfaces to achieve loose coupling.

PHP Performance: is it possible to optimize the application?PHP Performance: is it possible to optimize the application?May 14, 2025 am 12:04 AM

Yes,optimizingaPHPapplicationispossibleandessential.1)ImplementcachingusingAPCutoreducedatabaseload.2)Optimizedatabaseswithindexing,efficientqueries,andconnectionpooling.3)Enhancecodewithbuilt-infunctions,avoidingglobalvariables,andusingopcodecaching

PHP Performance Optimization: The Ultimate GuidePHP Performance Optimization: The Ultimate GuideMay 14, 2025 am 12:02 AM

ThekeystrategiestosignificantlyboostPHPapplicationperformanceare:1)UseopcodecachinglikeOPcachetoreduceexecutiontime,2)Optimizedatabaseinteractionswithpreparedstatementsandproperindexing,3)ConfigurewebserverslikeNginxwithPHP-FPMforbetterperformance,4)

PHP Dependency Injection Container: A Quick StartPHP Dependency Injection Container: A Quick StartMay 13, 2025 am 12:11 AM

APHPDependencyInjectionContainerisatoolthatmanagesclassdependencies,enhancingcodemodularity,testability,andmaintainability.Itactsasacentralhubforcreatingandinjectingdependencies,thusreducingtightcouplingandeasingunittesting.

Dependency Injection vs. Service Locator in PHPDependency Injection vs. Service Locator in PHPMay 13, 2025 am 12:10 AM

Select DependencyInjection (DI) for large applications, ServiceLocator is suitable for small projects or prototypes. 1) DI improves the testability and modularity of the code through constructor injection. 2) ServiceLocator obtains services through center registration, which is convenient but may lead to an increase in code coupling.

PHP performance optimization strategies.PHP performance optimization strategies.May 13, 2025 am 12:06 AM

PHPapplicationscanbeoptimizedforspeedandefficiencyby:1)enablingopcacheinphp.ini,2)usingpreparedstatementswithPDOfordatabasequeries,3)replacingloopswitharray_filterandarray_mapfordataprocessing,4)configuringNginxasareverseproxy,5)implementingcachingwi

PHP Email Validation: Ensuring Emails Are Sent CorrectlyPHP Email Validation: Ensuring Emails Are Sent CorrectlyMay 13, 2025 am 12:06 AM

PHPemailvalidationinvolvesthreesteps:1)Formatvalidationusingregularexpressionstochecktheemailformat;2)DNSvalidationtoensurethedomainhasavalidMXrecord;3)SMTPvalidation,themostthoroughmethod,whichchecksifthemailboxexistsbyconnectingtotheSMTPserver.Impl

See all articles

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 Article

Hot Tools

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.