Getting Up & Running with
Agenda• Overview• MVC• Components• Environment setup• Your first Zend Framework project• Resources• QA
What is framework ?• Toolbox• Blueprint• Skeleton
Why Zend Framework•Maintain by PHP Company•Open Source•Flexible Architecture• ZF Certification•Partner with
Zend Framework – Architecture• MVC design pattern• Front Controller pattern• Component Based• Loosely couple
Zend Components                    Zend_Validate                    Zend_AuthZend_Acl  ZEND_FORM     Zend_Session
Zend web services – Components                                 ZEND_GDATA                                 ZEND_FEED
Environment Setup• Requirements   1.   PHP 5.x   2.   Web server with mod_rewrite enabled
Environment Setup (Continued…)• Zend tool setup (Ubuntu way)       sudo apt-get install zend-framework       ; include_pat...
Environment Setup (Continued…)• Zend tool setup (Windows way)
Environment Setup (Continued…)
Environment Setup (Continued…)
Environment Setup (Continued…)
Environment Setup (Continued…)
Environment Setup (Continued…)• Zend tool setup verification   zf show version           Zend Framework Version: 1.11.10
Your first Zend Framework projectzf create project {project-name}
Your first Zend Framework project
Project structure
Create Virtual host<VirtualHost *:80>       ServerName local.sitename.com       DocumentRoot /var/www/zf-project/public   ...
Tada!
Connecting to databaseresources.db.adapter = "Pdo_Mysql”resources.db.params.host = ”HostName"resources.db.params.username ...
Let’s have a CRUD operationCreateRetrieveUpdateDelete
Controllerzf create controller {name}
Controller<?phpclass AlbumController extends Zend_Controller_Action{    public function init(){        /* Initialize actio...
Modelzf create model {model-name}
Model<?phpclass Application_Model_Albums extends Zend_Db_Table_Abstract{   protected $_name = albums;    public function f...
Crud operation           public function addAlbum($data) {                     $this->insert($data);           }          ...
Zend Frameworks Gems • Web services   1.   Google   2.   Amazon   3.   Flickr   4.   Yahoo   5.   More….
Zend web service (flickr)
Zend web service (flickr)public function flickrAction(){     $flickr = new Zend_Service_Flickr(’YourAPIKey);     $this->vi...
Zend web service (flickr)<ul>  <?php foreach ($this->results as $result){        $photo = $result->Square; ?>        <li><...
Resources•   http://akrabat.com/zend-framework-tutorial/•   http://net.tutsplus.com/tutorials/php/zend-framework-from-scra...
Who we areSaidur Rahman Bijon   Shoriful Islam Ronju     @somewherein                  @leevio
Questions & Answers   Any Question?
Upcoming SlideShare
Loading in...5
×

Getting up & running with zend framework

1,059

Published on

Why should we use Zend framework and how we set up the zend framework

Published in: Technology, Education
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,059
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
18
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide
  • Zend tool setup for linuxand windows
  • Zend tool setup for linuxand windows
  • Zend tool setup for linuxand windows
  • Zend tool setup for linuxand windows
  • Zend tool setup for linuxand windows
  • Zend tool setup for linuxand windows
  • Zend tool setup for linuxand windows
  • Getting up & running with zend framework

    1. 1. Getting Up & Running with
    2. 2. Agenda• Overview• MVC• Components• Environment setup• Your first Zend Framework project• Resources• QA
    3. 3. What is framework ?• Toolbox• Blueprint• Skeleton
    4. 4. Why Zend Framework•Maintain by PHP Company•Open Source•Flexible Architecture• ZF Certification•Partner with
    5. 5. Zend Framework – Architecture• MVC design pattern• Front Controller pattern• Component Based• Loosely couple
    6. 6. Zend Components Zend_Validate Zend_AuthZend_Acl ZEND_FORM Zend_Session
    7. 7. Zend web services – Components ZEND_GDATA ZEND_FEED
    8. 8. Environment Setup• Requirements 1. PHP 5.x 2. Web server with mod_rewrite enabled
    9. 9. Environment Setup (Continued…)• Zend tool setup (Ubuntu way) sudo apt-get install zend-framework ; include_path=${include_path} “:/path/to/libzend- framework-php” // uncomment in /etc/php5/conf.d/zend- framework.ini
    10. 10. Environment Setup (Continued…)• Zend tool setup (Windows way)
    11. 11. Environment Setup (Continued…)
    12. 12. Environment Setup (Continued…)
    13. 13. Environment Setup (Continued…)
    14. 14. Environment Setup (Continued…)
    15. 15. Environment Setup (Continued…)• Zend tool setup verification zf show version Zend Framework Version: 1.11.10
    16. 16. Your first Zend Framework projectzf create project {project-name}
    17. 17. Your first Zend Framework project
    18. 18. Project structure
    19. 19. Create Virtual host<VirtualHost *:80> ServerName local.sitename.com DocumentRoot /var/www/zf-project/public <Directory "/var/www/zf-project/public"> AllowOverride All </Directory></VirtualHost>
    20. 20. Tada!
    21. 21. Connecting to databaseresources.db.adapter = "Pdo_Mysql”resources.db.params.host = ”HostName"resources.db.params.username = ”UserName"resources.db.params.password = ”Password"resources.db.params.dbname = ”DbName"
    22. 22. Let’s have a CRUD operationCreateRetrieveUpdateDelete
    23. 23. Controllerzf create controller {name}
    24. 24. Controller<?phpclass AlbumController extends Zend_Controller_Action{ public function init(){ /* Initialize action controller here */ } public function indexAction(){ /* Your code goes here */ }}
    25. 25. Modelzf create model {model-name}
    26. 26. Model<?phpclass Application_Model_Albums extends Zend_Db_Table_Abstract{ protected $_name = albums; public function fName() { /* Your code goes here */ }}
    27. 27. Crud operation public function addAlbum($data) { $this->insert($data); } public function updateAlbum($data, $where) { $this->update($data, $where); } public function deleteAlbum($where) { $this->delete($where); }
    28. 28. Zend Frameworks Gems • Web services 1. Google 2. Amazon 3. Flickr 4. Yahoo 5. More….
    29. 29. Zend web service (flickr)
    30. 30. Zend web service (flickr)public function flickrAction(){ $flickr = new Zend_Service_Flickr(’YourAPIKey); $this->view->results = $flickr->tagSearch(worldcup’);}
    31. 31. Zend web service (flickr)<ul> <?php foreach ($this->results as $result){ $photo = $result->Square; ?> <li><a href="<?php echo $photo->ClickUri ?>"> <img src="<?php echo $photo->uri ?>" alt="image"/> </a> </li> <?php } ?></ul>
    32. 32. Resources• http://akrabat.com/zend-framework-tutorial/• http://net.tutsplus.com/tutorials/php/zend-framework-from-scratch/• http://goo.gl/fQLL6
    33. 33. Who we areSaidur Rahman Bijon Shoriful Islam Ronju @somewherein @leevio
    34. 34. Questions & Answers Any Question?
    1. A particular slide catching your eye?

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

    ×