zend framework quick start
Download
Skip this Video
Download Presentation
Zend Framework Quick start

Loading in 2 Seconds...

play fullscreen
1 / 12

Zend Framework Quick start - PowerPoint PPT Presentation


  • 165 Views
  • Uploaded on

Zend Framework Quick start. Faheem Abbas Software engineer. Zend Framework quick start. Design patterns MVC design patterns Directory Structure Bootstrap Hello world example. Design patterns.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' Zend Framework Quick start' - mathilde-martinez


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
zend framework quick start

Zend Framework Quick start

Faheem Abbas

Software engineer

zend framework quick start1
Zend Framework quick start
  • Design patterns
  • MVC design patterns
  • Directory Structure
  • Bootstrap
  • Hello world example
design patterns
Design patterns

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

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

mvc design patterns
MVC design patterns

Model-View-Controller (MVC) is a design

pattern that simplifies application

development and maintenance.

  • Model: Responsible for the business logic of an application
  • View: Typically what would be considered web design, or templating.
  • Controller: The controller layer glues everything together.
hello world with zf mvc
Hello world with ZF MVC

We have done basic configuration.

It time to have fun….

In your application/controllers/IndexController.php

<?

class IndexController extends Zend_Ctontroller_Action

{

public function indexAction()

{

}

}

?>

hello world cont
Hello world cont…

Next in your application/views/

Create views/index/index.phtml

And write

<html>

<body>

Hello world…………..

</body>

</html>

using models
Using Models

In application/models

Write

<?

class Math

{

public function __construct()

{

}

public function sum($val1,$val2)

{

return $val1 + $val2;

}

}

?>

model cont
Model cont..

Now in controller, write

<?

class IndexController extends Zend_Ctontroller Action

{

public function indexAction()

{

$math = new Math();

$sum = $math->sum(5,10);

$this->view->sum=$sum;

}

}

?>

example cont
Example cont…

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

Write,

<?

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

?>

thanks
Thanks

Next…..

Two step view

Zend_Db_Configuration

And many more…..

Faheem Abbas

Software engineer

ad