The Artima Developer Community
Sponsored Link

Visions and Sawdust
Flex Questions, Struts, Mediator vs. Controller, and a Look at MXML
by Sean Neville
November 26, 2003
Summary
Intelligent folks have offered really good questions about just what the heck we're doing with Flex and how it fits into Service Oriented Architectures, Struts, J2EE, and ASP.NET web apps. Thus: Pointers to a few responses of general note plus a look at the MXML syntax.

Advertisement

Mark Figley posted great questions to my previous entry on Flex and Central, and I responded with some code samples and a deeper look at the MXML syntax (scroll to fourth reply, looks like there are no named anchors in the forum).

I particularly wanted to point out the sample that employs a Struts Model within MXML, and the aggregation of it with a SOAP web service. These two remote services are bound to rich visual components through MXML's data binding feature. I feel I owe you folks a better example than this quick sample, so I plan to follow up with a more comprehensive look soon.

Despite the Struts example, this is not intended to be a J2EE-only technology. The working idea is that a developer could craft a rich app using MXML and drop the source into an ASP.NET app just as easily as he could into a J2EE WAR file. In fact this poses the humorous (to me, anyway) possibility that a developer could use the Eclipse plugin for Flex which IBM is developing and generate MXML using Java-based Eclipse but then deploy the MXML into .NET. Not that I think this is likely to happen, and we'll likely have a tooling strategy for .NET ourselves; but write-once run-anywhere takes on more irony as far as the theory goes.

In my response to Mark, I also brushed past an interesting discovery we've made about the duties of a client-side Controller in rich apps: It often speaks with (or encapsulates) a mediator bridge that links a client-side controller to a server-side controller in rich apps. I like to refer to this is an Application Mediator because rather than sending Data Transfer Objects from a server-side domain model over to a thin client, in many cases we're talking about distributing the domain model so that it can partially reside on the client, with asynchronous messaging between the tiers for synchronization of the various concerns; this seems to be the successful approach to achieving rich offline and occasionally-connected behaviors. This is a patterns topic worth exploring more deeply.

As a final pointer, take a look at Christophe's friendly walkthrough of MXML basics on the Macromedia site for more MXML info, and feel free to give Christophe a yell, as he's smart and humble and it's his full-time job to listen to what you have to say.

Talk Back!

Have an opinion? Readers have already posted 8 comments 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



Google
  Web Artima.com   

Copyright © 1996-2014 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us