12
Zend Framework Zend Framework Quick start Quick start Bally chohan Bally chohan Technical Architecht Technical Architecht

Bally chohan Open Source - Bally Chohan Zend Frame Work - Bally chohan Browser Plugins - Bally Chohan

  • Upload
    dubai

  • View
    889

  • Download
    1

Embed Size (px)

Citation preview

Page 1: Bally chohan Open Source - Bally Chohan Zend Frame Work - Bally chohan Browser Plugins - Bally Chohan

Zend Framework Zend Framework Quick startQuick start

Bally chohanBally chohan

Technical ArchitechtTechnical Architecht

Page 2: Bally chohan Open Source - Bally Chohan Zend Frame Work - Bally chohan Browser Plugins - Bally Chohan

Zend Framework quick start Zend Framework quick start by Bally chohanby Bally chohan

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

Page 3: Bally chohan Open Source - Bally Chohan Zend Frame Work - Bally chohan Browser Plugins - Bally Chohan

Design patterns by Bally Design patterns by Bally ChohanChohan

  a a design patterndesign pattern is a general reusable  is a general reusable solution to a commonly occurring solution to a commonly occurring problem in software design.problem in software design.

((en.wikipedia.org/en.wikipedia.org/wiki/Design_pattern_(computer_science)wiki/Design_pattern_(computer_science)

Design with Bally Chohan – Develop with Bally Chohan – Code with Bally chohan – Test with Bally Chohan – UAT with Bally Design with Bally Chohan – Develop with Bally Chohan – Code with Bally chohan – Test with Bally Chohan – UAT with Bally chohanchohan

Page 4: Bally chohan Open Source - Bally Chohan Zend Frame Work - Bally chohan Browser Plugins - Bally Chohan

MVC design patterns by Bally MVC design patterns by Bally ChohanChohan

Model-View-Controller (MVC) is a designpattern that simplifies applicationdevelopment and maintenance.1. Model: Responsible for the business logic of an

application2. 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

Page 5: Bally chohan Open Source - Bally Chohan Zend Frame Work - Bally chohan Browser Plugins - Bally Chohan

Directory structure by Bally Directory structure by Bally chohanchohan

Page 6: Bally chohan Open Source - Bally Chohan Zend Frame Work - Bally chohan Browser Plugins - Bally Chohan

Bootstrap (index.php) by Bootstrap (index.php) by Bally ChohanBally Chohan

Page 7: Bally chohan Open Source - Bally Chohan Zend Frame Work - Bally chohan Browser Plugins - Bally Chohan

Hello world with ZF MVC – by Hello world with ZF MVC – by Bally ChohanBally Chohan

We have done basic configuration.We have done basic configuration.It time to have fun….It time to have fun….In your In 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

Page 8: Bally chohan Open Source - Bally Chohan Zend Frame Work - Bally chohan Browser Plugins - Bally Chohan

Hello world cont… by Bally Hello world cont… by Bally chohanchohan

Next in your application/views/Next in your application/views/Create views/index/index.phtmlCreate views/index/index.phtmlAnd writeAnd write<html><html><body><body>Hello world…………..Hello world…………..</body></body></html></html>

Page 9: Bally chohan Open Source - Bally Chohan Zend Frame Work - Bally chohan Browser Plugins - Bally Chohan

Using Models – Bally chohanUsing Models – Bally chohan

In application/modelsIn application/modelsWriteWrite<?<?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;}}

} } ?>?>

Page 10: Bally chohan Open Source - Bally Chohan Zend Frame Work - Bally chohan Browser Plugins - Bally Chohan

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 Design with Bally Chohan – Develop with Bally Chohan – Code with Bally chohan – Test with Bally Chohan – UAT with Bally chohanchohan

Page 11: Bally chohan Open Source - Bally Chohan Zend Frame Work - Bally chohan Browser Plugins - Bally Chohan

Example cont…Example cont…

And finally in your And finally in your view(application/view/scripts/index/indview(application/view/scripts/index/index.phtml)ex.phtml)

Write,Write,

<?<?

echo ‘sum is ’ . $this->sum;echo ‘sum is ’ . $this->sum;

?>?>

Page 12: Bally chohan Open Source - Bally Chohan Zend Frame Work - Bally chohan Browser Plugins - Bally Chohan

ThanksThanks

Next…..Next…..

Two step viewTwo step view

Zend_Db_ConfigurationZend_Db_Configuration

And many more…..And many more…..

Bally ChohanBally Chohan

5Technical Architect5Technical Architect