DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
  1. DZone
  2. Coding
  3. Java
  4. Enterprise Java Flex Applications – Architectural Approaches

Enterprise Java Flex Applications – Architectural Approaches

Ashish Arya user avatar by
Ashish Arya
·
Dec. 28, 10 · Interview
Like (0)
Save
Tweet
Share
9.43K Views

Join the DZone community and get the full member experience.

Join For Free

Rich internet applications are 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.

Advantages:

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.

Disadvantages:

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.

Advantages:

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.

Disadvantages:

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.

Advantages:

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.

Disadvantages:

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

 

Advantages/Strengths:

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.

Disadvantages/Weaknesses:

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.

 

From http://ashisharya2003.blogspot.com/2010/12/enterprise-java-flex-applications.html

FLEX (protocol) application Java (programming language) Web Service

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Public Key and Private Key Pairs: Know the Technical Difference
  • Unlock the Power of Terragrunt’s Hierarchy
  • How To Create a Failover Client Using the Hazelcast Viridian Serverless
  • 5 Steps for Getting Started in Deep Learning

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: