Zend Presentation

Views:
 
Category: Entertainment
     
 

Presentation Description

No description available.

Comments

Presentation Transcript

Introduction to Zend Framework : 

Introduction to Zend Framework By Kathiravan on 2nd April 2009

Popular Frameworks in PHP? : 

Popular Frameworks in PHP? Zend Framework CakePHP Symfony

Zend? : 

Zend? First version released on Oct. 29, 2005 in San Jose, Calif. By Zend Company Zend Framework (ZF) is an open source framework for developing web applications and services with PHP 5. It is also called as 'component library'

Requirements : 

Requirements PHP 5.1.4 and above Apache MySQL

Architecture Used : 

Architecture Used Three-tier-architecture – MVC M – Model V - Views C - Controller

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 Views :It considered web design ,or templating Controller:The controller layer glues everything together

Zend basics : 

Zend basics A set of related action controllers, models and views Eg: News module Controller class names should be prefixed with module name ex:NewsController Module names may be CamelCased as well.

Slide 8: 

Directory structure

Connecting to a Database : 

Connecting to a Database $db=newZend_Db_Adapter_Pdo_Mysql(array( 'host' => 'your host name', 'username' => 'your username', 'password' => 'your password', 'dbname' => 'your dbname'));

Using Controllers : 

Using Controllers In application/controllers/ Class NewsController extends Zend_Controller_Action { function init(){ Zend_Loader::loadClass('News'); } function indexAction()? { /* code here*/ } }

Using Models : 

Using Models In application/Models/ Create models modulename(News.php) and write Class News extends Zend_Db_Table { protected $_name = 'news'; }

Using view : 

Using view Next in your application/views/scripts/ Create views News/index.phtml and write <html> <body> Hello world.... </body> </html>

Using helpers : 

Using helpers Must have a method named after the helper

Features of Zend : 

Features of Zend All components are fully object-oriented PHP 5 MVC architecture with loosely coupled components Support for multiple database systems and vendors including MySQL, Oracle Email composition and delivery, retrieval via mbox, Maildir, POP3 and IMAP4

Advantage of Zend Framework : 

Advantage of Zend Framework Database support- Access multiple brands of RDBMS via a database-independent object-oriented interface. Databases supported include MySQL, Oracle, Microsoft SQL Server, PostgreSQL and SQLite. Foundation Framework services - Zend Framework provides many other classes to make common application development tasks quick and easy. Dojo tool kit

Zend or CakePHP? Which is better? : 

Zend or CakePHP? Which is better? Overall, both these frameworks are good to use as per your requirements.

Conclusion.......... : 

Conclusion.......... Overall, both these frameworks are good to use as per your requirements. CakePHP is suitable for developers new to MVC and those who require stricter conventions. ZF is a choice for those who need better control over the application design and built-in support for renowned Web services. Both the frameworks are developing fast and the choice is entirely yours.

Thanks You................. : 

Thanks You................. See u again after some time......Bye...