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
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
OSS開発者という働き方
andpad
5
1.7k
Android 16 × Jetpack Composeで縦書きテキストエディタを作ろう / Vertical Text Editor with Compose on Android 16
cc4966
2
260
AI時代のUIはどこへ行く?
yusukebe
18
9k
JSONataを使ってみよう Step Functionsが楽しくなる実践テクニック #devio2025
dafujii
1
620
Flutter with Dart MCP: All You Need - 박제창 2025 I/O Extended Busan
itsmedreamwalker
0
150
Laravel Boost 超入門
fire_arlo
3
220
Kiroで始めるAI-DLC
kaonash
2
620
RDoc meets YARD
okuramasafumi
4
170
アセットのコンパイルについて
ojun9
0
130
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
410
CJK and Unicode From a PHP Committer
youkidearitai
PRO
0
110
プロポーザル駆動学習 / Proposal-Driven Learning
mackey0225
2
1.3k
Featured
See All Featured
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
GitHub's CSS Performance
jonrohan
1032
460k
The Straight Up "How To Draw Better" Workshop
denniskardys
236
140k
For a Future-Friendly Web
brad_frost
180
9.9k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
229
22k
Six Lessons from altMBA
skipperchong
28
4k
Faster Mobile Websites
deanohume
309
31k
GraphQLの誤解/rethinking-graphql
sonatard
72
11k
It's Worth the Effort
3n
187
28k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
36
2.5k
Typedesign – Prime Four
hannesfritz
42
2.8k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
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?