Starting Zend Framework
After building lots of projects, I realize that I spend a lot of time just to writing repeating (and boring) code; select, insert, delete, and update rows. I have to find a way to increase my coding speed to finish the project faster. So I began to try some frameworks available on the net.
After spent several weeks trying some frameworks, finally I choose Zend Framework. It's not because they are 'the PHP company', but because it has lots of extremely useful components and also some manuals to download (A coder like me depends alot with manuals and I can't live with it).
To install Zend Framework in your machine, first download the latest version from http://framework.zend.com/download. Then unzip the archive in a directory, say C:\www\zend-framework. Next add to your include_path the library directory, where the framework expects to find all of its files. Open your php.ini and add the path:
include_path = ".;C:\Program Files\xampp\php\pear;C:\www\zend-framework\library"
That's it. Now you are ready to use Zend Framework in your applications. Let's test with our favorite 'Hello, World!' application.
<?php require_once 'Zend/Pdf.php'; /* create a new pdf document */ $pdf = new Zend_Pdf(); /* create a page */ $page = new Zend_Pdf_Page(Zend_Pdf_Page::SIZE_LETTER_LANDSCAPE); /* setup font */ $font = Zend_Pdf_Font::fontWithName(Zend_Pdf_Font::FONT_HELVETICA); /* write text to page */ $page->setFont($font, 48); $page->drawText('Hello, World!', 250, 500); /* add page to document */ $pdf->pages[] = $page; /* save pdf */ $pdf->save('hello.pdf');
If everything's ok, the script above will produce a file called hello.pdf with a text 'Hello, World!' in it.
Now that you have Zend Framework working on your system, you might want to see these useful resources to help you get started:
1. Zend Framework QuickStart
The official quickstart of Zend Framework from Zend.
2. Understanding The Zend Framework
Several lessons from IBM developerWorks to help you getting started using Zend Framework. Lessons include: database, PDF generation, read RSS, sending email, searching and other cool stuffs.
3. Getting Started with the Zend Framework 
A very good and easy to understand tutorial by Rob Allen. This tutorial shows you how to using Zend Framework to build database driven application and implementing MVC (Model-View-Controller) for the presentation layer.
Keywords: Zend Framework, installation, getting started, resources, zend
Share:
Save to del.icio.us
Digg this!

Add your comment