specializing in digital media technologies

Digital Media and Communications Insights, Inc.


Larry Ullman's Blog

Using Flash with Yii

On my most recent Yii-based Web site, I decided to use a custom Flash application for part of the back-end administration of the site. The justification was simple: what the administrator needed to do was a bit complicated; lots of information had to be available but the user interface had to remain uncluttered and natural. The specific Web site provided a way to create and take online quizzes. In a separate process, the administrator could add and edit questions. In the Flash-based process, the administrator could associate any number of questions with a quiz (actually, a pool of questions would be associated with a quiz and X number of random questions would be pulled from that pool). The main issue, from a user interface perspective, was how to display the questions in an intelligent way. With other examples, I might create a form for adding or editing quizzes and within that form, the questions would be listed within a dropdown menu (actually a SELECT menu that displayed and allowed for the selection of multiple options). However, with this particular example, there was no good way to display the questions in a SELECT menu. Each question had a unique primary key, of course, but that’s not very useful to the administrator. The questions did not have unique names (what name do you give a question?) and the best indicator of a question was its prompt, which would be HTML, possibly containing images and videos. So, again, how do I display possibly hundreds of questions in a meaningful way?

My solution was to show the list of questions by number and, when the admin clicks on a specific question, they’d see a preview of that question’s prompt (i.e., the HTML) in a separate interface. Now I’ve got three areas in my UI: one for adding or editing the other quiz attributes, one for listing every question, and a third for displaying the particulars of a single question. Given all this, I thought having the admin drag the questions from one area to another would be the best way to associate a question with a quiz. I could have done all this using jQuery (the JavaScript framework Yii uses by default), but that would have taken me days to figure out how to use jQuery in this way. On the other hand, I knew I could develop this using Flex (a framework for creating Flash applications) in no time. I just didn’t know how to get Yii and Flash to play ball. It turns out not to be that hard… (continue reading…)

Filed under: Flex,MySQL,PHP,Web Development

Really Useful Tools For PHP Developers

I recently StumbledUpon an article on Really Useful Tools For PHP Developers at W3Avenue. The article doesn’t go into too many details, let alone provide specific instructions for any of the tools, but it’s nicely organized and presents a good list of useful PHP-related tools. The list ranges from development software to security utilities to packages that will simply format your PHP code in a definitive style. Check it out if you’re a PHP developer; there are always new ways to make your work easier and the output better.

Filed under: PHP,Web Development — Tags: ,

Caching the Database Schema using MemCached with Yii

I’ve just wrapped another project using the Yii framework (my fourth in the past year) and so I’ve got a few more topics to write about. I really like the Yii framework (obviously) and think it’s very accessible, but there are still things that take me some time to figure out, so those topics make for good blog posts! In this one, I’ll walk through what I had to do to cache the database schema using memcached. For that matter, I’ll explain why you’d want to do this in the first place… (continue reading…)

Filed under: MySQL,PHP,Web Development — Tags: , ,



If you have a question, are seeking information, want to download files, or generally have any need related to a specific book, please make sure you are using the correct link. Check both the title and the edition.