So I was sitting here thinking to myself “This is Friday and I’m not getting much of anything done. Maybe I should write another Friday Framework Highlight.” I figured that it was a good idea so I pondered what I should write. I came up blank and so I asked Matthew Weier O’Phinney. “Multiple writers for Zend_Log,” he said. I agreed.
Let’s take a quick look at something that’s kind of neat in Zend Framework. I’ve been doing some work with Adobe on some articles and one of them was on working with mobile clients with Flash. Well, me being the masochist I did more. What I did was write an example that worked as a full website, an Ajax website, a Flash service and an XML-RPC service.
Setting the Stage
First I started with a Zend_Db row instance and it’s corresponding table instance.
With the web being what it is today there can be a lot of times when you want to aggregate data from many different sources and bring them together in a single page. I have not done much of that on my site simply because that means that I then need to learn a bunch of different API’s. However, since Youtube is the #2 search engine I figured that it might not be a bad idea to aggregate some of my YouTube content on my page automatically. I don’t necessarily want to do a blog post about each individual video I post, but I wanted there to be some place where I could just list them out.
Following closely on the heels of my previous blog posting on how to create a basic Hello World application using Flash RIA with Zend Framework based remoting I have created a video showing how to do exactly what I just did in the blog posting. Additionally, I have a compressed copy of the workspace I used so you can download it and run it in your own copy of Zend Studio. You will probably need to change a few settings to make it work in your IDE. Be forewarned that you will likely also need the Flash Builder 4 plugin installed. The 60 day trial should be more than enough to let you do that.
Matthew wrote up an article on modules in Zend_Application and that got me thinking a little bit. When I have done training for Zend Framework, one of the things that mystifies students to some extent is the whole plugin architecture and where things can go. There has been several articles written about it, but they tend to use code to describe it. I was only able to find a small handfull of articles that used some kind of chart to describe what goes on. Not that that’s a problem, but I had found that when I drew out the request lifecycle that it helped the students understand it better.
So you’re now in charge of some kind of event and people are going to need tickets to get in. You could do it the old fashion way and actually have people at the door checking the tickets, but that is so 1980’s and also so easy to forge (for the nefarious). Event organizers are adament that tickets are only used once and so they want to use some kind of barcode reader to ensure that tickets are valid and you are responsible for the web side of this.