The Artima Developer Community
Sponsored Link

Visions and Sawdust
Flex Sample - A rich RDF/RSS reader in 50 lines of code
by Sean Neville
December 2, 2003
Christophe has provided sample Flex and MXML source worth a peek. While crafting a browser-based RSS reader is not exactly a likely use case, it is more interesting than yet another Hello World intro, and it illustrates just how much can be accomplished in Flash with a few lines of MXML.


I wouldn't look to replace NetNewsWire or FeedDemon (I'm one of those guys who wears out carpet and the swivel feature of his chair by working simultaneously on a Mac and a PC all day long) but what's encouraging to me about this example is just how much can be accomplished with a few declarations using MXML and the Flash components bundled in Flex. It reminds me a bit of how I sometimes feel using Ruby or Python for certain tasks in a Java-dominated server world, in that while not appropriate in every tier -- it seems to excel in the web presentation tier -- it's refreshingly simple without sacrificing power.




<?xml version="1.0" encoding="iso-8859-1"?>

<mx:Application width="900" height="600" xmlns:mx="">

    <mx:Style src="main.css"/>

        var selectedBlog;
        var selectedEntry;

        function treeItemSelected(evt) {
            // When a new blog is selected in the tree, use the HTTPService to get the feed
            if (url!=null) {

    <!-- an XML document containing the list of blogs I read -->
    <mx:XML id="treeModel" src="tree.xml"/>

    <!-- The HTTP Service used to get the feeds  -->
    <mx:HTTPService id="feed" url="{selectedBlog}"/>

        <!-- The tree displaying blogs organized by categories -->
        <mx:Tree width="250" heightFlex="1" change="treeItemSelected(event);">

            <!-- The blog header -->
            <mx:VBox verticalGap="0" backgroundColor="#EEF5EE" borderStyle="outset" widthFlex="1">
                <mx:Label styleName="title">
                <mx:Link click="getUrl('mailto:'">

            <!-- A datagrid displaying the post titles for the selected blog -->
            <mx:DataGrid widthFlex="1" height="220" change=""

            <!-- The post excerpt -->
            <mx:TextArea id="description" widthFlex="1" heightFlex="1" html="true" wordWrap="true" editable="false">

            <!-- A link to the article in the original blog -->
            <mx:Link id="itemLink" click="getUrl(, '_blank')">




Talk Back!

Have an opinion? Readers have already posted 1 comment about this weblog entry. Why not add yours?

RSS Feed

If you'd like to be notified whenever Sean Neville adds a new entry to his weblog, subscribe to his RSS feed.

About the Blogger

Sean Neville is a software architect at Macromedia where he is focused on creating the Flex platform. His previous projects include the JRun application server and Flash-related products for J2EE and .NET. His experiences include membership in the JCP Executive Committee and numerous JSR expert groups; authoring articles, contributing to books, and speaking on enterprise topics; financial services app consulting; building doomed yet fun web startups; maintaining open source projects; and half-decent fiddling of Irish jigs and reels.

This weblog entry is Copyright © 2003 Sean Neville. All rights reserved.

Sponsored Links


Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use