戏说PHP框架的味道
作者:老王
目前PHP社区里最成功的框架要数CakePHP,Symfony,ZendFramework了,有选择总是好事,不过选择多了也有烦恼,正所谓“有两块手表的人永远不知道准确的时间”。今天无聊,戏说一下我眼中PHP框架的味道。希望初学者选择框架时能有所参考。
CakePHP是一个完整的FullStack类型的框架。使用CakePHP架构程序的时候,感觉就好像是三军仪仗队齐步走,军人们胳膊和腿要什么节奏,什么位置等等,这些都必须按照规矩来,绝对不能开小差。
Symfony是一个介于FullStack类型和Glue类型之间的框架。使用Symfony架构程序的时候,感觉就好像是奥运会开幕式里运动员入场,虽然胳膊,腿的节奏,位置等也会有一些泛泛的要求,但大都不会强制如何如何,甚至你还可以对着观众招招手,对着摄像机做做鬼脸什么的。
ZendFramework是一个纯粹的Glue类型的框架,使用ZendFramework架构程序的时候,感觉和挤公交差不多,如果是在欧洲挤公交,大家基本上还都会遵守秩序上车,如果是在中国挤公交,你的胳膊,腿都得铆足了劲才行,那绝对是一场战争。
以上言论,皆为笑谈。大家也不必追问到底哪个好?哪个坏?应该听佛祖的,不要执著,^_^

Hot AI Tools

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

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

Undress AI Tool
Undress images for free

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











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

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

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

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

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.

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

CakePHP is an open-source framework for PHP. It is intended to make developing, deploying and maintaining applications much easier. CakePHP is based on a MVC-like architecture that is both powerful and easy to grasp. Models, Views, and Controllers gu
