php_frameworks_discussion

10

Click here to load reader

Upload: hean-hong-leong

Post on 10-May-2015

805 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: PHP_Frameworks_Discussion

PHP Frameworks Discussion

Leong Hean Hong (@hongster)#barcampmlk2

(CC) BYhttp://goo.gl/E6THH

Page 2: PHP_Frameworks_Discussion

Outline

• What is an application framework?• var x = diff(framework, library);• Types of frameworks• Why should I use a framework?• Why I should not use a framework?• Factors to consider when choosing a framework

Page 3: PHP_Frameworks_Discussion

What is an application framework?

• Used by software developer to implement structure of an application for a specific development environment

• Reduce overhead associated with common activities performed 

Page 4: PHP_Frameworks_Discussion

x = diff(framework, library)

• Libraryo Collection of reusable code and data structureso For a specific purpose (e.g. graphic, networking)

• Frameworko Consist of multiple librarieso For a specific application type (e.g. game, web

application)o Define basic application flowo Define some patterns of interaction among components

Page 5: PHP_Frameworks_Discussion

Types of frameworks

• Generic web applicationo Kohana, CodeIgniter, CakePHP, Zend, DooPHPbuatan malaysia

• CMSo Drupal, Joomla, Textpattern

• Blogo  Wordpress

• There are also frameworks for building forum, social network, CRM, ...

Page 6: PHP_Frameworks_Discussion

Why should I use a framework?

• Save development effort• I am a newbie programmer• Ease of integrating components• Learn best practices, patterns

Page 7: PHP_Frameworks_Discussion

Why I should not use a framework?

• Ooi, I only want a About Us, FAQ, and Product page.• I want to know what I am doing, learn PHP.• My application has a very specific requirement, existing

frameworks might not be suitable

Page 8: PHP_Frameworks_Discussion

Factors to consider when choosing a framework• Learning curve• Community, documentation• Active development• How much work do I have to do? (Simplicity/flexibility v.s.

Comprehensive)

Page 9: PHP_Frameworks_Discussion

What do you think?

Page 10: PHP_Frameworks_Discussion

Thoughts on Convention, Configuration

• Convention Over Configuration makes "magic". What if the "magic" stands in my way?

• Is the configuration taking over my life?