Belated announcement about working on “Programming Flex 2″ by O’Reilly Publishing

Probably no secret right now, but just thought I’d officially announce it here finally that Joey Lott and I are working on a book covering Flex 2 for O’Reilly publishing titled “Programming Flex 2“. This is my first book and I have to say this writing stuff isn’t easy although I’m enjoying it. I hope this book helps spread the word on how truely excellent of a job Macromedia (Yeah I know, now Adobe) have done with this platform.

Could Flex replace HTML one day? FXT is a good start

Ted posted FXT, a project he’s been working on and I couldn’t help but feel think when he first shared this.. Wait, Flash/Flex being used for things that usually I see HTML used for. I’m a pragmatists when it comes to Flash usage so I cringe when I see people wanting to go that far (like building a house out of Flash).

In our products we use Flash a good deal, but we also use traditional HTML application and dare I say some AJAX too. I love Flash and Flex, but don’t see it replacing HTML anytime soon. One of the benefits though of Flex over Flash has been its development process is much closer to how traditional development shops work. There are more things I would consider Flex for than I would have considered using Flash just purely based on the economics of rapid development and maintaining code base vs the richness of Flash. So with Flex 2, I am expecting more and more applications that developers only considered HTML as the proper technology to use to give Flex a try.

Back to Ted’s announcement of FXT. This looks like an interesting project towards seeing Flex moving even closed to replacing more places where HTML is better. It allows you to take the power of Flash/Flex and bring it to more traditional web applications. It also should be attractive to some developer who don’t even like the Flex data exchange model, and want it to behave even more like traditional HTML applications. The programming model has built in organization via our favorite pattern MVC. Definitely worth a look, especially the implementation details of how data is provided and how templating works.

Worth mentioning here are things that have progressed in the past over how the Flash Player integrates within the browser. We now have hacks to get bookmarking working, browser history, content scrolling, and some other things I’ve probably forgot.. but it’s still not truly part of the browser like HTML is. I’m sure if it were up to Adobe the player would be a first class citizen in all browsers out there (we would get benefits like being able to open links in a new tab and hitting ctrl+a to select the entire page’s content be it Flash or HTML), until then I bet the will keep try to find ways to improving the integration of Flash and the browser as much as possible with the limitations of the browser plug-in API’s. Which brings me to Apollo:

Apollo is the code name for a cross-operating system runtime being developed by Adobe that allows developers to leverage their existing web development skills (Flash, Flex, HTML, JavaScript, Ajax) to build and deploy Rich Internet Applications (RIAs) to the desktop.

I can’t help but think that Apollo was inspired by the inability to take Flash to the next level without being able to have complete control over the entire runtime. HTML isn’t going away, but all this can only lead to more usage of Flash everywhere..

Separating ActionScript from MXML: Approach 5

Christophe Coenraets posted an entry on his blog demonstrating four different techniques to write a simple temperature converter application.

The purpose of the entry was specifically to demonstrate four different ways to accomplish the same thing–showing how flexible Flex really is. The goal for this application was to separate the ActionScript out of the MXML files.

I’d like to follow up on this entry and demonstrate a fifth approach. This is something one of the Flex engineers proposed earlier and in my opinion is the cleanest method. Instead of using an <mx:Script> tag and including functions that get dropped into the current class, we can create a Controller class and link it through tags. This keeps tags in MXML, ActionScript in external files, promotes OOP programming, and simplifies reuse.

Continue reading

Come see Macromedia Flex at MAX

Our employer, B-Line Express, will have a booth at MAX to showcase our B-Line Charting Components. We’ll be demonstrating both the currently available 2.5 set and the in-development 3.0 version. This latter version is a complete re-architecture around the v2 framework and supports both Macromedia Flash MX 2004 and Macromedia Flex. If you’re at MAX, come by our booth to check out how our components can be easily integrated into a Macromedia Flex application with code such as follows.

<bl:LineChart
   id="chart"
   x="0"
   y="0"
   width="500"
   height="400"
   title="SampleLine Chart"
   pointType="circle"
   dataProvider="{dataStore.sales}"
   marginRight="100"
   xmlns:bl="com.blinex.charts">

   <bl:xAxis field="Month"/>
   <bl:yAxis minValue="0" maxValue="10" majorUnit="1"/>
   <bl:series title="Tom" field="tomSales"/>
   <bl:series title="Dick" field="dickSales"/>
   <bl:series title="Harry" field="harrySales"/>

</bl:LineChart>