First of all - what is FLEX?
Flex is, basically, a (mostly) client-side technology for building RIA applications. It's usage is free of charge, however the FlexBuilder (IDE used to help develop Flex applications) is not.
In short Flex allows the creation of MXML files defining page structure (panels, forms with buttons, lists, etc.) and converting this into a SWF file, which could later on be used by the Flash runtime to display the content of the page in a browser (or somewhere else).
So where does ActionScript fit in?
Where does Java fit in this picture?
Remember how I mentioned that Flex is mostly client-side? This is because in practise we rarely create a web application that needs to be run entirely on the client because, obviously, this would defeat the purpose of having a server.
Typically we would want only a small part of the controller code to be executed on the client (for example, if we take JSF for example, we would want the validation phase, the binding phase, the converting phase and etc.) while other parts (such as database operations or heavy calculations) would still take place on the server in our (probably) stateless beans that contain the business logic.
No matter what the actual server implementation is, Flex provides a remoting mechanism called BlazeDS which handles the communication between controllers and views and the Java back end (essentially providing serialization, de-serialization and method invocation on the server and client). Adobe provides a good article on this topic that explains just how this works.
What else is there about Flex that I'd like to know?
There is a lot, actually. A quick (and incomplete) list would be:
- The ability to apply style sheets in a similar manner to how CSS is applied on HTML
- ... which comes with the ability to create whole themes, see the overly-complicated documentation that Adobe provides on this topic
- The ability to unit test your code using FlexUnit