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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Mohammad Shoriful Islam Ronju
February 26, 2012
Programming
3
180
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
Java 21/25 Virtual Threads 소개
debop
0
280
モダンOBSプラグイン開発
umireon
0
180
20260320登壇資料
pharct
0
130
Agentic AI: Evolution oder Revolution
mobilelarson
PRO
0
200
Nuxt Server Components
wattanx
0
140
Ruby and LLM Ecosystem 2nd
koic
1
1.3k
仕様漏れ実装漏れをなくすトレーサビリティAI基盤のご紹介
orgachem
PRO
7
3.2k
GC言語のWasm化とComponent Modelサポートの実践と課題 - Scalaの場合
tanishiking
0
130
どんと来い、データベース信頼性エンジニアリング / Introduction to DBRE
nnaka2992
1
340
生成 AI 時代のスナップショットテストってやつを見せてあげますよ(α版)
ojun9
0
310
条件判定に名前、つけてますか? #phperkaigi #c
77web
2
840
RailsのValidatesをSwift Macrosで再現してみた
hokuron
0
140
Featured
See All Featured
Automating Front-end Workflow
addyosmani
1370
200k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
The Pragmatic Product Professional
lauravandoore
37
7.2k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
55k
Darren the Foodie - Storyboard
khoart
PRO
3
3k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.4k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
150
Between Models and Reality
mayunak
2
240
Tell your own story through comics
letsgokoyo
1
870
Technical Leadership for Architectural Decision Making
baasie
3
300
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
290
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
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?