Friday, December 5, 2008

Why Use Abobe Flex?

Here are some reasons you might want to use Abobe Flex (Flash) to build the UI (or some part thereof) for your next web application:
  • It's an open source development kit.
  • It comes with everything needed to build and deploy Flex UIs. It does not include an IDE, but you can buy an IDE or plug-in for Eclipse to dramatically ease development.
  • It is supported and principally developed by Adobe. Hence, it has commercial backing with invested cooperate interest. Some would argue this lowers the risk of Flex becoming vaporware anytime soon. Adobe also offers commercial support.
  • It has a large and growing development community. For example, it has a sister open source project for unit testing called FlexUnit.
  • It is used by many large and small corporations.
  • It is based on standards (at least we can argue it is; JavaScript 2.0, HTTP, XML, etc.) and proven technology, such as Flash.
  • It has extensive documentation.
  • It has a large library of existing UI and non-UI components. One can also buy libraries of custom components (e.g. charting and graphing).
  • It is flexible and extensible. For example,
    • it can be integrated into any existing web page without completely taking over that web page (it can do that too if desired!);
    • all GUI and non-GUI components can be extended and customized;
    • it can access a number of back end data sources and application frameworks, including Java Servlets, Flex Data Services, and REST; and
    • it can use different communication mechanisms, including raw TCP/IP sockets, HTTP, and SOAP.
  • It works well with Java back ends, such as servlets and EJBs. Hence, you can harness existing expertise and code base with few changes.
  • The development model is easy to use and understand. For example, you can use XML to layout GUI components, JavaScript 2.0 (which is Java like, at least more so than JavaScript 1.5) for attaching behavior to the components, and a simple set of APIs for accessing the server.
Although this is supposed to be a post about why you should use Flex, I have to add this negative point because it caused me no end of grief in my last project: Flex/Flash does not have a component to display standards compliant HTML/CSS. So, if you're like me, and you have some existing HTML content you want to display in the UI, you're out of luck. There are some options available, such as rendering content outside Flash and overlaying it on Flash using IFrames, but I was never satisfied with them. Here are some links about using such approaches: