Php Frameworks

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

1 comments

Comments 1 - 1 of 1 previous next Post a comment

Post a comment
Embed Video
Edit your comment Cancel

4 Favorites

Php Frameworks - Presentation Transcript

  1. PHP Frameworks     Ryan Davis Jason Eberle Mady Villavicencio Kelly Carter Brandon Iffert
  2. What Are They?
      • Add basic functionality
      • Similar to Javascript libraries, but not merely a bunch of nifty objects and functions
      • Provide an architecture in which to create your project
        • Necessarily extensible
  3. Who Cares? (Pros)
      • Promotes code reuse
      • Speed up the coding process by reducing the amount of “ overhead ” code to write, such as:
        • Database access
        • Authentication and session management
        • Data validation and sanitation
        • URL mapping and management
        • Security
      • Code is easier to maintain within an architecture
  4. Cons
      • Fairly steep learning curve
      • Confined to the framework's chosen architecture and idiosyncrasies
      • Slower than pure PHP
      • Too many to choose from
  5. Top 10 PHP Frameworks
      • Yii – 4.46
      • CodeIgniter* – 4.24
      • PHPDevShell
      • CakePHP* – 4.16
      • Akelos
      • Prado
      • Symfony* – 3.93
      • Zend* – 3.9
      • ZooP
      • QPHP* – 2.5
  6. Feature Comparison
  7. In-depth Comparisons
      • CodeIgniter
        • Most light-weight
        • Fastest
        • Fewer features
        • Easiest to learn
        • Great for small projects with a single developer
        • Scalable, flexible
      • CakePHP
        • Light-weight
        • Not as fast as CI
        • More features than CI
        • Not as easy to learn; “ magic ” is hidden
        • Great for small projects w/ single or small dev team
  8. In-depth Comparisons (cont.)
      • Zend
        • Integrates with other frameworks
        • Great support structure
        • Ideal for mid-sized dev teams
        • Handles complex business logic
        • Easy to port code to
      • Symfony
        • Most complex
        • Steepest learning curve
        • More features
        • Ideal for mid- to large-sized teams
          • Not for individuals
        • Highly configurable
  9. MVC
    • Architectural pattern, separates code by function/purpose.
    •   - Model -  Representation of Information/Data
    •   - Controller - (Business) Logic
    •   - View - Output, HTML, javascript..
  10. CodeIgniter
      • Not strictly MVC
      • No assumptions made, no "magic"
      • Simple syntax
        • Can use straight PHP code in most places
      • Everything is based off a "core object"
        • ex. $this->load->model('model_name')
      • $this knows everything about the application, can be used anywhere to access any setting 
      • Easily extendable
        • Large community of 3rd party plugins
      • Great documentation/community
  11. CodeIgniter Database Access
      • Can use regular SQL syntax
      • CI uses a modified version of the Active Record Database Pattern
      • Active Record Database Pattern (in CI)
        • Allows simplified DB access with minimal scripting
        • Database independent (query syntax is generated by the DB adapter)
        •   Queries automatically escaped
      • $this->db->get('my_table');
        • "SELECT * FROM my_table";
  12. CodeIgniter Demo
      • Let's make a task list!
        • Should have imported ci_demo.sql into Nova DB
  13. CakePHP
      • Easy setup
      • Small learning curve (you have to do it the cake way)
      • Function Driven URL structure
      • Strict naming convention
      • Large(est) community
      • Easy DB access
        • Find() method
      • Distributed under the MIT License
      • Scaffolding
  14. cakePHP's URL Structure
    • domain.com/Application/Controller/Action/Param1
    • in traditional php...
    • domain.com/includes/logincheck.php?username=1&pass=2
    • (the 'ACTION' is missing as it is the first thing in the file that you hit/run)
  15. CakePHP's MVC Implementation
    • Dispatcher responds to URL actions
  16. And now some code....
  17. symfony - Background
      • Built by Sensio, Fabien Potencier
      • For large-client needs
        • Means it's big and strong, but tough to get into
      • Heavily Structured
      • Highly Customizable
      • Overkill
      • Used by TED.com, Yahoo Bookmarks, and Current TV.
  18. symfony - MVC Pattern
  19. symfony - Project Structure
      • Project
      • Application
      • Module
      • Action
  20. symfony - Project Structure
  21. symfony - Class Autoloading
      • No need to include classes
      • Instead, symfony caches /lib directories.
      • Uses __autoload() from PHP5
      • Downside: clearing the cache.
  22. Zend - Background
      • Created by the comakers of PHP (Zend)
    •  
      • Suitable for mid-sized projects
    •  
      • Licensed under OSI's BSD License
    •  
      • Technology partners include IBM, Google, Adobe, and Microsoft
  23. Zend - Requirements and Features
      • Requires PHP 5.1.4 or later
    •  
      • Can be configured using PHP arrays, INI files, and XML
    •  
      • Provides support for popular web services including Audioscrobbler,del.icio.us, and Flickr
    •  
      •   Integrates other frameworks
  24. Zend - Project Structure
    • /application
    •     /configs
    •     /controllers
    •         IndexController.php
    •     /layouts
    •     /models
    •     /views
    •         /helpers
    •         /scripts
    •             /index
    •                 index.phtml
    •     Bootstrap.php
    • /library
    • /public
    •     /css
    •     .htaccess
    •     index.php
  25. So why use a framework?
      • Less typing
      • Reusable, helpful methods
      • Most frameworks have (some) built-in security
      • Get a job!

+ Ryan DavisRyan Davis, 5 months ago

custom

882 views, 4 favs, 5 embeds more stats

I was part of this group presentation for my Client more

More info about this document

CC Attribution-ShareAlike LicenseCC Attribution-ShareAlike License

Go to text version

  • Total Views 882
    • 802 on SlideShare
    • 80 from embeds
  • Comments 1
  • Favorites 4
  • Downloads 67
Most viewed embeds
  • 65 views on http://blog.macronimous.com
  • 9 views on http://www.3kits.com
  • 3 views on http://weblow.blogspot.com
  • 2 views on http://3kits.com
  • 1 views on http://www.php.rk.edu.pl

more

All embeds
  • 65 views on http://blog.macronimous.com
  • 9 views on http://www.3kits.com
  • 3 views on http://weblow.blogspot.com
  • 2 views on http://3kits.com
  • 1 views on http://www.php.rk.edu.pl

less

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

Cancel
File a copyright complaint
Having problems? Go to our helpdesk?

Categories