29
DR. MOHAMMAD IQBAL THANKS TO ADITYA SENGUPTA Comparing Web Frameworks

DR. MOHAMMAD IQBAL THANKS TO ADITYA SENGUPTA Comparing Web Frameworks

Embed Size (px)

Citation preview

Page 1: DR. MOHAMMAD IQBAL THANKS TO ADITYA SENGUPTA Comparing Web Frameworks

D R . M O H A M M A D I Q B A L

T H A N K S T O A D I T Y A S E N G U P T A

Comparing Web Frameworks

Page 2: DR. MOHAMMAD IQBAL THANKS TO ADITYA SENGUPTA Comparing Web Frameworks

Web Frameworks?

PHP Frameworks Zend CodeIgniter Symfony CakePHP Yii Kohana Drupal* Wordpress*

Ruby on RailsDjango

Page 3: DR. MOHAMMAD IQBAL THANKS TO ADITYA SENGUPTA Comparing Web Frameworks

Why PHP? Why not PHP?

It’s easy: Easy to learn Easy to run Easy to find PHP developers

75% of web sites run on PHPPowerfulExtensibleOpen source

Page 4: DR. MOHAMMAD IQBAL THANKS TO ADITYA SENGUPTA Comparing Web Frameworks

Why PHP? Why not PHP?

xkcd.com/292 by Randall Munroe

Page 5: DR. MOHAMMAD IQBAL THANKS TO ADITYA SENGUPTA Comparing Web Frameworks

Comparing Frameworks

Default installation as per instructions on the official website of the framework Except using SQLite as opposed to MySQL as the

database engineBasic website as per the tutorial/getting

started document for the frameworkLogin/Authentication functionality added if

not available in the default tutorialPerformance testing for one static page, a

large dynamic page and a login page

Page 6: DR. MOHAMMAD IQBAL THANKS TO ADITYA SENGUPTA Comparing Web Frameworks

LICENSEREQUIREMENTSCONSOLE TOOLSDOCUMENTATION

TUTORIALS

Functionality Compared

Page 7: DR. MOHAMMAD IQBAL THANKS TO ADITYA SENGUPTA Comparing Web Frameworks

Zend Framework

Open source (New BSD License)Object OrientedM-V-C ArchitectureRequires PHP 5.2.4 or later

Optionally PHPUnit 3.0Database agnostic

Page 8: DR. MOHAMMAD IQBAL THANKS TO ADITYA SENGUPTA Comparing Web Frameworks

Zend Framework

Provides a console tool (zf) for Rapid Development

Automagically generates models, controllers, layouts and views

Does not automagically generate SQLDoes not automagically create CRUD

functionsPoor documentationDefault tutorials don’t provide Authentication

or Security related examples

Page 9: DR. MOHAMMAD IQBAL THANKS TO ADITYA SENGUPTA Comparing Web Frameworks

CodeIgniter

Is not completely open source (CodeIgniter license) Requires developers to indemnify the company

Object OrientedM-V-C ArchitectureRequires PHP 5.1.6Database agnostic

Does not support SQLite3 natively

Page 10: DR. MOHAMMAD IQBAL THANKS TO ADITYA SENGUPTA Comparing Web Frameworks

CodeIgniter

No console toolNo automagic generation for any functionalityExtremely small download (2.2MB)Does not provide a text tutorial on the site (only

video tutorials)Tutorials on the site use older versions of

CodeIgniter class xyz extends Controller (v 1.x) class xyz extends CI_Controller (v 2.x)

Default tutorials don’t provide Authentication or Security related examples

Page 11: DR. MOHAMMAD IQBAL THANKS TO ADITYA SENGUPTA Comparing Web Frameworks

Symfony (1.4)

Open source (MIT license)Object OrientedM-V-C ArchitectureRequires PHP 5.2.4

Symfony2 will require PHP 5.3.2Database agnostic

Uses doctrine or propel for the Object Relational Mapping (ORM) layter

Page 12: DR. MOHAMMAD IQBAL THANKS TO ADITYA SENGUPTA Comparing Web Frameworks

Symfony (1.4)

Extremely powerful console tool (symfony)Automagically generates all elements including

sql queries (from YAML source)Provides extremely detailed tutorials for all

functionalityTutorials work as documentedThe basic tutorial includes admin functionality

as well as authentication and security information

Plugins are extremely easy to install using console tools.

Page 13: DR. MOHAMMAD IQBAL THANKS TO ADITYA SENGUPTA Comparing Web Frameworks

CakePHP

Open source (MIT license)Object OrientedM-V-C ArchitectureWorks with PHP4 (4.3.2)Database agnostic

Does not natively support SQLite3

Page 14: DR. MOHAMMAD IQBAL THANKS TO ADITYA SENGUPTA Comparing Web Frameworks

CakePHP

Console tool (cake)cake bake generates code if a database is

defined including models, views and controllers for the tables in the database

