sblundy
sblundy

Reputation: 61414

Running a webapp base flex client in IntelliJ

Is it possible to run a Flex client in IntelliJ internally and have it talk to a separately deployed server instance? The server's a java webapp. This will make developing, especially debugging, much easier. What I'm trying to avoid is having to rebuild and redeploy the webapp to get the updated Flex code in it. I want to just build flex and run it against the server.

The flex client is embedded in an HTML page on the server, so in production the users access the client by going to a web page. We're using GraniteDS if that's important.

Update

I'm managed to cobble something together, but it's ugly.

  1. I made a copy of our wrapper HTML page and fixed the links to refer to the SWF in target
  2. I setup the IntelliJ run config to point to that HTML page
    • I set the 'Place SWF file in a local-trusted sandbox' to true
  3. Hardcoded the {server.name}, {server.port}, and {context.root} values in the service-config.xml GraniteDS config file to localhost, etc.

I can mavenize #1, but #3's isn't really a permanent solution. That part is still a problem because I can't check this in. Any improvements or alternative solutions?

Upvotes: 4

Views: 615

Answers (1)

James Ward
James Ward

Reputation: 29433

Most Flex apps don't really use the services-config.xml for client channel configuration because this hard codes the urls into the SWF. A better solution is to externalize the configuration. Most of the Flex frameworks (Swiz, Robotlegs, etc) provide a nice way to externalize the channel config to an XML file. However you can also roll your own XML-based client channel configuration.

Upvotes: 1

Related Questions