I’ve taken it upon myself to “learn a little Flex”. It took me a few years, but I finally have an idea for an application that, if I knew how the heck to use FDS, wouldn’t take that long to write and would help me get my feet wet with a range of technologies I have an interest in.
For all intents and purposes I want to write a simple chat application. I’d like to create a browser-based chat client using Flex and then a desktop-based client for the same application using Apollo.
Since I’m just getting started and I have no plans to make this a real production application I decided to use the beta of LiveCycle Data Services 2.5 available on Adobe Labs (which is the next version of Flex Data Services renamed).
Because this is a chat system it seems makes sense to use LiveCycle Data Services. As I understand it, I can use LCDS to push data out to a client. So, if someone sends a message in my chat client I’d like it to be pushed to other chat clients.
Last night I (think I) downloaded all the components I need. Namely, FlexBuilder and LiveCycle Data Services. I got both installed and running. Great!
So… now what?
Well, I thought it would make perfect sense to simply create a new Flex project and see what I can do. So I fired up Eclipse and created a new Flex project. The first thing it asked me was how I wanted my application to access data. Easy, FDS!
However, it’s not that easy. First off I need to select if I want to Compile locally in Flex Builder or on the Server when the page is viewed. Heck if I know. So I guess “locally” and continue. The next page asks about locations of FDS. This is where I start getting iffy. It’s asking me where the FDS root folder is. I decide to go with the defaults (which are always right, I’m sure) and click continue a few times. But, when I’m sure I’m almost done I get a new dialog asking me about build paths where I note that the output path is under the LCDS server itself!
Well, I’m pretty sure I don’t want that, but I just don’t know. I’m hoping that I don’t have to serve Flex apps that use LCDS from under the LCDS server. I imagined that a Flex app that uses LCDS would work in a manner similar to using Flex with, for example, a web service. That is, I’d be able to create an instance of some object within my Flex app that handled my communication with LCDS. From how it looks right now, it seems that LCDS is baked at a lower level. Honestly though, I doubt that. Ultimately, I just don’t know.
So, rather than jumping in feet first I figured I’ll look for some tutorials on using FDS. A nice hello world application would have been a good starting point, for example. Unfortunately I couldn’t find much. I did find a nice article by Ben Forta discussing the purpose of FDS and how it could be used with FDS, but it didn’t give any concrete examples.
Another article I found by Tom Jordal actually provided a sample Contact Manager application and seemed quite promising. However, I can’t make sense of the configuration instructions he wrote. (Granted, I am fairly tired. I’ll try again tomorrow, time permitting.)
I tried to follow his instructions, which involved a lot more XML editing than I expected, but every time I restarted the LCDS server I saw pages of errors associated with the cfcontact destination XML Tom had me copying all over the place. (Note: steps 8, 9 and 10 seem to all be saying the same thing, as far as I can tell.)
So that’s where I got stuck. I’m not sure where my source goes, though both Flex Builder and the Contact Manager sample lead me to believe the FDS apps are stored under FDS. Ok, I’m sure I’ll learn why soon enough.
One thing that surprised me was the amount of XML editing I need to do just to get one application configured. I do somehow have to tell FDS how to connect my client to ColdFusion and I’m pretty sure that’s what I was trying to do. I would have expected there would be some cute UI I could click through to do this similar to ColdFusion’s administration interface. Heck, maybe there is!
I’m sure I’ll learn more as I move forward. I’ll try to write about my learnings here as I move along.