Thursday, December 23, 2010

Enterprise Java Flex Applications – Architectural Approaches

Rich internet application is becoming the new face of web based enterprise applications and flex is coming up as unanimous choice in this category. In this article, I presented few architectural approaches to use flex in java environment to develop web based enterprise solutions. Also, I tried to capture few advantages and challenges involved in using flex technology.

Architectural Approaches for Java Flex Application:

In this section I presented few architectural approaches for developing Rich Internet Enterprise Applications using java flex technology at presentation tier.

Architectural Approach 1: Using Flex HTTP Services:

Figure 1: Java Flex with JSP/Servlet/Struts at web tier

In this architecture approach the presentation layer (which consists of flex) uses HTTP services to communicate with server (web tier). The communication point on server side could be a JSP or Servlet which outputs the information in XML format instead of HTML format. Thus even frameworks like Struts or JSF can be used, but then these frameworks will be responsible for only generating the data to be given to presentation tier and not to generate the HTML screens. The flex layer then receives the data, parse it (can be automated) and then present it to user.


1. With this architectural approach, we can still use the standard n-tier J2EE enterprise architecture.

2. This approach requires only web tier to be molded slightly (as to generate XML data instead of HTML), rest of the layers will work irrespective of the presentation tier.

3. This architectural approach involves true separation of presentation logic.


1. This approach requires the web tier to generate XML data instead of HTML. For this the web tier needs to be modified and hence slightly bind to flex.

2. This approach doesn’t use the core reason of web tier presence. The web tier doesn’t serve its purpose fully here. If the presentation layer is fully in flex (not a mix of JSP/Flex), web tier presence would be an overhead.

3. Generating XML data at server end and then parsing it back at client end, is always an overhead.

Architectural Approach 2: Using Web Services:

Figure 2: Java Flex with SOAP Web Services

In this approach, important business functionalities are exposed as web services which are consume by Flex presentation layer. In this case, since there is no web tier, the flex layer becomes thicker and heavier as not only it has to call web services and parse the outcome but also has to perform some application logic which could have been delicate to web tier.


1. This is one more step towards SOA architecture.

2. Complete loosely coupled architecture as the same web services can be consumed by other presentation technologies or applications (like desktop application) irrespective of underlying technologies or platform.


1. With absence of web tier, the complete application and presentation logic lies with flex, which also means lots of code written in flex.

2. Can’t be used if presentation tier needs JSP and Flex combination. Helpful only for pure flex presentation.

3. Overhead of web service consumption, data serialization and parsing.

Architectural Approach 3: Using Flash Remoting (BlazeDS):

Figure 3: Java Flex with BlazeDS Data Services

This is a more Flex-kind of approach. In this approach Flex BlazeDS or LiveCycle data services are used at web tier. Data services tools exposed the java (pojo) classes as services which can be called directly from flex. The java objects are converted into ActionScript objects and then serialized using AMF binary format.


1. A cleaner and more flex like approach.

2. It’s quite fast as well compared with other approaches.

3. The same pojo’s can be used to expose as web services for other applications.


1. Again with absence of web tier (JSP/Servlet), the complete application and presentation logic lies with flex, which also means lots of code written in flex.

2. Can’t be used if presentation tier needs JSP and Flex combination. Helpful only for pure flex presentation.

Java Flex Technology: Advantages and Disadvantages


1. Flex provides excellent user interface without much efforts. The UI components are rich from look-n-feel as well as from functionality perspective. Many UI features like validation, waiting/loading icons, hover effects, resizable components, layouts etc comes inbuilt with flex which otherwise would take lot of extra efforts if coded using HTML/JS.

2. Flex unanimously is the best choice when it comes to media oriented rich user interface.

3. If developed using Flash Builder (which is a paid plugin in Eclipse IDE), rich UI can be built easily without much efforts. In other words, rich user interface developed within no time.

4. Flex handles data more efficiently and effectively as compared to browser HTML processor.


1. First and the foremost disadvantage of using Flex technology is that it requires an additional environment to run. In case of RIA, to open screens in web browser, it requires additional plugins to be installed. Although this sounds very trivial but in many companies and firms this may not be possible due to various security constraints.

2. The IDE (Flash Builder) is paid software. This adds additional costs to the project. Although the browser plugin is freely downloadable which doesn’t add any cost at run time.

3. One needs to learn additional language (ActionScript) while working with Flex.


nikunj said...

Very Nice Article.


Nilesh Makani said...

nice details in java,visit this post for any other information visit this post How performance of Java enterprise apps can be enhanced?

Nilesh Makani said...

