HTML/CSS Service

Showcase

2 comments0 views
1 Star2 Stars

Exception Handling with Flex

Category: Flex Examples, flex tutorials    |    16,971 views    |    2 Comments

A common hurdle a developer may face is dealing with exceptions in BlazeDS. When an exception is thrown in Java, how do we handle this in flex? Here is a simple and flexible approach inspired by Scott Morgan.

1. Create a Java Class that extends RuntimeException.

package com.flexpasta.exception;
public class FlexException extends RuntimeException
{
public FlexException(String message)
{
super(message);
}
}

Read more…

Share/Save/Bookmark

 

Creating a simple image gallery with the Flex TileList control

Category: Flex Examples    |    19,171 views    |    2 Comments

Flex Photo gallery in Flex using the TileList control, Image control, and the PopUpManager class.

Full code after the jump.

View MXML

<?xml version="1.0" encoding="utf-8"?><mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"layout="vertical"verticalAlign="middle"

backgroundColor="white">
<mx:Style>

Read more…

Share/Save/Bookmark

 

Java

Category: Flex with JAVA    |    310 views    |    Add a Comment

Even though the Java programming language became popular largely because of applets and the
famous dancing Duke (http://java.com/en/download/help/testvm.xml ), applets haven’t become
Java’s main use pattern. The main reason: the large footprint of the required JVM (currently 16MB).
And there are other drawbacks. For instance, although Java Swing was meant for a platform-independent
look-and-feel, absent any good-looking off-the-shelf GUI widgets it was hard selling it to
the public. In this regard the Flash and Flex creators did a much better job with their eye-candy
components. Or take audio and video integration. Today people are used to having streaming au-
CHAPTER 1
RIA WITH ADOBE FLEX AND JAVA 7
dio and video components embedded in Web pages. But the multimedia Java API remains rudimentary,
to say the least.
There are some efforts to minimize the size of the JVM used by Web browsers and the Java Browser
Edition project now needs “only” about 3MB to run a primitive Hello World applet. But this can’t
compete with Flash Player 9, which managed to accommodate two virtual machines in a 1.2MB
download that can run any RIA, however complex.
Another issue with Java applets is that they don’t offer a seamless download of the proper version of
the JVM along with the applet. Flash Player’s express install does precisely that.
Having said that, we must acknowledge that Java Swing is a very mature and robust technology
for creating GUI applications delivered either over the Web or installed on the desktop. You can do
literally anything with Java Swing – if you can afford it. No, you don’t pay licensing fees, but because
of the longer development cycle and the need to engage expert programmers, industrial-size Swing
projects are usually quite expensive to build and maintain.

Share/Save/Bookmark