On a recent Yii-based project, managing one of the Models required a whole slew of checkboxes to indicate that yes, the quality does apply, or no, it does not. In this case, the value being stored in the database for each attribute was a single letter: Y/N. However Yii, when showing the form to update an item, needs the checkbox value to be a Boolean, in order to properly pre-check the box. Changing the database wasn’t an option in this case, so I had to figure out a good conversion process. In this post, I’ll tell you exactly how I solved this issue. Continued…
YouTube, one of the most significant players in terms of playing video online, recently weighed in with their thoughts on playing video via Flash vs. HTML5. For those that think all Flash is evil or that HTML5 will replace Flash entirely, this brings an interesting perspective. Which is not to say, of course, that there’s not a sound place for video through HTML5, but as it stands, there are many situations in which Flash will still be the best platform for video.
Some time back, I had written a couple of blog posts on authentication and authorization in Yii. As a comment to one of those posts, someone shared some code (also posted in the Yii forums) that requires a login to access any page. The interesting thing about this code is that it’s placed in the primary application configuration file, not within individual Controllers. The benefit to this approach is that a little bit of code can add authorization to your entire site, no matter how many Controllers you have. I’ll explain how to use this approach in this post, although keep in mind that it’s really best for situations where users must be logged in to access almost all of the site’s content. Continued…
Some years ago, Rasmus Lerdorf, original creator of PHP, posted on his personal Web site a discussion of what he would look for in a framework for the MVC architecture. It’s an interesting read, from the master’s voice. He specifically talks about how to properly use MVC, how to guarantee performance and security, and how to design with scalability and flexibility in mind. Although the post is a few years old, most of it is still valid, although there are little changes such as the fact that the PECL/Filter extension is now part of PHP proper.
Somewhat ironically, considering the recent spat between Adobe and Apple, the next major version of Flex, codenamed “Hero”, will have specific support for developing Flash applications intended for mobile devices. Accomplishing this involves both adding new components and skins as well as making some modifications to existing components. Although Flash content can already run on some mobile devices, the smaller screen sizes can have unfortunate consequences. This new version of Flex, due out in beta version later this year, will address that issue by allowing for smarter scaling of the application’s size.
Larry Ullman is a writer, Web and software developer, trainer, instructor, speaker, and consultant. He has written 22 books and numerous articles. His books have sold over 350,000 copies world wide in more than 20 languages. As his readers, students, and co-workers can attest, Larry’s strength is in translating geek into English: converting the technical and arcane into something comprehensible and useful.
About DMC Insights, Inc.
You may have previously been familiar with, or just tried to access, www.dmcinsights.com, the Web site for Larry Ullman's company. Although parts of that site are still available, most of its content has been moved here. LarryUllman.com will be the home for all of Larry Ullman's books, work, and related content from here on.
Subscribe to Larry’s Newsletter
Use your browser to subscribe to the blog's RSS feed, if you'd like. You can also subscribe to Larry's monthly (email) newsletter by providing the information below. Click the NEWSLETTER > ARCHIVES link above to view examples. I sometimes give away copies of my books through the newsletter, if you need further enticement.