戲說PHP框架的味道
Jun 08, 2016 pm 05:32 PM作者:老王
目前PHP社區(qū)里最成功的框架要數(shù)CakePHP,Symfony,ZendFramework了,有選擇總是好事,不過選擇多了也有煩惱,正所謂“有兩塊手表的人永遠不知道準確的時間”。今天無聊,戲說一下我眼中PHP框架的味道。希望初學者選擇框架時能有所參考。
CakePHP是一個完整的FullStack類型的框架。使用CakePHP架構程序的時候,感覺就好像是三軍儀仗隊齊步走,軍人們胳膊和腿要什么節(jié)奏,什么位置等等,這些都必須按照規(guī)矩來,絕對不能開小差。
Symfony是一個介于FullStack類型和Glue類型之間的框架。使用Symfony架構程序的時候,感覺就好像是奧運會開幕式里運動員入場,雖然胳膊,腿的節(jié)奏,位置等也會有一些泛泛的要求,但大都不會強制如何如何,甚至你還可以對著觀眾招招手,對著攝像機做做鬼臉什么的。
ZendFramework是一個純粹的Glue類型的框架,使用ZendFramework架構程序的時候,感覺和擠公交差不多,如果是在歐洲擠公交,大家基本上還都會遵守秩序上車,如果是在中國擠公交,你的胳膊,腿都得鉚足了勁才行,那絕對是一場戰(zhàn)爭。
以上言論,皆為笑談。大家也不必追問到底哪個好?哪個壞?應該聽佛祖的,不要執(zhí)著,^_^
?
Hot AI Tools

Undress AI Tool
Undress images for free

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Clothoff.io
AI clothes remover

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

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Working with database in CakePHP is very easy. We will understand the CRUD (Create, Read, Update, Delete) operations in this chapter.

In this chapter, we will understand the Environment Variables, General Configuration, Database Configuration and Email Configuration in CakePHP.

Logging in CakePHP is a very easy task. You just have to use one function. You can log errors, exceptions, user activities, action taken by users, for any background process like cronjob. Logging data in CakePHP is easy. The log() function is provide

Validator can be created by adding the following two lines in the controller.

This chapter deals with the information about the authentication process available in CakePHP.

In this chapter, we are going to learn the following topics related to routing ?

To work on file upload we are going to use the form helper. Here, is an example for file upload.

To work with date and time in cakephp4, we are going to make use of the available FrozenTime class.
