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.
Comments on: "Getting Started With Flex, LiveCycle Data Services and ColdFusion (or Not)" (8)
Hi,
Christophe Coenraets “Test Drive” is probably the best starting point for Data Services, with a bunch of samples and tutorials. However, it is not yet updated for the beta of LCDS2.5, it is based on FDS 2.
http://www.adobe.com/devnet/flex/articles/java_testdrive.html
Regards,
David
LikeLike
David – Thanks for the info. I think I’ll probably end up not trying LCDS for now. It *is* beta after all. Information pertaining to FDS 2 and CF would be easier to find and I’m less likely to run into bugs that I can’t work around.
We’ll see!
LikeLike
I share your frustration. I have been struggling for 4 days to get a simple hello world type app running with FDS. I have built numerous apps using Flex & AMFPHP, but FDS seems much more complicated to set up (with much fewer clear examples out there to follow). I look forward to viewing your progress!
LikeLike
I agree….i have been building with CF for years and years…and trying to get simple Flex/Data connection apps (i’ve tried many that are out there…even simple ‘sample’ downloaded apps to run) has left me wanting to bash my computer to bits. All this gateway configuration and pathing and publishing paths stuff is a joke.
LikeLike
I am working with this example (contact example) but it does not work well.
I have configured all xml in WEBINF folder and when I run this aplication i get the follow error:
Could not initialize DataService.
I don’t know if this example only works with FDS2.
Do you know that?
LikeLike
Adobe LiveCycle Designer enables the creation of dynamic XFA form templates. This software supports XML data and schema bindings, enhances document security with template designs for digital signatures and enables compliance with government accessibility requirements for online forms. With it, anyone with Adobe Reader software can participate in secure, interactive data capture processes that extend to customers, partners or suppliers.
http://www.estetiks.com/
LikeLike
Cant believe its been so hard..
Here is what I do to get it running..
After I install LCDS and FLex.
1.I install WTP plugin on my flex builder from eclipse updates.
2.Create a project which says “compile on server” and check the option to create a flex-java project. This will work only if you have the above mentioned plugin installed.
3.Select the location of your flex.war on the next screen
4.Select your runtime. You can point to the default jbosss that comes with LCDS. I had problems doing this , so went for tomcat.
5.Click finish.
All the neccessary code folders will be created now..
Read flex builder help for RemoteObject and Data service.
Some sample apps might need hibernate to work.. So make sure you have hibernate.jar on the WEB-INF/lib folder.
Hope it helps..
LikeLike
Hi, I’m just getting started with Flex, and granted this is over a year since the last post here was done, so I hope someones reads this still.
I’m very seasoned with ColdFusion development and jQuery/AJAX. But I think I have an app that can really benefit from being built in Flash. I need to build an app that displays a leader board for a sporting event. I would like all leader board clients to update as soon as new scores come in. I would also like to do some animation on the number that’s changing so it’s easy to see that a new score just came in and changed.
From what I’m reading so far, looks like Flex Data Services became LiveCycle Data Services, but I can’t find any examples or documentation on how to actually use this with ColdFusion. Anyone got any suggestions/examples how to get started?
LikeLike