Web-Application development using Zend Frameworkx

excitingwonderlakeInternet and Web Development

Dec 13, 2013 (3 years and 9 months ago)

82 views

W
EB

A
PPLICATIONS

& W
EB

S
ERVICES

DEVELOPMENT

USING

Z
END

F
RAMEWORK




Sayed

Ahmed


B. Sc. Engineering in Computer Science and Engineering

M. Sc. in Computer Science


sayed@justetc.net

1 647

624

8509

http://sayed.justetc.net

http
://www.justetc.com

http://www.justetc.org



O
VERVIEW


Purpose


Web Application Development


Web Services Development


Overview on
Zend

Framework


Based on Object Oriented PHP (100% OOP)


Supports PHP 5.1.4 and later


Based on MVC architecture


Component based


Components can be used almost independently


Uses loosely coupled architecture for the component
architecture


Components when used together create a very powerful and
extensible framework

11/10/2011

2

sayed@justetc.net

O
VERVIEW


Some Features


Simple to use database abstraction layer (
Zend_db
)


Forms component that implements


HTML form rendering


Form validation


Form filtering


Zend_Auth

and
Zend_Acl



provide user authentication and authorization


11/10/2011

3

sayed@justetc.net

Z
END

F
RAMEWORK

Q
UICK

S
TART


Steps


Zend

Framework & MVC Introduction


Create Your Project


Create A Layout


Create a Model and Database Table


Create A Form


11/10/2011

4

sayed@justetc.net

Z
END

F
RAMEWORK

AND

MVC


Zend

has many components that can be used
independently


However, to establish a basic structure for your
Zend

Framework applications


Zend

provides an advanced MVC implementation


Zend

MVC includes components such as


Zend_Controller



Zend_Layout


Zend_Config



Zend_Db


Zend_Db_Table


Zend_Registry

11/10/2011

5

sayed@justetc.net

MVC A
RCHITECTURE

11/10/2011

6

sayed@justetc.net

C
REATE

Y
OUR

P
ROJECT


Install
Zend

Server


http://www.zend.com/en/products/server
-
ce/downloads



Or Download the
Zend

Framework and extract it


http://framework.zend.com/download/latest



Create the project structure


Run the command


%
zf

create project
quickstart


11/10/2011

7

sayed@justetc.net

B
ASIC

PROJECT

S
TRUCTURE

11/10/2011

8

sayed@justetc.net

L
OADING

I
NITIAL

C
OMPONENTS

AND

R
ESOURCES


The Bootstrap class loads the initial resources
and components


application/controllers/

as the default directory
in which to look for action controllers

11/10/2011

9

sayed@justetc.net

I
NITIAL

C
ONFIGURATION

OF

YOUR

APPLICATION


File used


application/
configs
/application.ini

11/10/2011

10

sayed@justetc.net

A
CTION

C
ONTROLLERS

[
I
NDEX
C
ONTROLLER
]


Associated Directory


/controller/action

11/10/2011

11

sayed@justetc.net

E
RROR

C
ONTROLLER

11/10/2011

12

sayed@justetc.net

V
IEWS


Views are written in plain old PHP


View scripts are placed in


application/views/scripts/


And further categorized


using the controller names


Hence, we can create


Sub
-
directories


index/



error/



Within these subdirectories


you will find and create view scripts


that correspond to each controller action exposed


Our default case


index/index.phtml



error/error.phtml
.

11/10/2011

13

sayed@justetc.net

C
REATE

V
IRTUAL

H
OST

11/10/2011

14

sayed@justetc.net

U
PDATE

H
OSTS

F
ILE


C:
\
WINDOWS
\
system32
\
drivers
\
etc


127.0.0.1
quickstart.local

11/10/2011

15

sayed@justetc.net

F
IRE

Y
OUR

A
PPLICATION


Point your browser to the server name


As you configured in the previous section


You will see a welcome page

11/10/2011

16

sayed@justetc.net

R
EFERENCES


http://
framework.zend.com/manual/en/


11/10/2011

17

sayed@justetc.net


http://www.developly.com/creating
-
3
-
step
-
layouts
-
with
-
zendlayout


11/10/2011

18

sayed@justetc.net