分享
 
 
 

Taking a look at ten different PHP frameworks

王朝php·作者佚名  2006-04-22
窄屏简体版  字體: |||超大  

URL: http://www.phpit.net/article/ten-different-php-frameworks/1/

Introduction

PHP frameworks are the latest hot topic in the PHP community, and new frameworks are being released daily. With over 40 frameworks available it's difficult to decide which framework works best for you, especially as each framework offers different functionality.

In this article we will look at ten popular frameworks, and compare them to each other. First I will give you a general chart which gives you a quick overview of all the frameworks, and after that we'll go through each framework and discuss it in short.

A Quick Overview

Below you can view a chart of the ten frameworks, and what functionality each frameworks offers.

Framework

PHP4

PHP5

MVC1

Multiple DB's2

ORM3

DB Objects4

Templates5

Caching6

Validation7

Ajax8

Auth Module9

Modules10

Zend Framework

-

-

-

-

-

-

CakePHP

-

-

Symfony Project

-

-

-

Seagull Framework

-

WACT

-

-

-

-

-

Prado

-

-

-

-

PHP on TRAX

-

-

-

-

-

ZooP Framework

-

-

eZ Components

-

-

-

-

-

-

CodeIgniter

-

-

-

-

#1: Indicates whether the framework comes with inbuilt support for a Model-View-Controller setup.

#2: Indicates whether the framework supports multiple databases without having to change anything.

#3: Indicates whether the framework supports an object-record mapper, usually an implementation of ActiveRecord.

#4: Indicates whether the framework includes other database objects, like a TableGateWay.

#5: Indicates whether the framework has an inbuilt template engine.

#6: Indicates whether the framework includes a caching object or some way other way of caching.

#7: Indicates whether the framework has an inbuilt validation or filtering component.

#8: Indicates whether the framework comes with inbuilt support for Ajax.

#9: Indicates whether the framework has an inbuilt module for handling user authentication.

#10: Indicates whether the framework has other modules, like an RSS feed parser, PDF module or anything else (useful).

Click here to open the chart in a new window

If anything in the above chart is incorrect, please let me know so I can correct it.

Zend Framework

The Zend Framework is still pretty new, and very beta, so there's still a few things to come (like a user authentication module), but it does already have quite a lot. Although it doesn't have a lot of checks in the chart, the Zend Framework does include other modules, to handle PDF files, RSS feeds, Web Services (Amazon, Flickr, Yahoo), and more. The Zend Framework also includes several different database objects, making it extremely simple to query your database, without having to write any SQL yourself.

At the moment the Zend Framework doesn't come with a full-blown ORM, but the framework developers are still debating whether to add an ORM layer or not. This might be something we see in the future, and you can always write your own ORM implementation, and have it added to the framework, as it accepts user contributions.

The Zend Framework is looking quite promising, and is definitely working to fix the common PHP problems. The stable version will probably have a lot more checks in the comparison chart!

CakePHP

CakePHP is mostly an advanced MVC framework, with a few extra modules added on top. It can handle most of the database stuff for you, and it includes support for Ajax and data validation. It also has a unique user authentication module called 'Access Lists', which can be used to give different users access to different parts of your CakePHP website.

This framework seems quite thorough and ready for use, although the CakePHP website is extremely confusing. There doesn't seem to be a stable version yet, which is a bit surprising since it's been in development for months now, but I guess it's probably possible to use the beta version on a production website as well.

Symfony Project

As you can see from the chart the Symfony Project seems like a very extensive framework, and it even includes a full-blown ORM, called Propel, which is another open source project and probably one of the best ORM solutions for PHP. Symfony also includes Creole for the database abstraction layer and Mojavi for the Model-View-Controller model layer. Because it simply re-uses these other projects, instead of re-writing them, this framework probably has the most extensive functionality, and this is clearly shown in the chart.

The only two downsides to this framework is that fact that it can't be run on PHP4, but this is pretty logical considering it needs much of PHP5's new features, and that it's so complicated. Most of the tasks, like paging, are much more complicated in Symfony than in other frameworks, and simplicity definitely doesn't describe this framework.

