flare and the swiz framework

12 views
Skip to first unread message

Martin Dudek

unread,
Jan 15, 2010, 1:32:06 PM1/15/10
to Flare Data Viz
Hi,

this a question mainly to Ben yet since it might be of generall
interest I post it here.

Ben, have you implemented any flare application integrating them in
the swiz framework which you are involved in as I just noticed by
reading about the robotlegs - swiz debate. After I made some efforts
for integrating flare into puremvc (http://goosebumps4all.net/34all/bb/
showthread.php?tid=269) I was considering moving on to robotlegs (I
neither know robotlegs nor swiz yet so this is based on the recent
hype about robotlegs). If you have even some simple demos of flare
within the swiz framework I would highly appreciate if you could make
them available. As we know flare doesn't really separate view and
model so I assume some workaround like my prototype basic pure model
data classes are necessary in any case. Also I was wondering really to
start using core modifcations since flare seems to be not actively
developed anyway. Yet this is another topic ...

Greets

martin

Ben Clinkinbeard

unread,
Jan 18, 2010, 2:21:30 PM1/18/10
to flare-d...@googlegroups.com
Hi Martin,

I have not yet combined the two but will be doing so very soon. It has been a while since I did anything in Flare, but nothing is coming to mind immediately that would cause them to not place nice together or to have some huge benefit. Swiz, RobotLegs and other frameworks are generally used to orchestrate "business" or "domain" concerns within an application, and would therefore be somewhat unrelated to Flare. Do you have a more specific concern/question that might help me better undertsand your needs?

Ben

Martin Dudek

unread,
Jan 19, 2010, 5:28:48 AM1/19/10
to Flare Data Viz
Hi Ben,

thanks a lot for the quick reply, highly appreciated.

I assume my specific interest behind the initial post is really how
you handle the graph data when embedding flare into the swiz
framework. Ideally there should be a representation of it in the
model layer I guess. Once you have that kind of "model data"
requirements like for example two visualization of the same graph data
become much more straight forward in my experience. (additional
overview panel for example, hard to implement with flare right now as
far as I see) Of course without these kind of requirements flare
stays in the view and things are more straight forward. Something
around that ....

Apart from that just the wish to work with frameworks like swiz also
when writing flare applications and the curiosity how an expert like
you approaches it.

Greets

martin

Ben Clinkinbeard

unread,
Jan 19, 2010, 9:51:53 AM1/19/10
to flare-d...@googlegroups.com
Hi Martin,

I would likely make a distinction between the actual model data and the Flare data, since it uses its own internal data structures. Just off the top of my head, I would probably do something like this:

In my Model class, have a setData() method that is called by my controller/command/whoever when the data is retrieved from the server.
setData() would construct a plainCollection and a flareData property that were both decorated with [Bindable( "dataReady" )]
flareData would be typed as flare.vis.data.Data
At the end of setData() call dispatchEvent( new Event( "dataReady" ) ) to trigger any bindings to plainCollection and/or flareData to update

That part is framework agnostic. If using Swiz 1.0 (about to enter beta), you could also decorate flareData with [VirtualBean( "flareData" )] to make it eligible for injection into other components. Then in your view that contains the Flare chart(s) you could have [Autowire( "flareData" )] public var myData:Data, and that would be bound to the flareData object. That way your view has no idea where the data comes from, how it gets constructed, etc. It just knows about the data that is needed to draw the chart, which is all it should know about.

Hope that helps,
Ben

Martin Dudek

unread,
Jan 19, 2010, 10:39:46 AM1/19/10
to Flare Data Viz
Hi Ben,

great, that will give me a very nice skeleton to start with if I try
to use swiz for a flare application

Thanks a lot

martin

Reply all
Reply to author
Forward
0 new messages