Comparing web frameworks


Published on

My talk at the Scaling PHP in the Cloud ( event on 9 July 2011

Published in: Technology
  • Be the first to comment

No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • Also, PHP is not considered “cool”
  • CRUD = create/read/update/deleteDocumentation examples don’t work as is.Auth and security examples don’t work without some extra time figuring out how the Auth functionality works.
  • SQL queries are not absolutely correct for SQLite (autoincrement)
  • Comparing web frameworks

    1. 1. ADITYA SENGUPTA<br />Scaling PHP in the cloud<br />Bangalore<br />July 9, 2011<br />Comparing Web Frameworks<br />
    2. 2. Web Frameworks?<br />PHP Frameworks<br />Zend<br />CodeIgniter<br />Symfony<br />CakePHP<br />Yii<br />Kohana<br />Drupal*<br />Wordpress*<br />Ruby on Rails<br />Django<br />
    3. 3. Why PHP? Why not PHP?<br />It’s easy:<br />Easy to learn<br />Easy to run<br />Easy to find PHP developers<br />75% of web sites run on PHP<br />Powerful<br />Extensible<br />Open source<br />
    4. 4. Why PHP? Why not PHP?<br /> by Randall Munroe<br />
    5. 5. Comparing Frameworks<br />Default installation as per instructions on the official website of the framework<br />Except using SQLite as opposed to MySQL as the database engine<br />Basic website as per the tutorial/getting started document for the framework<br />Login/Authentication functionality added if not available in the default tutorial<br />Performance testing for one static page, a large dynamic page and a login page<br />
    6. 6. License<br />REQUIREMENTS<br />CONSOLE TOOLS<br />Documentation<br />TUTORIALS<br />Functionality Compared<br />
    7. 7. Zend Framework<br />Open source (New BSD License)<br />Object Oriented<br />M-V-C Architecture<br />Requires PHP 5.2.4 or later<br />Optionally PHPUnit 3.0<br />Database agnostic<br />
    8. 8. Zend Framework<br />Provides a console tool (zf) for Rapid Development<br />Automagically generates models, controllers, layouts and views<br />Does not automagically generate SQL<br />Does not automagically create CRUD functions<br />Poor documentation<br />Default tutorials don’t provide Authentication or Security related examples<br />
    9. 9. CodeIgniter<br />Is not completely open source (CodeIgniter license)<br />Requires developers to indemnify the company<br />Object Oriented<br />M-V-C Architecture<br />Requires PHP 5.1.6<br />Database agnostic <br />Does not support SQLite3 natively<br />
    10. 10. CodeIgniter<br />No console tool<br />No automagic generation for any functionality<br />Extremely small download (2.2MB)<br />Does not provide a text tutorial on the site (only video tutorials)<br />Tutorials on the site use older versions of CodeIgniter<br />class xyz extends Controller (v 1.x)<br />class xyz extends CI_Controller (v 2.x)<br />Default tutorials don’t provide Authentication or Security related examples<br />
    11. 11. Symfony (1.4)<br />Open source (MIT license)<br />Object Oriented<br />M-V-C Architecture<br />Requires PHP 5.2.4 <br />Symfony2 will require PHP 5.3.2<br />Database agnostic <br />Uses doctrine or propel for the Object Relational Mapping (ORM) layter<br />
    12. 12. Symfony (1.4)<br />Extremely powerful console tool (symfony)<br />Automagically generates all elements including sql queries (from YAML source)<br />Provides extremely detailed tutorials for all functionality<br />Tutorials work as documented<br />The basic tutorial includes admin functionality as well as authentication and security information<br />Plugins are extremely easy to install using console tools.<br />
    13. 13. CakePHP<br />Open source (MIT license)<br />Object Oriented<br />M-V-C Architecture<br />Works with PHP4 (4.3.2)<br />Database agnostic <br />Does not natively support SQLite3<br />
    14. 14. CakePHP<br />Console tool (cake)<br />cake bake generates code if a database is defined including models, views and controllers for the tables in the database<br />cake schema is used for database backup/restore functionality<br />Separate tutorials for a weblog and ACL controlled applications.<br />Tutorials work as documented<br />
    15. 15. Yii Framework<br />Stands for Yes It Is!<br />Open source (BSD license)<br />Object Oriented<br />M-V-C Architecture<br />Requires PHP 5.3<br />Database agnostic<br />
    16. 16. Yii Framework<br />Powerful console tool (yiic)<br />Does not generate SQL<br />Uses Gii (web based code generator) for CRUD operations<br />Default yii application as generated by yiic includes authentication functionality and three basic pages<br />Tutorials are regularly updated<br />
    17. 17. Kohana<br />Open Source (BSD license)<br />Originally based on CodeIgniter, but no longer<br />Object Oriented<br />M-V-C Architecture<br />Requires PHP 5.1.6<br />Database agnostic <br />Does not support SQLite3 natively<br />
    18. 18. Kohana<br />No console tool<br />No automagic generation for any functionality<br />Extremely small download (1.1MB) even smaller than CodeIgniter<br />Documentation is poor. Most basic information like database connectivity is not available on the user guide for version 3.1. <br />Tutorials are extremely limited (no tutorials for v3.1)<br />
    19. 19. Ruby on Rails<br />User Friendly (27 June 2008) by J.D. “Illiad” Frazer<br />
    20. 20. Ruby on Rails<br />Open source (MIT license)<br />Object Oriented<br />M-V-C Architecture<br />Provides its own server but using Apache with Passenger may uninstall PHP5 on Ubuntu<br />Database agnostic<br />
    21. 21. Ruby on Rails<br />Multiple console tools (rails and rake)<br />Databases can be managed via console tools with YAML configuration files<br />Automagically generated code includes CRUD functionality however the Rails Guide notes that experienced Ruby developers rarely use it<br />Default tutorials use plain http authentication rather than database driven authentication<br />
    22. 22.<br />
    23. 23. Django<br />Open source (BSD license)<br />Object Oriented<br />Model-Template-View design (same as MVC)<br />Provides its own server but can integrate with Apache or any other server<br />Database agnostic<br />
    24. 24. Django<br />Uses python as a console tool<br />Automagically generates sql and admin functionality<br />Can use console tools to manipulate data<br />Tutorial is basic but well written. There is a “coming soon” at the end of the tutorial<br />Admin functions are behind login pages, but the tutorial does not show how to create login pages for the public site<br />
    25. 25. Jakarta Jmeter 2.4<br />VMWARE workstation 7.1<br />Windows 7 Basic<br />Performance Compared<br />
    26. 26. Static Page<br />
    27. 27. User/Administrator Login<br />
    28. 28. 101 Blog Entries on a Single Page<br />
    29. 29. QUESTIONS?<br />That’s all folks!<br />
    30. 30.<br />
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.