In this tutorial, I'll show you how to use the Zend Framework's Zend_Service_Amazon component to retrieve product data from Amazon.com's product database. Although the focus of the tutorial will be video games, you can easily adapt what you learn here to any of the dozens of other product categories, whether it;s gourmet food, tools, toys, or books!
Zend_Text_Figlet is a Zend component which enables developers to create a FIGlet text. A Figlet is nothing but a technique of creating large letters using ordinary text. I don’t know how to make a use of this in my daily matters, but its a nice recreation. A short history on Figlet can be found here. An example and the code to generate it is shown below.
An adage often exchanged between Zend Framework enthusiasts goes something like this: "The bad thing about Zend Framework is that there's a dozen ways to do anything. The great thing about Zend Framework is that there's a dozen ways to do anything." To a degree, this is a boon for the project. I think it's fair to say that it's one of the more flexible framework projects out there when it comes to how to do things with it.
Let me first start off by saying that the Zend Framework has been very good to us.
It enabled us to build a kick-ass application in a relatively short amount of time. On top of that, we followed the conventions from Zend and PEAR and essentially have a very maintainable piece of software which I don't hate looking at every day (which is as one can imagine, a huge plus).
The other day our servers were overwhelmed with the rising traffic and I started profiling my application through Xdebug. Initially I tried to use Zend Studio and the Zend_Debugger but Zend doesn't like my (awesome) operating system (FreeBSD) and only provides Linux and Windows extensions. Xdebug, while being free and awesome in general, doesn't know this prejudice. :-)
On this project we currently run with 100,000 visitors per day on average, our peak is Sunday night where we get a ton more traffic than usually. We run the latest PHP (5.2.6 at this time), etc.. The software comes from FreeBSD ports, there are no magic secret patches. I'm picky about the modules I compile and load but the list is far from optimized.
While doing some initial research for a blog related automation task to implement I learned some more about services which transform long URLs into short ones. The well-knownst of these services, due to the Twitter hype, is probably TinyURL which can be accessed via a classic webinterface or by calling a public API. In a recent blog post Dave Marshall outlined a quick workaround for tweeting via the Zend_Http_Client component which is a reasonable approach for calling services that aren't in the Zend Framework core yet like Zend_Service_Twitter or are not supported out of the box. Therefore this post will try to describe a Zend Framework way of creating tinyized URLs.
I recently worked on a project which was based on Zend Framework - I haven't worked with it before and I was temporarily confused by the existing implementation of some of the database-level stuff. After much reading and untangling of code, I'm now pretty clear how this should look, so here's my overview. I'm not going to go into setting up a whole application, but this is a quick primer on how data models go together.
Following last month's article by Ian, here's some thoughts on how to test a Zend Framework application.
One of the unit testing best practices suggests to break dependencies, so you can test each component separately.
The first problem that arises when you want to test controllers might be having a tighter control over the HTTP Request and Response objects. Fortunately, ZF already has something that really makes your life easier, i.e. the Zend_Test_PHPUnit_ControllerTestCase class, which has stubs for the Request and Response
objects, and you can easily check headers, return codes, routes, redirects, and even the view itself.
If you haven't tried it yet, do yourself a favor and give it a go.
Tutorial kommentieren Defekten Link melden
caophamtruongson schreibt:
comment : ???
I find myself constantly bombarded with questions from students and co-workers I've introduced to the Zend Framework regarding how the different components can come together to form a basic application. I've searched, I have found, I have emailed great tutorials, but still the most common questions are posed "What's should I include in index.php?", "Should I use Zend_Db_Table?", "And what about Zend_Form?"
Tutorial kommentieren Defekten Link melden
sanjay schreibt:
good
Why use the Zend Framework?
In the past few years, web development has become a very competitive arena for programming languages, frameworks, libraries and IDE’s. As a result, there has been a plethora of options for programmers to choose from. In most cases, a significant amount of time can be spent on searching for tools to speed up development instead of recreating from scratch. This article is aimed at php developers who are looking to learn more about how not to reinvent the wheel, in particular, with the new Zend framework. This is not a comparative list of all php frameworks, as there are many good ones out there, CakePHP and Symphony to name two. I’ve evaluated other frameworks to some degree, not exhaustively by any means, and the Zend framework seems to fit nicely with my requirements. It may not for you, but I’ll try to persuade you in this article :).
You can encapsulate routes into modules by splitting the routes into different files and extending the Zend_Controller_Router_Rewrite class. But, what if you want to use the Redirector helper to set a URL based on a registered route?







News von