Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Get started with Zend Framework
Search
Mohammad Shoriful Islam Ronju
February 26, 2012
Programming
3
170
Get started with Zend Framework
Kick start with zend framework in an easy way.
Mohammad Shoriful Islam Ronju
February 26, 2012
Tweet
Share
Other Decks in Programming
See All in Programming
AmperとFleetを使ったAndroidアプリ
yoppie
0
300
Findy - エンジニア向け会社紹介 / Findy Letter for Engineers
findyinc
2
74k
Slackワークフローで感謝を伝える機能/WiFi 自動接続/Figma to React Component/障害レポート君 Team3@NOT A HOTEL
nakaohiroshi
0
110
Balkan Ruby 2024 — How and why to run SQLite on Rails in production
fractaledmind
0
110
otelcol receiver 自作RTA / Pepabo Tech Conference #22 春のSREまつり
arthur1
0
1k
Using "modern" Ruby to build a better, faster Homebrew
mikemcquaid
2
280
RustでAWS Lambda functionをいい感じに書く
taiki45
2
150
Enjoy Creative Coding with Ruby (RubyKaigi2024)
chobishiba
0
760
TypeScriptで使いやすいOpenAPIの書き方
yukimochi_dwango
1
910
Productivity is Messing Around and Having Fun
hollycummins
1
180
Try creating your own orderedmap
kazamori
1
280
Prepare for Jakarta EE 11 - Performance and Developer Productivity
ivargrimstad
0
310
Featured
See All Featured
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
84
45k
Art, The Web, and Tiny UX
lynnandtonic
290
19k
Music & Morning Musume
bryan
41
5.6k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
8
3.5k
Gamification - CAS2011
davidbonilla
77
4.6k
Done Done
chrislema
178
15k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
18
7k
How GitHub (no longer) Works
holman
305
140k
Teambox: Starting and Learning
jrom
128
8.4k
How To Stay Up To Date on Web Technology
chriscoyier
782
250k
Atom: Resistance is Futile
akmur
260
25k
What’s in a name? Adding method to the madness
productmarketing
PRO
17
2.7k
Transcript
Ge#ng Up & Running with Saidur Rahman
Bijon Shoriful Islam Ronju
Agenda • Overview • MVC • Components
• Environment setup • Your first Zend Framework project • Resources • QA
• Toolbox • Blueprint • Skeleton
What is framework ?
Why Zend Framework • Maintain by PHP Company • Open
Source • Flexible Architecture • ZF CerEficaEon • Partner with
Zend Components Zend_Session Zend_Validate Zend_Auth Zend_Acl
Zend web service v ZEND_FEED v ZEND_GDATA
Environment Setup • Requirements 1. PHP 5.x
2. Web server with mod_rewrite enabled
Environment Setup (ConEnued…) • Zend tool setup (Ubuntu way)
; include_path=${include_path} “:/path/to/libzend- framework-php” // uncomment in /etc/php5/conf.d/zend- framework.ini sudo apt-‐get install zend-‐framework
Environment Setup (ConEnued…) • Zend tool setup (Windows way)
Environment Setup (ConEnued…)
Environment Setup (ConEnued…)
Environment Setup (ConEnued…)
Environment Setup (ConEnued…)
Environment Setup (Continued…) • Zend tool setup verification zf show
version Zend Framework Version: 1.11.10
Your first Zend Framework project zf create project {project-‐name}
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!
ConnecEng to database resources.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 operaEon Create Retrieve Update Delete
Controller zf create controller {name}
Controller <?php class AlbumController extends Zend_Controller_Action{ public function init(){
/* Initialize action controller here */ } public function indexAction(){ /* Your code goes here */ } }
Model zf create model {model-‐name}
Model <?php class Application_Model_Albums extends Zend_Db_Table_Abstract { protected $_name
= 'albums'; public function fName() { /* Your code goes here */ } }
Crud operaEon 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 J 1. Google 2. Amazon 3.
Flickr 4. Yahoo 5. More…. • Web services
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 • hPp://akrabat.com/zend-‐framework-‐tutorial/ • hPp://net.tutsplus.com/tutorials/php/zend-‐framework-‐from-‐scratch/ • hPp://goo.gl/fQLL6
QuesEons & Answers Any Question?