用Kohana框架來替代Zend框架

jieforest發表於2012-07-28
As you know from reading Malt Blue, I’m rather a Zend Framework fan.

Whether it’s the controller plugins, easily adding RSS feeds to applications, configuration with Zend Config or more – I really believe it’s one of the best framework choices that PHP has to offer.

However recently I’ve been doing a lot of research in to some of the best PHP frameworks and codebases, including Symfony 1 & Symfony 2, Drupal, CakePHP and Kohana for a technical documentation project that I’ve been working on.

As a part of that project, I’ve had to really come up to speed about how they’re composed and the process for doing core configuration, including:

1. Specifying where the session information is stored

2. Specifying where the log information is stored

3. Automagically determining the current, running, environment

Well, to say the least, I was really surprised at just how simple, lightweight and easy Kohana is to use. Wow, what a true breath of fresh air it is after using Zend Framework for so long now.

1. It didn’t force me to follow a rigid set of configuration and layout practices

2. It provides a wealth of built in options and resources in a well commented configuration file: application/bootstrap.php

2.1. All you need to do is uncomment the option you want and it’s available to the application

3. It makes it dead simple to override core classes. There’s no need to explicitly add file paths.

4. It’s very fast

5. It’s easy to add in 3rd party libraries to extend core functionality

6. It’s easy to create modules to add in functionality that’s not already there

Now don’t get me wrong, I’m not leaving Zend Framework behind, I’m still a big fan. But I have to be honest and acknowledge that Zend Framework can be a lot of work to get started with and to setup testing with as well.

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/301743/viewspace-737847/,如需轉載,請註明出處,否則將追究法律責任。

相關文章