InfoQ

News

FleXtense Helps Flex Applications Access Web Services

Posted by Moxie Zhang on Mar 24, 2008 07:24 AM

Community
Java
Topics
Rich Internet Apps
Tags
Flex,
Web services

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.

No comments

Reply

Exclusive Content

Rustan Leino and Mike Barnett on Spec#

Rustan Leino and Mike Barnett of Microsoft Research discuss the technology in Spec# and its futures.

10 Ways to Screw Up with Scrum and XP

Henrik Kniberg talks about 10 possible reasons to fail while doing Scrum and XP. Maybe the team does not have a definition of what Done means to them, or they don't know what their velocity is.

Tips from a Top Sports Team Coach

This article outlines 9 principles Marc Lammers discovered while building the world’s best field hockey team, mapping them to software development practices.

SOA Governance: An Enterprise View

Michael Poulin explains the necessity for SOA governance to ensure an Enterprise SOA's success, relying on concepts from the OASIS SOA Reference Model and Reference Architecture.

Developing Portlets using JSF, Ajax, and Seam (Part 2 of 3)

This article covers setting up a RichFaces portlet using JBoss Portlet Container and JBoss Portlet Bridge, deploying a RichFaces portlet, and RichFaces capabilities.

Scalability Worst Practices

This article discusses scalability worst pratices including The Golden Hammer, Resource Abuse, Big Ball of Mud, Dependency Management, Timeouts, Hero Pattern, Not Automating, and Monitoring.

Do the Hustle

Obie Fernandez shares his experience selling consulting services for both Thoughtworks and Hashrocket and give tips how Ruby developers can work with clients.

Natural Laws of Software Development - Deriving Agile Practices

Jeffries and Hendrickson derive Agile practices from the natural laws of software development. They don't just say "Be Agile!", but they explain why Agile practices make perfect sense.