18
Feb
Most of us just want to write applications that work well, and to do it as simply and easily as we can. If you need to produce results, if you think that the details and intricacies of coding are for geeks, then you should look at CodeIgniter (CI to its friends). CI is free, lightweight, and simple to install, and it really does make your life much easier. If you are already writing code in PHP, CodeIgniter will help you to do it better, and more easily.
It will cut down on the amount of code you actually type. Your scripts will be easier to read and update.
Here are two examples (If you are already writing code in PHP, CodeIgniter will help you to do it better, and more easily ).
Imagine you are writing a database query. This is how you might write a function within your PHP programme to query a MySQL database:
$connection = mysql_connect(“localhost”,”fred”,”12345″);
mysql_select_db(“websites”, $connection);
$result = mysql_query (“SELECT * FROM sites”, $connection);
while ($row = mysql_fetch_array($result, MYSQL_NUM))
{
foreach ($row as $attribute)
print “{$attribute[1]} “;
}
Now see how a CI function would handle a similar query:
$this->load->database(‘websites’);
$query = $this->db->get(’sites’);
foreach ($query->result() as $row)
{
print $row->url
}
Compare the character counts: 244 for the traditional syntax; 112 for CI.
READ THE FULL ARTICLE->->->
16
Feb
CodeIgniter
Set Up: CodeIgniter is very easy to set up. Copy all the framework files to the web server and it’s good to go. It also has a small folder size – about 2.1 Mb.
Documentation: The documentation is very well-structured and organized although it is a bit less detailed than the Zend framework documentation. CodeIgniter also has forums and a wiki which feature a lot of user-submitted code.
Flexibility: CI is very flexible allowing almost all defaults to be modified.
Performance: CI has about double the performance of the Zend Framework.
Testing: CodeIgniter has a unit testing class but it encourages mixing the test code with the actual source code so I don’t recommend it.A third-party extension for SimpleTest is available though.Using PHPUnit with the CI classes should also be possible.
*CodeIgniter advantages include:
- Extremely easy to setup.
- Lower learning curve then the Zend Framework.
- More accessible documentation.
- Concise syntax – The Zend Framework syntax is wordier.
- 100% faster than the Zend framework.
Zend Framework
Set Up:The Zend Framework requires a bit of effort to setup the project. It requires the creation of a bootstrap file with all the initialisation stuff it. The framework is relatively large – about 12.4Mb and the set-up process took about 19 minutes.
Documentation: The Zend Framework has very detailed documentation with a lot of examples. It is less organised than the CodeIgniter docs in my view although this could be down to the afore-mentioned detail and the large number of components available in the framework.ZF also has a wiki with a few tutorials.
Flexibility: CZF is simply a collection classes and as such any file or folder can be placed anywhere as long as the location is added to the bootstrap file.
Performance: The Zend Framework is about half as fast as CodeIgniter.
Testing:The Zend Framework does not have a built-in unit testing class but the core classes use PHPUnit as their test framework and this can be extended to include any additional classes.Using SimpleTest with the ZF classes should also be possible.
*The Zend Framework advantages include:
- The “official PHP framework”.
- My workplace is already a Zend “partner”.
- Full-featured layout and template system.
- Massive number of classes and components.
- Extremely flexible.
- More advanced database library.
- More advanced validation library.
- Internationalization support.
Conclusion
CodeIgniter is over twice the speed of the Zend framework in all cases and CakePHP is a lot slower than the other two PHP frameworks.
for the benchmarks is in here : PHP framework comparison benchmarks
(Source: http://www.avnetlabs.com/php/php-frameworks-revisited-codeigniter-vs-zend-framework)
16
Feb
PHP Framework implements the Model-View-Controller (MVC) design pattern, and encourages application design based on the Model 2 paradigm. This design model allows the Web page or other contents (View) to be mostly separated from the internal application code (Controller/Model), making it easier for designers and programmers to focus on their respective areas of expertise.
The framework provides a single entry point Controller. The Controller is responsible for allocating HTTP requests to the appropriate Action handler (Model) based on configuration mappings.
The Model contains the business logic for the application. The Controller then forwards the request to the appropriate View component, which is usually implemented using a combination of HTML with PHP tags in the form of templates. The resulting contents are returned to the client browser, or via another protocol such as SMTP.
(source: http://www.phpmvc.net/)
This is the list of PHP frameworks use for creating web application
# Akelos PHP Framework
# CakePHP
# Chisimba
# CodeIgniter
# FUSE
# Horde
# Jaws
# Kohana
# Kolibri
# LISA MVC
# Mambo
# MediaWiki
# Midgard
# MODx
# Nette Framework
# Orinoco Framework
# PHP For Applications
# Qcodo
# QPHP Framework
# Seagull PHP Framework
# SilverStripe
# Simplicity PHP framework
# SWiZ
# Symfony
# Tigermouse
# Zend Framework
# Zikula
# Zoop Framework
(Source: http://en.wikipedia.org/wiki/List_of_web_application_frameworks)
16
Feb
PHP is a scripting language originally designed for producing dynamic web pages. It has evolved to include a command line interface capability and can be used in standalone graphical applications.[2]
While PHP was originally created by Rasmus Lerdorf in 1995, the main implementation of PHP is now produced by The PHP Group and serves as the de facto standard for PHP as there is no formal specification.[3] PHP is free software released under the PHP License, however it is incompatible with the GNU General Public License (GPL), due to restrictions on the usage of the term PHP.[4]
PHP is a widely-used general-purpose scripting language that is especially suited for web development and can be embedded into HTML. It generally runs on a web server, taking PHP code as its input and creating web pages as output. It can be deployed on most web servers and on almost every operating system and platform free of charge.[5] PHP is installed on more than 20 million websites and 1 million web servers.[6]
(source: http://en.wikipedia.org/wiki/PHP)