Archive for the ‘ActionScript’ Category

RSS Reader in Flex - Demo

Wednesday, February 13th, 2008

As I had mentioned before I presented a demo application on Monday for Flex. The best example I could come up with that wasn’t another overused Flickr demo was an RSS feed reader named “Feeder”. It demonstrated simple data services (HTTPService), databinding, Flex Builder’s Design vs. Source views, and some ActionScript event handling. I also quickly copied the code over to an Adobe AIR application just to show that most code could be resused between vanilla Flex and Flex/AIR.

I also made a point to do this in as little code as possible. In fact, it came out to exactly 30 lines of code and took about 15 minutes to code/explain. Realistically, I could have done less, but I wanted to make an app a little more significant than something that displayed RSS items in a DataGrid.

I’ve attached the source code for your curiosity. Feel free to comment and I would love to see anything anyone creates with this:

Feeder MXML Code

Humor of the Week #1: AMF is a Superhero

Wednesday, February 6th, 2008

Just though I’d share with you a humorous thought I had today, I find these are the kinds of thought that help me survive even the worst weeks. I’ll try to make this a weekly thing.

I was browsing the web and came across Adobe Edge’s February publication. There is an article for BlazeDS, including discussion of AMF on it and for some reason despite this being the 100th time I’ve seen the acronym spelled out, it finally hit me: Action Message Format Man would be a great Superhero name.

Now what would his costume look like…?

Pitching Flex to College Professors

Wednesday, February 6th, 2008

Yesterday I had the opportunity to pitch Flex to a few of my college professors with the potential of it becoming an advanced course offering. To give you an idea of the demographics I was working with, all of the professors here have had experience with web design, and a couple have worked with Flash traditionally in the past. I worked on a Flex project independently this past Fall, so they had been seeing me come into class excited about something I had done the previous evening. Needless to say, they were curious about what this technology was, so it was decided I was to give them a presentation to show them what Flex could do. I jumped at the opportunity to get others excited about Flex, particularly because I would love to see my college pick it up as a course.

I started off by showing a few examples such as Buzzword. I also gave a brief rundown of the history of Flex, so that they could understand where Flex is, where it had been, and where it was going. I also briefly touched on. Next, I introduced them to Flex Builder. I showed how the design view works and the code that was generated as a result. Custom components were briefly touched on. I also showed some of the data-related features such as binding, HttpService, and data providers.

To show the visual side of Flex, I loaded up Illustrator and showed the skinning extensions for integration into CS3 that are coming out with Flex 3. Lastly, I teased them with screenshots of Thermo and explained how it will put power into the designer’s hands for UI design.

Their responses were pretty much the same: “Wow.” One of my professors commented that she now knew why I was so excited about Flex. In fact, doing this presentation had the effect of imbuing even more excitement into me. After several minutes of excited chit-chat and Q&A, we came to the inevitable question of: “What next?” They’d just been shown an amazing technology that is changing the web development world dramatically and now understood why.

We decided that next Monday I will be doing a more extended presentation by programming a complete, but simple, application for them live. I’m looking forward to this very much and will probably do a dry run this weekend. I have yet to draft what I’m going to do, but my priorities are to illustrate data services, ActionScript vs. MXML coding, and a more in depth introduction to working within Flex building, possibly showing things such as debugging. I would like to integrate application structure into it, but due to the short time frame, I will code only the simplest MXML and ActionScript.

Keep an eye out, I will post about the results of this next week and probably include the sample application I develop.

PureMVC 1.7 for AS3 is Here!

Sunday, December 30th, 2007

Cliff Hall just announced the release of PureMVC 1.7 for AS3.

If you haven’t had the opportunity, PureMVC is a great Model-View-Controller based framework. I have only spent a few days with it and I have to say I’m getting an understanding of it faster than my previous attempt to understand Cairngorm. The main benefit I see of this framework over Cairngorm is that Cairngorm focuses too much in Flex. PureMVC’s independence of Flex also means easier programming of AIR applications. Also, Cairngorm’s framework is far too interwoven, with Model code spilling over to Controller code and on and on. PureMVC keeps these areas completely separate but allows them to work with each other through a Facade class middleman. Also, you can also override PureMVC’s default behavior if you don’t like what it’s doing as it has been coded with subclassing in mind. PureMVC is solely an AS3 project and it is presently being ported to a number of other languages.

I have to say that so far PureMVC makes application programming an absolute pleasure.

If you still have doubts, take a look at this beautiful diagram of how PureMVC works.