SlideShare una empresa de Scribd logo
1 de 12
Zend Framework QuickZend Framework Quick
startstart
Bally chohanBally chohan
IT SolutionIT Solution
Zend Framework quick start byZend Framework quick start by
Bally chohan IT SolutionBally chohan IT Solution
1.1. Design patternsDesign patterns
2.2. MVC design patternsMVC design patterns
3.3. Directory StructureDirectory Structure
4.4. BootstrapBootstrap
5.5. Hello world exampleHello world example
Design with Bally Chohan – Develop with Bally Chohan – Code with Bally chohan – Test with Bally Chohan – UAT with Bally chohanDesign with Bally Chohan – Develop with Bally Chohan – Code with Bally chohan – Test with Bally Chohan – UAT with Bally chohan
Design patterns by Bally ChohanDesign patterns by Bally Chohan
  a a design patterndesign pattern is a general reusable is a general reusable
solution to a commonly occurring problem insolution to a commonly occurring problem in
software design.software design.
((en.wikipedia.org/wiki/Design_pattern_(compen.wikipedia.org/wiki/Design_pattern_(comp
uter_science)uter_science)
Design with Bally Chohan – Develop with Bally Chohan – Code with Bally chohan – Test with Bally Chohan – UAT with Bally chohanDesign with Bally Chohan – Develop with Bally Chohan – Code with Bally chohan – Test with Bally Chohan – UAT with Bally chohan
MVC design patterns by BallyMVC design patterns by Bally
Chohan IT SolutionChohan IT Solution
Model-View-Controller (MVC) is a design
pattern that simplifies application
development and maintenance.
1. Model: Responsible for the business logic of an
application
2. View: Typically what would be considered web
design, or templating.
3. Controller: The controller layer glues everything
together.
Design with Bally Chohan – Develop with Bally Chohan – Code with Bally chohan – Test with Bally Chohan – UAT with Bally chohanDesign with Bally Chohan – Develop with Bally Chohan – Code with Bally chohan – Test with Bally Chohan – UAT with Bally chohan
Directory structure by BallyDirectory structure by Bally
chohan IT Solutionchohan IT Solution
Bootstrap (index.php) by BallyBootstrap (index.php) by Bally
Chohan IT SolutionChohan IT Solution
Hello world with ZF MVC – byHello world with ZF MVC – by
Bally Chohan Bally ChohanBally Chohan Bally Chohan
We have done basic configuration.We have done basic configuration.
It time to have fun….It time to have fun….
In yourIn your
application/controllers/IndexController.phpapplication/controllers/IndexController.php
<?<?
class IndexController extends Zend_Ctontroller_Actionclass IndexController extends Zend_Ctontroller_Action
{{
public function indexAction()public function indexAction()
{{
}}
}}
?>?>
Design with Bally Chohan – Develop with Bally Chohan – Code with Bally chohan – Test with Bally Chohan – UAT with Bally chohanDesign with Bally Chohan – Develop with Bally Chohan – Code with Bally chohan – Test with Bally Chohan – UAT with Bally chohan
Hello world cont… by BallyHello world cont… by Bally
chohan IT Solutionchohan IT Solution
Next in your application/views/Next in your application/views/
Create views/index/index.phtmlCreate views/index/index.phtml
And writeAnd write
<html><html>
<body><body>
Hello world…………..Hello world…………..
</body></body>
</html></html>
Using Models – Bally chohanUsing Models – Bally chohan
In application/modelsIn application/models
WriteWrite
<?<?
class Mathclass Math
{{
public function __construct()public function __construct()
{{
}}
public function sum($val1,$val2)public function sum($val1,$val2)
{{
return $val1 + $val2;return $val1 + $val2;
}}
}}
?>?>
Model cont.. By Bally ChohanModel cont.. By Bally Chohan
Now in controller, writeNow in controller, write
<?<?
class IndexController extends Zend_Ctontroller Actionclass IndexController extends Zend_Ctontroller Action
{{
public function indexAction()public function indexAction()
{{
$math = new Math();$math = new Math();
$sum = $math->sum(5,10);$sum = $math->sum(5,10);
$this->view->sum=$sum;$this->view->sum=$sum;
}}
}}
?>?>
Design with Bally Chohan – Develop with Bally Chohan – Code with Bally chohan – Test with Bally Chohan – UAT with Bally chohanDesign with Bally Chohan – Develop with Bally Chohan – Code with Bally chohan – Test with Bally Chohan – UAT with Bally chohan
Example cont…Example cont…
And finally in yourAnd finally in your
view(application/view/scripts/index/index.phtview(application/view/scripts/index/index.pht
ml)ml)
Write,Write,
<?<?
echo ‘sum is ’ . $this->sum;echo ‘sum is ’ . $this->sum;
?>?>
ThanksThanks
Next…..Next…..
Two step viewTwo step view
Zend_Db_ConfigurationZend_Db_Configuration
And many more…..And many more…..
Bally Chohan IT SolutionBally Chohan IT Solution
http://www.ballychohan.comhttp://www.ballychohan.com

Más contenido relacionado

Similar a Bally Chohan : ZEND Framework Quick Tutor

Behavior & Specification Driven Development in PHP - #OpenWest
Behavior & Specification Driven Development in PHP - #OpenWestBehavior & Specification Driven Development in PHP - #OpenWest
Behavior & Specification Driven Development in PHP - #OpenWest
Joshua Warren
 
Running an Open-Source CodeIgniter project
Running an Open-Source CodeIgniter projectRunning an Open-Source CodeIgniter project
Running an Open-Source CodeIgniter project
Phil Sturgeon
 
2010 06-24 karlsruher entwicklertag
2010 06-24 karlsruher entwicklertag2010 06-24 karlsruher entwicklertag
2010 06-24 karlsruher entwicklertag
Marcel Bruch
 
BADCamp 2012 -Beginner Best Practices
BADCamp 2012 -Beginner Best PracticesBADCamp 2012 -Beginner Best Practices
BADCamp 2012 -Beginner Best Practices
meghsweet
 

Similar a Bally Chohan : ZEND Framework Quick Tutor (20)

01 Introduction to programming
01 Introduction to programming01 Introduction to programming
01 Introduction to programming
 
Zend Framework Modular Project Setup
Zend Framework Modular Project SetupZend Framework Modular Project Setup
Zend Framework Modular Project Setup
 
Using Clojure, NoSQL Databases and Functional-Style JavaScript to Write Gext-...
Using Clojure, NoSQL Databases and Functional-Style JavaScript to Write Gext-...Using Clojure, NoSQL Databases and Functional-Style JavaScript to Write Gext-...
Using Clojure, NoSQL Databases and Functional-Style JavaScript to Write Gext-...
 
There and Back Again (My DevOps journey) - DevOps Days Copenhagen 2018
There and Back Again (My DevOps journey) - DevOps Days Copenhagen 2018There and Back Again (My DevOps journey) - DevOps Days Copenhagen 2018
There and Back Again (My DevOps journey) - DevOps Days Copenhagen 2018
 
Web Development Foundation & Team Collaboration
Web Development Foundation & Team CollaborationWeb Development Foundation & Team Collaboration
Web Development Foundation & Team Collaboration
 
Developing Java Web Applications
Developing Java Web ApplicationsDeveloping Java Web Applications
Developing Java Web Applications
 
Vhdl design flow
Vhdl design flowVhdl design flow
Vhdl design flow
 
Top 50 Interview Questions and Answers in CakePHP
Top 50 Interview Questions and Answers in CakePHPTop 50 Interview Questions and Answers in CakePHP
Top 50 Interview Questions and Answers in CakePHP
 
Behavior & Specification Driven Development in PHP - #OpenWest
Behavior & Specification Driven Development in PHP - #OpenWestBehavior & Specification Driven Development in PHP - #OpenWest
Behavior & Specification Driven Development in PHP - #OpenWest
 
Blugsphere2011 dev
Blugsphere2011 devBlugsphere2011 dev
Blugsphere2011 dev
 
Enterprise PHP (PHP London Conference 2008)
Enterprise PHP (PHP London Conference 2008)Enterprise PHP (PHP London Conference 2008)
Enterprise PHP (PHP London Conference 2008)
 
CICON2010: Phil Sturgeon - Running an Open-Source CodeIgniter project
CICON2010: Phil Sturgeon - Running an Open-Source CodeIgniter projectCICON2010: Phil Sturgeon - Running an Open-Source CodeIgniter project
CICON2010: Phil Sturgeon - Running an Open-Source CodeIgniter project
 
Running an Open-Source CodeIgniter project
Running an Open-Source CodeIgniter projectRunning an Open-Source CodeIgniter project
Running an Open-Source CodeIgniter project
 
Install-Doc-BIP.docx
Install-Doc-BIP.docxInstall-Doc-BIP.docx
Install-Doc-BIP.docx
 
Run Bokeh in back-end, draw real-time charts to front-end, and make data sc...
Run Bokeh in back-end,  draw real-time charts to front-end,  and make data sc...Run Bokeh in back-end,  draw real-time charts to front-end,  and make data sc...
Run Bokeh in back-end, draw real-time charts to front-end, and make data sc...
 
2010 06-24 karlsruher entwicklertag
2010 06-24 karlsruher entwicklertag2010 06-24 karlsruher entwicklertag
2010 06-24 karlsruher entwicklertag
 
Infrastructure is development
Infrastructure is developmentInfrastructure is development
Infrastructure is development
 
Dolibarr information for developers - Christmas devcamp in Valence
Dolibarr information for developers - Christmas devcamp in ValenceDolibarr information for developers - Christmas devcamp in Valence
Dolibarr information for developers - Christmas devcamp in Valence
 
BADCamp 2012 -Beginner Best Practices
BADCamp 2012 -Beginner Best PracticesBADCamp 2012 -Beginner Best Practices
BADCamp 2012 -Beginner Best Practices
 
Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-13-66-123-168
Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-13-66-123-168Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-13-66-123-168
Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-13-66-123-168
 

Último

Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 

Último (20)

On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 

Bally Chohan : ZEND Framework Quick Tutor

  • 1. Zend Framework QuickZend Framework Quick startstart Bally chohanBally chohan IT SolutionIT Solution
  • 2. Zend Framework quick start byZend Framework quick start by Bally chohan IT SolutionBally chohan IT Solution 1.1. Design patternsDesign patterns 2.2. MVC design patternsMVC design patterns 3.3. Directory StructureDirectory Structure 4.4. BootstrapBootstrap 5.5. Hello world exampleHello world example Design with Bally Chohan – Develop with Bally Chohan – Code with Bally chohan – Test with Bally Chohan – UAT with Bally chohanDesign with Bally Chohan – Develop with Bally Chohan – Code with Bally chohan – Test with Bally Chohan – UAT with Bally chohan
  • 3. Design patterns by Bally ChohanDesign patterns by Bally Chohan   a a design patterndesign pattern is a general reusable is a general reusable solution to a commonly occurring problem insolution to a commonly occurring problem in software design.software design. ((en.wikipedia.org/wiki/Design_pattern_(compen.wikipedia.org/wiki/Design_pattern_(comp uter_science)uter_science) Design with Bally Chohan – Develop with Bally Chohan – Code with Bally chohan – Test with Bally Chohan – UAT with Bally chohanDesign with Bally Chohan – Develop with Bally Chohan – Code with Bally chohan – Test with Bally Chohan – UAT with Bally chohan
  • 4. MVC design patterns by BallyMVC design patterns by Bally Chohan IT SolutionChohan IT Solution Model-View-Controller (MVC) is a design pattern that simplifies application development and maintenance. 1. Model: Responsible for the business logic of an application 2. View: Typically what would be considered web design, or templating. 3. Controller: The controller layer glues everything together. Design with Bally Chohan – Develop with Bally Chohan – Code with Bally chohan – Test with Bally Chohan – UAT with Bally chohanDesign with Bally Chohan – Develop with Bally Chohan – Code with Bally chohan – Test with Bally Chohan – UAT with Bally chohan
  • 5. Directory structure by BallyDirectory structure by Bally chohan IT Solutionchohan IT Solution
  • 6. Bootstrap (index.php) by BallyBootstrap (index.php) by Bally Chohan IT SolutionChohan IT Solution
  • 7. Hello world with ZF MVC – byHello world with ZF MVC – by Bally Chohan Bally ChohanBally Chohan Bally Chohan We have done basic configuration.We have done basic configuration. It time to have fun….It time to have fun…. In yourIn your application/controllers/IndexController.phpapplication/controllers/IndexController.php <?<? class IndexController extends Zend_Ctontroller_Actionclass IndexController extends Zend_Ctontroller_Action {{ public function indexAction()public function indexAction() {{ }} }} ?>?> Design with Bally Chohan – Develop with Bally Chohan – Code with Bally chohan – Test with Bally Chohan – UAT with Bally chohanDesign with Bally Chohan – Develop with Bally Chohan – Code with Bally chohan – Test with Bally Chohan – UAT with Bally chohan
  • 8. Hello world cont… by BallyHello world cont… by Bally chohan IT Solutionchohan IT Solution Next in your application/views/Next in your application/views/ Create views/index/index.phtmlCreate views/index/index.phtml And writeAnd write <html><html> <body><body> Hello world…………..Hello world………….. </body></body> </html></html>
  • 9. Using Models – Bally chohanUsing Models – Bally chohan In application/modelsIn application/models WriteWrite <?<? class Mathclass Math {{ public function __construct()public function __construct() {{ }} public function sum($val1,$val2)public function sum($val1,$val2) {{ return $val1 + $val2;return $val1 + $val2; }} }} ?>?>
  • 10. Model cont.. By Bally ChohanModel cont.. By Bally Chohan Now in controller, writeNow in controller, write <?<? class IndexController extends Zend_Ctontroller Actionclass IndexController extends Zend_Ctontroller Action {{ public function indexAction()public function indexAction() {{ $math = new Math();$math = new Math(); $sum = $math->sum(5,10);$sum = $math->sum(5,10); $this->view->sum=$sum;$this->view->sum=$sum; }} }} ?>?> Design with Bally Chohan – Develop with Bally Chohan – Code with Bally chohan – Test with Bally Chohan – UAT with Bally chohanDesign with Bally Chohan – Develop with Bally Chohan – Code with Bally chohan – Test with Bally Chohan – UAT with Bally chohan
  • 11. Example cont…Example cont… And finally in yourAnd finally in your view(application/view/scripts/index/index.phtview(application/view/scripts/index/index.pht ml)ml) Write,Write, <?<? echo ‘sum is ’ . $this->sum;echo ‘sum is ’ . $this->sum; ?>?>
  • 12. ThanksThanks Next…..Next….. Two step viewTwo step view Zend_Db_ConfigurationZend_Db_Configuration And many more…..And many more….. Bally Chohan IT SolutionBally Chohan IT Solution http://www.ballychohan.comhttp://www.ballychohan.com