Seagull Framework

The Seagull framework seems like a pretty good framework, and it comes with quite a lot of features. Another positive thing is that it runs on PHP4 as well, which is a really good thing in my book, as I still use PHP4 and most web hosts don't support PHP5 yet.

Unfortunately Seagull doesn't come with any Ajax support, which is a bit of a shame, but a simple Google search returns a tutorial on adding Ajax support yourself, and it's likely it will be added in the future.

WACT - Web Application Toolkit

WACT looks quite promising, and it has the basic things a framework needs, like MVC, database objects and a template engine, but that's about it. It doesn't have any extra modules, and it definitely lacks a few inbuilt things, like Ajax, caching, an authentication module and more.

WACT does have one of the best template engines though, and it even allows you to create your own template tags to add certain functionality.

Prado

Prado is a very unique framework, and it offers some really cool features. It doesn't come with inbuilt support for MVC (from what I can tell), but it does have all kinds of components to handle most of the usual PHP tasks, and what's even neater it that it makes event-driven scripts possible. For example, it's possible to set an onClick event on a HTML button that links to a PHP function. This closely resembles ASP.NET, and Prado contains more ASP.NET components, like a GridView and a Repeater Control.

By looking at the comparison chart it might seem that Prado is a bit weak compared to the others, but this isn't true. Because Prado is so unique, it doesn't score a lot of points on the chart, but in reality it is very powerful.

PHP on Trax

This framework seems to be a PHP port of Ruby and Rails, and used to be called PHP on Rails. Unfortunately documentation is quite sparse, so it's hard to determine what this framework offers, but its documentation does mention ActiveRecord, so it probably offers ActiveRecord, just like RoR. Another thing it includes is inbuilt support for Ajax, and the two demos that can be found on the website clearly show this.

PHP on Trax is on the right way, but it's still missing a few things, like an authentication module and a caching module. It doesn't have any extra modules either, so it's all a bit basic at the moment.

ZooP Framework

The ZooP Framework is really feature-packed, and as the chart clearly shows, it supports almost anything, except for an inbuilt caching module and an ORM. What's even more surprising is that it runs on PHP4, which is really exceptional considering all the functionality it offers.

Another thing ZooP offers is inbuilt GUI controls, making it very easy to create forms quickly. It supports most of the basic form elements, and that advantage of using GUI controls over regular HTML is that you can tightly integrate validation logic with the GUI controls.

eZ Components

ez Components isn't so much a framework, but more of a collection of components, and that's probably why it doesn't come with inbuilt support for MVC.

It comes with most of the usual components, like a database component and a caching component, but it's also lacking a few things. For instance, it doesn't have a ActiveRecord component or a authentication component. On the other hand, it does have a few other extra components, like an e-mail component, but there aren't many, and other frameworks (like the Zend Framework) offer more.

CodeIgniter

CodeIgniter is a relatively new framework, by the makers of ExpressionEngine, and it looks quite promising. Unfortunately, it doesn't handle multiple databases yet, although that is in the works.

It's inspired by Ruby on Rails, and it offers much of the same functionality, like scaffolding. It has excellent documentation, and they've even got video tutorials to get you going.

And the winner is...

I'm going to have to disappoint you here, as there isn't a winner. Each framework offers different functionality, and there is no clear winner. Just like most things, it comes down to preference and personal choice. I highly suggest you look through the documentation of each framework above, and decide yourself which framework you like best.

Personally, I really like the Zend Framework at the moment, but as I've been investigating each framework, I've seen many other interesting features, like Prado's events or Symfony's ORM implementation.

If you absolutely can't decide on what framework to use, you can always do what most people do: write your own. It may take more time, but it's a hell of a lot fun.

If you have any comments or questions, feel free to drop them in the comments below or join us at PHPit Forums. Also, if you find any incorrect information in the chart or this article, please let me know so I can correct it.

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有