Getting up & running with zend framework
Upcoming SlideShare
Loading in...5
×
 

Getting up & running with zend framework

on

  • 1,330 views

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

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

Statistics

Views

Total Views
1,330
Views on SlideShare
1,330
Embed Views
0

Actions

Likes
1
Downloads
16
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • 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 Getting up & running with zend framework Presentation Transcript

  • 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_path=${include_path} “:/path/to/libzend- framework-php” // uncomment in /etc/php5/conf.d/zend- framework.ini
  • 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 <Directory "/var/www/zf-project/public"> AllowOverride All </Directory></VirtualHost>
  • Tada!
  • 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"
  • Let’s have a CRUD operationCreateRetrieveUpdateDelete
  • Controllerzf create controller {name}
  • Controller<?phpclass AlbumController extends Zend_Controller_Action{ public function init(){ /* Initialize action controller here */ } public function indexAction(){ /* Your code goes here */ }}
  • Modelzf create model {model-name}
  • Model<?phpclass Application_Model_Albums extends Zend_Db_Table_Abstract{ protected $_name = albums; public function fName() { /* Your code goes here */ }}
  • 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); }
  • 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->view->results = $flickr->tagSearch(worldcup’);}
  • 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>
  • Resources• http://akrabat.com/zend-framework-tutorial/• http://net.tutsplus.com/tutorials/php/zend-framework-from-scratch/• http://goo.gl/fQLL6
  • Who we areSaidur Rahman Bijon Shoriful Islam Ronju @somewherein @leevio
  • Questions & Answers Any Question?