Você está na página 1de 31

Introduction to Zend

Framework
Rama Yurindra
Zend Team – Indonesia, Malaysia & Singapore

Riki Risnandar, ZCE


Zend Team – Indonesia, Malaysia & Singapore

Copyright © 2007, Zend Technologies Inc.


Our topic about
Zend Framework
What is Framework ?
Why and should i use it ?
How it works ?
Zend Framework Modules
Hands on ZF Installation
QA
What is Framework ?

A software framework is a reusable design for a software system


(or subsystem).

A software framework may include support programs, code


libraries, a scripting language, or other software to help
develop and glue together the different components of a
software project. Various parts of the framework may be
exposed through an application programming interface
(API).

http://en.wikipedia.org
Should i use a framework ?

Application (CMS, Small


PHP to Medium Size)
Should i use a framework ?

Old Application Structure

Functions separated in
many files

•Hard to Maintain
Different •No Standardization
Coding Style
•Hard to documented
Application
not •Lots of mistakes in
structured Team Collaboration

Classes not
organized
Should i use a framework ?

Enterprise Application
PHP
Framework Overview ?
FRAMEWORK PRODUCTIVITY
•Easy to maintain
•Easy to use and documented
clearly
•Lots of Functions & Classes
Functions which is ready to use
library Classes more •Faster development
organized
•Structured Directory & File
repository
•Coding Standard
Structured Team
Application Colaboration

File and Coding


Directory Standardization
place is tidy
• PHP 5 open-source web framework

• Object-oriented, unit-tests required,


& focused on best practices for
modern web apps

• Follows principle of “extreme


simplicity,” making it easy to learn
and easy to use for developers

• Community-based—led by team at
Zend

• Open-source process, hosted at


http://framework.zend.com under a
business-friendly new BSD license

• Corporate contributions:
Rich Internet Applications with PHP Feb-20-08 | Page 3
What is Zend Framework ?

Open Source PHP Framework, based on MVC and


supported by Zend Technologies as PHP Company.

Until now, Zend Framework still developed and


maintained by the PHP community from all around
the world.

MVC = Separation between Model/Data, View (html)


and Controller /Application traffic
Inside Zend Framework

1. Based on the latest PHP engine, version 5 for


simplicity and security
2. Open Source (BSD License, Free for development
and distribution)
3. Collection of Class Library and ready to use
4. Complete Documentation
5. Can be modified as needed
6. No Complex XML Configuration
How it works ?

MVC (Model View Controller)

Data Model
View
Database Table

HTML Script
Controlle
r OR

Template Engine
(MiniTemplator,Smarty,PhpBB.
etc)

News Module Accounting Module


Zend Framework Architecture

Rich Internet Applications with PHP Feb-20-08 | Page 4


Demo

Copyright © 2007, Zend Technologies Inc.


Thanks!

Copyright © 2007, Zend Technologies Inc.


Zend Framework

Riki Risnandar, ZCE


Zend Team Indonesia
PT.Rynet Cipta Teknologi
Zend Framework Modules

1. MVC (Zend_Controller, Zend_Json, Zend_View)


2. Database (IBM DB2, Oracle, MS SQL, PostgreSQL,
MySQL & SQLite)
3. DB_Profiler,DB_Select,DB_Table
4. International and Localization Solution(Date,Translate,
etc)
Zend Framework Modules

5. Authentication (ACL, Auth, Session)


6. Access popular Web Services (Feed, Gdata, Service
amazon,yahoo,flickr, XmlRpc , etc)
7. Mail,Format, Search (Mail, Mime, PDF, Search
Lucene)
8. Utility (Cache, Config, Filter Input, Log, Validate, etc)
MVC Zend Framework Concept
http://www.domain.com/controller1/action1/var1/value1/var2/value2

Request

Traffic application, like function to Add,


IndexController.php
Controller Edit or Delete.

GetTransaction.php Process, Database query, etc


Model

GetTransaction.phtml Final view, output HTML


View
Hands on Zend Framework Installation

Requirement :
1.Zend Framework source code from http://framework.zend.com
•PHP 5
•PDO Extension
•mod_rewrite apache
Prepare Zend Framework Installation

1.Create Directory Structure


2.Put Zend Library
3.Set mod_rewrite
4.Create .htaccess file
5.Restart Web Server

root
application
controllers
models
views
scripts
html

library
Zend Framework Implementation

Varien from 2001 creating e-commerce solution and


created open source e-commerce engine
named :
MAGENTO http://www.magentocommerce.com which
http://www.varien.com
based on PHP5 and Zend Framework.
Zend Framework Implementation
Zend Framework Implementation
Zend Framework Implementation

http://www.rightmedia.com

Rightmedia
Adversitement online, until now the application serving 5 million ads and
process 100.000 request / second
Zend Framework Implementation

http://services.alphaworks.ibm.com/qedwiki/

IBM QEDWiki. Right now, IBM Research & Development Center create a unique
WIKI based on Zend Framework. QEDWiki used to make a website protoype
and can make web 2.0 application easilly.
Zend Framework Implementation
QEDWiki
Zend Framework Implementation
QEDWiki
Benefit & Strong Point of Zend Framework

1. Ready to Use modules to access popular Web Services


2. Enterprise-grade Framework
3. Use Data Model PDO (PHP Data Object) for Database access
and easy switch to another database
4. More structured File, directory and coding for easy
maintenance
5. The framework consist of ‘Ready to Use’ modules. Why reinvent
the wheel ?

Current Zend Framework version is 1.5 and can be


downloaded at

http://framework.zend.com
Website about Zend Framework

Questions ?
Thank You

Você também pode gostar