Very Nice Post in java development guide to java read more Enterprises taking Java application development seriously- But why?

Kamila Grzybowska said...

Great article. I am beginner Java programmer and I appreciate every useful tip. I love to read your blog. I can always fund something interesting in here. I am waiting for more your posts.
Thank you

shasthika said...

perfect explanation about java programming .its very useful.thanks for your valuable training in chennai | java training in velachery

Geetha Devi said...

It's interesting that many of the bloggers your tips helped to clarify a few things for me as well as giving... very specific nice content. java training institutes in chennai | java j2ee training institutes in velachery

vignesjoseph said...

Well done! You read this article style is really good. I'll read so many blogs Java Related But your sites content amazing.It's magnificent post.
Hadoop Training in Chennai | Java Training in Chennai

raj kumar said...

Nice blog.., I think you are very experience blogger. You handle very fantastic words. Thanks for sharing.keep sharing more blogs.

Core Java Online Training

ranasing rajkumar said...

Thanks Admin for sharing such a useful post, I hope it’s useful to many individuals for whose looking this precious information to developing their skill.want to build your website

White Label Website Builder

calypsoclub said...

Thanks for sharing this information its really helpful
Enterprise Application Services Indore

Tekzee Technologies said...

Thanks for sharing this article..
If you are looking for any Cloud,Mobile & Enterprise Solutions hire Takzee. They have team of passionate individuals AWS APN Managed Partner Who are providing AWS Migration Services in Indore.
Enterprise Application Services indore
Enterprise Application development company

Melisa said...

Hi, JAVA is not at all difficult all you need is to clear your concepts mainly because the concepts of JAVA programming have been taken from day to day life examples.J2EE Training in Chennai | JAVA Training in Chennai

jhansi joe said...

Hi Admin, I went through your article and it’s totally awesome. You can consider including RSS feed for easy content sharing, So that you can drive huge traffic to your blog. Hadoop Training in Chennai | Big Data Training in Chennai

Melisa said...

I agree with your post. Android software development kit makes the application development process lot simpler and effective. You can create best performing android application with ease. Android Training Institutes in Chennai | Android Training in Chennai

zasi besant said...

Thanks for one marvelous posting! I enjoyed reading it; you are a great author. I will make sure to bookmark your blog and may come back someday. I want to encourage that you continue your great posts, have a nice weekend!

Java Training in Chennai

Java Training in Bangalore

Java Training in Bangalore

Melisa said...

I agree with your thoughts!!! As the demand of java programming application keeps on increasing, there is massive demand for java professionals in software development industries. Thus, taking training will assist students to be skilled java developers in leading MNCs.
Java Training in Chennai


I feel really happy to have seen your webpage and look forward to so
many more entertaining times reading here. Thanks once more for all
the details.

AWS Training in Bangalore

AWS Training in Bangalore

Nandhini said...

Interesting post! This is really helpful for me. I like it! Thanks for sharing!
Mobile application developers in Chennai | PHP developers Chennai


Those guidelines additionally worked to become a good way to
recognize that other people online have the identical fervor like mine
to grasp great deal more around this condition.

java Training in Bangalore

java training in chennai

John Alert said...

Hi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me.. I am a regular follower of your blog. Really very informative post you shared here. Kindly keep blogging. If anyone wants to become a Java developer learn from Java EE Online Training from India. or learn thru Java EE Online Training from India . Nowadays Java has tons of job opportunities on various vertical industry.

Amirtha rao said...

This technical post helps me to improve my skills set, thanks for this wonder article I expect your upcoming blog, so keep sharing...
JAVA Course in Chennai|Best JAVA Training in Chennai

Amirtha rao said...

This data is magnificent. I am impressed with your writing style and how properly you define this topic. After studying your post, my understanding has improved substantially. Thanks for taking the time to discuss this, I feel strongly about it and love learning more on this topic.
Hadoop Training in Chennai|Hadoop Training Chennai|Big Data Training in Chennai

Andria BZ said...

I really enjoyed while reading your article, the information you have delivered in this post was damn good. Keep sharing your post with informative content.
Android Training Chennai|Best Android Training institute in Chennai

Nicholas de said...

This is extremely great information for these blog!! And Very good work. It is very interesting to learn from to easy understood. Thank you for giving information. Please let us know and more information get post to link.

Devops interview Questions

Gopal Ainavalli said...

Nice information about test automation tools my sincere thanks for sharing post Please continue to share this post.

salesforce crm online training

Unknown said...

Really it was an awesome article...very interesting to read..You have provided an nice article....Thanks for sharing..
java training in chennai
java course in chennai