cake schema is used for database backup/restore functionality

Separate tutorials for a weblog and ACL controlled applications.

Tutorials work as documented

Page 15: DR. MOHAMMAD IQBAL THANKS TO ADITYA SENGUPTA Comparing Web Frameworks

Yii Framework

Stands for Yes It Is!Open source (BSD license)Object OrientedM-V-C ArchitectureRequires PHP 5.3Database agnostic

Page 16: DR. MOHAMMAD IQBAL THANKS TO ADITYA SENGUPTA Comparing Web Frameworks

Yii Framework

Powerful console tool (yiic)Does not generate SQLUses Gii (web based code generator) for

CRUD operationsDefault yii application as generated by yiic

includes authentication functionality and three basic pages

Tutorials are regularly updated

Page 17: DR. MOHAMMAD IQBAL THANKS TO ADITYA SENGUPTA Comparing Web Frameworks

Kohana

Open Source (BSD license)Originally based on CodeIgniter, but no

longerObject OrientedM-V-C ArchitectureRequires PHP 5.1.6Database agnostic

Does not support SQLite3 natively

Page 18: DR. MOHAMMAD IQBAL THANKS TO ADITYA SENGUPTA Comparing Web Frameworks

Kohana

No console toolNo automagic generation for any

functionalityExtremely small download (1.1MB) even

smaller than CodeIgniterDocumentation is poor. Most basic

information like database connectivity is not available on the user guide for version 3.1.

Tutorials are extremely limited (no tutorials for v3.1)

Page 19: DR. MOHAMMAD IQBAL THANKS TO ADITYA SENGUPTA Comparing Web Frameworks

Ruby on Rails

User Friendly (27 June 2008) by J.D. “Illiad” Frazer

Page 20: DR. MOHAMMAD IQBAL THANKS TO ADITYA SENGUPTA Comparing Web Frameworks

Ruby on Rails

Open source (MIT license)Object OrientedM-V-C ArchitectureProvides its own server but using Apache

with Passenger may uninstall PHP5 on Ubuntu

Database agnostic

Page 21: DR. MOHAMMAD IQBAL THANKS TO ADITYA SENGUPTA Comparing Web Frameworks

Ruby on Rails

Multiple console tools (rails and rake)Databases can be managed via console tools

with YAML configuration filesAutomagically generated code includes

CRUD functionality however the Rails Guide notes that experienced Ruby developers rarely use it

Default tutorials use plain http authentication rather than database driven authentication

Page 22: DR. MOHAMMAD IQBAL THANKS TO ADITYA SENGUPTA Comparing Web Frameworks

xkcd.com/353

Page 23: DR. MOHAMMAD IQBAL THANKS TO ADITYA SENGUPTA Comparing Web Frameworks

Django

Open source (BSD license)Object OrientedModel-Template-View design (same as MVC)Provides its own server but can integrate

with Apache or any other serverDatabase agnostic

Page 24: DR. MOHAMMAD IQBAL THANKS TO ADITYA SENGUPTA Comparing Web Frameworks

Django

Uses python manage.py as a console toolAutomagically generates sql and admin

functionalityCan use console tools to manipulate dataTutorial is basic but well written. There is a

“coming soon” at the end of the tutorialAdmin functions are behind login pages, but

the tutorial does not show how to create login pages for the public site

Page 25: DR. MOHAMMAD IQBAL THANKS TO ADITYA SENGUPTA Comparing Web Frameworks

JAKARTA JMETER 2 .4VMWARE WORKSTATION 7 .1

WINDOWS 7 BASIC

Performance Compared

Page 26: DR. MOHAMMAD IQBAL THANKS TO ADITYA SENGUPTA Comparing Web Frameworks

Static Page

0

2000

4000

6000

8000

10000

12000

14000

16000

18000

0

1000

2000

3000

4000

5000

6000

Average (ms)Median (ms)Throughput (req/min)

Page 27: DR. MOHAMMAD IQBAL THANKS TO ADITYA SENGUPTA Comparing Web Frameworks

User/Administrator Login

0

5000

10000

15000

20000

25000

0

500

1000

1500

2000

2500

3000

3500

4000

4500

Average

Median

Throughput

Page 28: DR. MOHAMMAD IQBAL THANKS TO ADITYA SENGUPTA Comparing Web Frameworks

101 Blog Entries on a Single Page

Pure

HTM

L

Pure

PHP

Zend

CodeI

gnite

r

Sym

fony

CakeP

HP Yi

i

Kohan

a

Wor

dpre

ss

Ruby

Djang

o0

10000

20000

30000

40000

50000

60000

0

500

1000

1500

2000

2500

3000

3500

Avg

Median

Throughput

Page 29: DR. MOHAMMAD IQBAL THANKS TO ADITYA SENGUPTA Comparing Web Frameworks

ADA PERTANYAAN ?

Selesai!