18
WEB APPLICATIONS & WEB SERVICES DEVELOPMENT USING ZEND FRAMEWORK Sayed Ahmed B. Sc. Engineering in Computer Science and Engineering M. Sc. in Computer Science [email protected] 1 647–624–8509 http://sayed.justetc.net http ://www.justetc.com http://www.justetc.org

Web Applications & Web Services development using Zend Framework

  • Upload
    halona

  • View
    27

  • Download
    0

Embed Size (px)

DESCRIPTION

Web Applications & Web Services development using Zend Framework. Sayed Ahmed B. Sc. Engineering in Computer Science and Engineering M. Sc. in Computer Science [email protected] 1 647–624–8509 http://sayed.justetc.net http ://www.justetc.com http://www.justetc.org. Overview. Purpose - PowerPoint PPT Presentation

Citation preview

Page 1: Web Applications & Web Services development using  Zend  Framework

WEB APPLICATIONS & WEB SERVICES DEVELOPMENT USING ZEND FRAMEWORK

Sayed Ahmed

B. Sc. Engineering in Computer Science and EngineeringM. Sc. in Computer Science

[email protected] 647–624–8509http://sayed.justetc.nethttp://www.justetc.comhttp://www.justetc.org

Page 2: Web Applications & Web Services development using  Zend  Framework

2

[email protected]

OVERVIEW 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

Page 3: Web Applications & Web Services development using  Zend  Framework

3

[email protected]

OVERVIEW 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

Page 4: Web Applications & Web Services development using  Zend  Framework

4

[email protected]

ZEND FRAMEWORK QUICK START Steps

Zend Framework & MVC Introduction Create Your Project Create A Layout Create a Model and Database Table Create A Form

11/10/2011

Page 5: Web Applications & Web Services development using  Zend  Framework

5

[email protected]

ZEND FRAMEWORK 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

Page 6: Web Applications & Web Services development using  Zend  Framework

6

[email protected]

MVC ARCHITECTURE11/10/2011

Page 7: Web Applications & Web Services development using  Zend  Framework

7

[email protected]

CREATE YOUR PROJECT 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

Page 8: Web Applications & Web Services development using  Zend  Framework

8

[email protected]

BASIC PROJECT STRUCTURE11/10/2011

Page 9: Web Applications & Web Services development using  Zend  Framework

9

[email protected]

LOADING INITIAL COMPONENTS AND RESOURCES 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

Page 10: Web Applications & Web Services development using  Zend  Framework

10

[email protected]

INITIAL CONFIGURATION OF YOUR APPLICATION File used

application/configs/application.ini 11/10/2011

Page 11: Web Applications & Web Services development using  Zend  Framework

11

[email protected]

ACTION CONTROLLERS [INDEXCONTROLLER] Associated Directory

/controller/action 11/10/2011

Page 12: Web Applications & Web Services development using  Zend  Framework

12

[email protected]

ERROR CONTROLLER11/10/2011

Page 13: Web Applications & Web Services development using  Zend  Framework

13

[email protected]

VIEWS 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

Page 14: Web Applications & Web Services development using  Zend  Framework

14

[email protected]

CREATE VIRTUAL HOST11/10/2011

Page 15: Web Applications & Web Services development using  Zend  Framework

15

[email protected]

UPDATE HOSTS FILE C:\WINDOWS\system32\drivers\etc

127.0.0.1 quickstart.local

11/10/2011

Page 16: Web Applications & Web Services development using  Zend  Framework

16

[email protected]

FIRE YOUR APPLICATION Point your browser to the server name

As you configured in the previous section You will see a welcome page

11/10/2011

Page 17: Web Applications & Web Services development using  Zend  Framework

17

[email protected]

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

11/10/2011