Frameworks choice

  • 764 views
Uploaded on

Choice of PHP framework for enterprise project.

Choice of PHP framework for enterprise project.

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
764
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
2
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. PHP Frameworks choice Pawel Graczyk Chicago October 15th, 2012
  • 2. What should we expect from framework? ● Based on PHP platform ● MVC ● Friendly for modern approach (agile and decoupled) ● Contain all features necessary for advanced system ● Well tested (unit tests) ● Stability ● Active community of users ● Active development over next 3-5 years ● Easy to learn
  • 3. Possible choices● Zend Framework 1 (http://framework.zend.com/)● Zend Framework 2 (http://framework.zend.com/)● Symfony 2 (http://symfony.com/)● Lithium (http://lithify.me/)● Yii (http://www.yiiframework.com/)
  • 4. Zend Framework 1 - Matthew Weier OPhinney(http://mwop.net/)+ Based on PHP platform+ MVC- Friendly for modern approach (agile and decoupled)- Ready for third-party products- Use new features from PHP 5.3 (namespaces etc.)- Less magic+ Contain all features necessary for advanced system- Well tested (unit tests)+ Stability+/- Active community of users- Active development over next 3-5 years-/+ Easy to learn- Integrated with modern template system- Ready for reusable code (modules introduced too late)
  • 5. Zend Framework 2 - Matthew Weier OPhinney(http://mwop.net/)+ Based on PHP platform+ MVC+ Friendly for modern approach (agile and decoupled)+/- Ready for third-party products+ Use new features from PHP 5.3 (namespaces etc.)+ Less magic+/- Contain all features necessary for advanced system+ Well tested (unit tests)+/- Stability+/- Active community of users+ Active development over next 3-5 years+ Easy to learn- Integrated with modern template system-+Reusable (modules as a first class citizens)
  • 6. Symfony 2 - Fabien potencier (http://fabien.potencier.org/)+ Based on PHP platform+ MVC+ Friendly for modern (agile) approach+ Ready for third-party products+ Use new features from PHP 5.3 (namespaces etc.)+ Less magic+ Contain all features necessary for advanced system+ Well tested (unit tests)+ Stability+ Active community of users+ Active development over next 3-5 years+ Easy to learn+ Integrated with modern template system+ Reusable (bundles as a first class citizens everything is a bundle)
  • 7. ZF1 vs (ZF2 / S2)"How agile do we want to be?"For ZF1 ● We know ZF1 (but do we really know it?) ● More developers on the market familiar with ZF1 ● Not too agile (strongly coupled)For (ZF2 / S2) ● Easy to learn ● More developers on the market who WANTS TO work with modern technologies (ZF2 / S2) ● More agile (decoupled)
  • 8. ZF2 vs S2 - Architecture"Do we want to have a full stack or library?"For ZF2 (library) - have a initial setup but more configuration isneeded. Less experienced developers are tempted to "do it better" or"fix something in framework". It often leads to code very difficult tomaintain by team of people.For S2 (full stack) - Provides initial setup and supports python likephilosophy of "One good way of doing something".Less experienced developers are less tempted to extend a framework.Framework is strongly decoupled, developer have a freedom ofdifferent setup.
  • 9. ZF2 vs S2 - StabilityFor ZF2Stable for over 1 month. Current version: 2.0.2 ● Stable, but is it stable enough?For S2Stable for over 1 year. Current version: 2.1.2 ● Rock solid stable
  • 10. ZF2 vs S2 - Reusable codeBundle/Module - reusable code ready to use "out of the box". It maycontain all parts of MVC.Examples: zf-assetic-module or FOSUserBundleFor ZF2 ● Over a 100 of modules (http://modules.zendframework.com/) ● Most of modules still in developmentFor S2 ● 1696 bundles - (http://knpbundles.com/) ● Lots of third-party bundles have quality not worse than framework and are used for default configuration.
  • 11. ZF2 vs S2 - Learning curveConvention over configuration - things works in most expected way bydefault. The effort is needed to change the way things works but notto make them work.Magic - Lack of clarity in system behaviour. Unnecessaryautomatisation. Things happen and appear unexpectedly.For ZF2 ● less magic (???) ● convention over configuration (???)For S2 ● less magic ● convention over configurationBoth are easier to learn than ZF1
  • 12. ZF2 vs S2 - Usage of framework componentsZF2 is used by: ● ???S2 is used by ● Silex: BrowerKit, CssSelector, DomCrawler, EventDispatcher, HttpFoundation, HttpKernel, Routing, Form, Translation, Validator ● Goutte: BrowserKit, DomCrawler, CssSelector, Process, ClassLoader, Finder ● Behat: Console, DependencyInjection, EventDispatcher, Finder, Yaml, Config, Translation ● Assetic: Process ● Doctrine2: Console, Yaml ● Propel2: Console, ClassLoader, Yaml ● PHPUnit: Yaml ● FLOW3: Yaml ● Midguard CMS: most of them in their next version? ● phpBB 4: most of them? ● Drupal 8*
  • 13. What I like about Symfony 2● ●● ●● ●● ●● ●● ●● ●● ●● ●● ●● ●● ●●● ●● ●● ●● ●● ● ●● ●● ●●
  • 14. ZF1 vs ZF2 vs S2 - summary● ZF1 - Outdated.● ZF2 - Many initial ideas and requirements was abandoned. The result is framework quite similar to S2 but with less features and possibly worse stability (for today at least).● S2 - Stable and more comprehensive. "Battery included" approach.