| By Michael Givens | Article Rating: |
|
| April 21, 2007 03:00 PM EDT | Reads: |
11,457 |
I have been collecting DVD movies for years now and, on some occasions, I have forgotten that I already owned a particular movie. More times than I hate to admit, I have ended up with two copies.
At my wife and budget's insistence, I created a Flex 2 application with a ColdFusion, CFC-based back end that allows me to store a DVD inventory with the expected data inputs (see Figure 1) into a mySQL database. This Flex 2 application displays the inventory in a DataGrid (see Figure 2) with an itemRenderer that displays the DVD cover art, and it utilizes an Amazon Web service (http://labs.insideflex.com/flextraining/movies/bin/ExampleAWSCall.xml) to dynamically locate the URL of a medium-sized image of the cover. In addition, a back-end CFC function automatically calls the YouTube API to grab the URL of a trailer for the movie, based on the title entered (see Figure 3).
Let's take a peek at the MXML code (see Listing 1). First, the database is a simple table (no normalization was used, but that certainly could be added). The movies table structure (http://labs.insideflex.com/flextraining/movies/bin/movies.sql.txt) is shown in Figure 4. Next, I used the Flex Builder 2's ColdFusion CFC Value Object Wizard to quickly create the server-side components from the database structure. Three CFCs and one ActionScript class later, the back end was complete (see Listing 2). The creationComplete event, in the dvdLibrary.mxml, calls a function, pageLoaded(), that triggers a RemoteObject call to the movieGateway component's getAllAsQuery() function. The returned data is pushed into a Bindable ArrayCollection, arcMovies,
which serves as the dataProvider for the DataGrid, dgMovies. ItemRenderers are used to format the cells of the DataGrid, including a CoverRenderer to display the cover art for the DVD's Image data (this data is provided by the Amazon Web service (1)). In addition, a call to a YouTube (2) Web service supplies a movie trailer for each DVD added to the library. Adding a new DVD has only one required field - the DVD's title. The mx.events.ValidationResultEvent and mx:StringValidator are used to ensure that a title is entered (3). The title is passed to both of the Web services and saved to the database. A TitleWindow (4) is utilized to display a larger image of the cover artwork as well as to display the movie trailer.
Building this project was fun as well as useful. The full source code is available at http://labs.insideflex.com/flextraining/movies/bin/srcview/index.html.
Now there is simply no excuse for accidentally buying a DVD I already own. I will soon be entering my entire collection of DVDs into this new Flex 2 DVD library. From now on, I plan to check this library before heading out to the video store. For the final online version of this Web application (http://labs.insideflex.com/flextraining/movies/bin/dvdLibrary.html), I've added search functionality so that as the library grows, it will still be easy to filter out and find the movies. I already have plans to port this Flex Web application to an Apollo desktop application in the coming weeks. If you would like to keep an eye on my progress, please visit my blog, www.flexination.info, when you have time. If you have any follow-up questions, feel free to ping me at the e-mail address listed with the article.
Published April 21, 2007 Reads 11,457
Copyright © 2007 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
More Stories By Michael Givens
Mike Givens is the CTO of U Saw It Enterprises, a Web technology consulting firm based in Marietta, GA. He is an Adobe Corporate Champion known to share his experience and evangelism of all things Adobe. Certified in both ColdFusion 5 and as an Advanced CFMX Developer, he has been using ColdFusion since the days of Allaire Spectra. For the last 11 years, he has been seen with his head down - deep in the code.
![]() |
realgeorge39 09/11/07 06:27:13 AM EDT | |||
dvdXsoft DVD to Zune Converter can convert video DVD to MP4 Video files suitable for Zune, PSP or iPod devices! This software is the best for converting DVD to MP4 files in speed and compatibility. zuneconverter.net/dvd-to-zune |
||||
![]() |
barrett63 09/03/07 03:35:01 AM EDT | |||
SecondLife DVD Maker is a powerful and easy-to-use DVD Author and Burning tools . You can make your own DVD title with the movie captured by your DV or downloaded from the internet. |
||||
- Ulitzer.com Named Exclusive "New Media" Sponsor of Cloud Computing Conference & Expo
- Adobe’s Aiming ColdFusion at Multiple Clouds
- Cloud Computing Journal: Adobe to Deliver ColdFusion in the Cloud
- Adobe Unveils LiveCycle Enterprise Suite 2 for Deployment in the Cloud
- Adobe Flex Developer Earns $100K in New York City
- Adobe May Cooperate with Apple to Transplant Flash Player to iPhone
- Ph.D. in Twitter Anyone?
- Eolas Sues the Internet
- Adobe LiveCycle Enterprise Suite 2 for Cloud Computing
- Adobe Betas Target RIAs and Cloud Computing
- Special Report on the Emerging Cloud Computing Trend
- Adobe Cans Another 9% of its Workforce
- My Thoughts on Ulitzer
- Ulitzer.com Named Exclusive "New Media" Sponsor of Cloud Computing Conference & Expo
- Ulitzer Live! New Media Conference & Expo
- Adobe’s Aiming ColdFusion at Multiple Clouds
- Eval JavaScript in a Global Context
- Fig Leaf Software to Exhibit at Government IT Conference & Expo
- Cloud Executives Feature on Cloud Computing Expo Power Panel
- Software Flexibility in the Cloud - Part 4 of 5
- Cloud Computing Journal: Adobe to Deliver ColdFusion in the Cloud
- Is Microsoft as Free as Open Source?
- Adobe Reader Sued
- Adobe Unveils LiveCycle Enterprise Suite 2 for Deployment in the Cloud
- Where Are RIA Technologies Headed in 2008?
- Cover Story: How to Increase the Frame Rates of Your Flash Movies
- AJAX World RIA Conference & Expo Kicks Off in New York City
- Your First Adobe Flex Application with a ColdFusion Backend
- Adobe Flex 2: Advanced DataGrid
- i-Technology Blog: Death-Knell For "Rich Media? Hardly!
- Adobe/Macromedia - Microsoft, Look Out!
- How To Create a Photo Slide Show ...
- Adobe Flex Interface Customization - Themes, Styles, Skins
- Personal Branding Checklist
- Has the Technology Bounceback Begun?
- "Real-World Flex" by Adobe's Christophe Coenraets








































