Παράκαμψη προς το κυρίως περιεχόμενο
lourdas.eu
  • Βιογραφικό (CV)

Meet Yii: a new PHP framework

Είστε εδώ

  1. Αρχική
  2. Ιστολόγια
  3. Το ιστολόγιο του/της Βασίλης
Πέμ, 09/04/2009 - 12:38ΠΜ Βασίλης

Lately, I've been searching for a robust, efficient and well documented PHP framework. In case you are not familiar with the term framework, all you need to know is that a framework is a set of programming code that is usually targetted for general purpose applications and is supposed to take the burden of coding repetitive tasks from the developer, leaving him/her to concentrate more on the business logic. So, a web application framework -and in our case- a PHP framework is a set of classes that deal with data validation, connection to databases, authentication, session management, etc., features that any web application has.

Lately, I've been searching for a robust, efficient and well documented PHP framework. In case you are not familiar with the term framework, all you need to know is that a framework is a set of programming code that is usually targetted for general purpose applications and is supposed to take the burden of coding repetitive tasks from the developer, leaving him/her to concentrate more on the business logic. So, a web application framework -and in our case- a PHP framework is a set of classes that deal with data validation, connection to databases, authentication, session management, etc., features that any web application has.

So, enough with the terms. After Googling a bit, I found a few frameworks for PHP. Zend, CakePHP, CodeIgniter, KohanaPHP, Symfony are among them. I started with CakePHP, read some basics and a couple of tutorials, but I found the documentation relatively limited. After doing some more Googling, I also found that it's not one of the fastest frameworks out there. Zend falls in the same case in terms of performance. CodeIgniter and KohanaPHP however, are on the other side. They are both fast, but, they lack features that Zend and CakePHP have out of the box. In the same internet resources regarding the performance of these frameworks, Symfony falls in the Zend and CakePHP group too, but I haven't looked at it at all. KohanaPHP is actually a fork of CodeIgniter with more features and is only PHP 5 compatible. Behind CodeIgniter is EllisLab, a company that sponsors CodeIgniter under the roof of ExpressionEngine, a CMS of theirs. As it seems, a lot of community CodeIgniter developers saw the slow adoption of features and the existence of a company behind the framework as a burden to keep improving the framework and so they decided to fork it and the fork became KohanaPHP (however, today, as many KohanaPHP folks say, the framework shares 0 lines of code with CodeIgniter).

So, I started peeking at KohanaPHP, but a major disadvantage is the lack of thorough and updated documentation for it. http://docs.kohanaphp.com is the site that hosts the KohanaPHP documentation, but it still needs a lot of work. The documentation must be updated for the current stable version 2.3.2, along with examples and inclusion of all class methods. After reading a great deal of it, it seems relatively hard for me to find techniques and tips on how to do stuff. CodeIgniter has a very good documentation at the framework's site, but I finally rejected it for the same reasons that led to the creation of KohanaPHP and for it being PHP 4 compatible.

After Googling again, I stepped on this post, which compared CodeIgniter, KohanaPHP and Yii. This post was the round 2 of the older comparison a year ago and I though to give Yii a try.

I forgot to say that most frameworks (if not all) use the notion of the MVC design pattern (Model-View-Controller, see here for more information).

I haven't peeked much at the Yii framework, but I can say that from my first introduction to it, it seems like the framework I was looking for. It has extensive documentation (a 153 LaTeX generated document that explains if not all, a very great deal of the framework, along with html files for all framework classes) and it also includes a php shell that automates the creation of models, controllers and other stuff I don't know so far! The latter is an excellent feature. Say you have a database table that holds eg. users. You enter a simple model user in the shell, and it creates the corresponding user model! You can also create the controller that automates the tasks of creating, updating, deleting users from your table, all this without any lines of code by you. I have to congratulate Qiang Xue, the person behind the Yii framework. Up so far, I am mostly impressed.

After I create my first application with Yii, I will post more details about it.

διάφορα / miscellaneous: 
εργασίες (projects)
υπολογιστές / computers: 
ΕΛ/ΛΑΚ (FOSS)
λογισμικό (software)
  • Ιστολόγιο του χρήστη Βασίλης

αναζήτηση

Σύνδεσμοι / Links

e-tameio.eu
Ένωση Πληροφορικών Ελλάδας
Hire me in Freelancer
View Vasileios Lourdas's profile on LinkedIn

Το PGP κλειδί μου / My PGP key

Κατεβάστε το PGP δημόσιο κλειδί μου από εδώ.
Download my PGP public key from here.

PayPal δωρεά / PayPal donation












Creative Commons License
This website by Vasilis Lourdas is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.