Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News FleXtense Helps Flex Applications Access Web Services

FleXtense Helps Flex Applications Access Web Services

This item in japanese

Most of RIA applications connect to the servers to retrieve data. FleXtense is one of the tools to help a RIA, such as a Flex application, to consume web services. FleXtense 2.0 is scheduled to release in April 2008. InfoQ spoke with Murat Cim and Ozkan Yilmaz, the founder/creator of FleXtense, for details on how FleXtense can help RIA development.

First, Cim explained the motivation to create FleXtense:

Flextense is an application for Flex developers to use web services easily by generating ActionScript communication classes for web services automatically. We have been interested in Flex since it’s first releases. We have been developing web applications using .NET. We started realizing that Flex has a drawback of not giving powerful usage on web services. So we believed that creating such a program that helps to use web services more efficiently and adding some more features to it, like use of web service custom entity and using collections, would be very useful. That’s how we started creating Flextense.

On the number one benefit of Flextense to Flex developers:

Using web services via strongly typed data structures and maintaining rapid and safe codes with its supporting data structures and easy to use interface.

Cim described the challenges encountered to develop Flextense:

The biggest challenge was that there had not been any instance of such an application so that we had to create all the software borders and the structure ourselves. Another obstacle for us was that action script 3.0 does not support a totally object oriented coding environment.

Then, Yilmaz gave some details on how Flextense was developed and how it works:

In developing Flextense we used Visual Studio 2005 as our development tool. What Flextense does in more detail; it reads and analyze the WSDL of a web service you provided, and creates new proxy classes to be used in action script side of Flex. And this classes, by using our core communication library, make you able to connect to that web service with a powerful object oriented environment.

FleXtense creates an ActionScript class with the same name for each defined web service in the WSDL document. The methods in the web service can be reached with this created class. For instance, with a web service called UserService, FleXtense creates a Actionscript class named UserService. The generated code can be used as:

   var service:UserService = new UserService();     ...    service.getUser.send() 

There are public methods generated for the web service ActionScript class, such as "send", "addResponder" and "addFaulter". The other major classed generated are: Result Event Class, Enums Class for enum definition, Collection Class for array elements in WSDL, Entity Class for custom elements and Base Data Type Array. For developers who have worked with Apache AXIS, the open source web service engine, the code generation part should look very familiar.

In the end, Yilmaz provided FleXtense generated class for an example. The attached class is generated for Amazon Web Service. A working Flex demo application developed using the class can be accessed here.

Rate this Article