I want to build a website that uses Flex/Flash as the GUI, and Java for the business tier, all to be deployed on Glassfish.

Not having done this before, I am wondering how the overall development/build process works.

Flex has an IDE, and I am wondering would I also develop the Java part of the application in the same IDE? Or, do I make the Flex part in the Flex IDE, and the Java part elsewhere, and somehow make them work together?

And, regarding deployment, what are the general pieces involved in this type of application.
I am used to a java website being an EAR or WAR, does the Flex part get built into the EAR/WAR, or is it a separate thing that is deployed independently from the Java artifact?

For the build process, does one build the Flex part separately from the Java part, or can they be built together, i know this is close to the previous question about what pieces are deployed in a Flex/Java application.

Just looking for big picture type answers to get an idea of the development and build process when building a web application.