Skip to main content

AJAX and RIA Tools - Flex


2008 is going to be an important year for Rich Internet Applications. Most organizations are delivering or planning to deliver Rich Internet Applications; however, at the same time, most IT managers are facing a dilemma: which Rich Internet Application technology and platform to use? The number of different frameworks and libraries is too vast to even consider evaluating a fraction of them.

To make this task manageable, to narrow things down to three different technologies for delivering enterprise-level Rich Internet Applications. While the first two (JSF and Flex) are proven technologies that have been used for a numbers of years, JavaFX is a new declarative language for building rich user interfaces using Java.

Flex:

The one for delivering Rich Internet Applications is the high-performance Flash
player from Adobe. Flash player (version 9) is a ubiquitous lightweight virtual
machine that's installed as a plug-in inside a browser and runs Flex applications.
Flex provides a declarative language called MXML that offers out-of-the-box graphical UI components as well as ActionScript, an object-oriented programming language, to build advanced user interfaces. Compiled Flex applications run inside the Flash virtual machine to enable a much richer user experience than would be possible in a standard Web browser where the markup (HTML) and JavaScript are interpreted. Flex is easily extendable and provides easy integration with back-end technologies such as Java, PHP, and ASP.

Let's look at the demo application using Flex. Flex provides a declarative
way of defining the UI. The compiled file then runs inside the Flash player
installed as plug-in inside a Web browser. Here's how the application could
be declared:


<?xml version="1.0" encoding="utf-8"?>

<mx:Application xmlns:mx=http://www.adobe.com/2006/mxml layout="absolute">

<mx:Script>

<![CDATA[

[Bindable]

private var numOfClicks:Number = 0;


public function click():void{numOfClicks++;

}

]]>

</mx:Script>


<mx:Panel x="10" y="10" width="250" height="114"
layout="absolute" title="Flex">

<mx:Button label="Hit Me" click="click()" y="10"
horizontalCenter="0"/>

<mx:Label text="Number of hits: {numOfClicks}" y="40"
horizontalCenter="0"/>

</mx:Panel>

</mx:Application>


The model for the UI is defined inside the mx:Script element.


Popular posts from this blog

user Emulator to debug Windows Mobile 6 in Vista

open Windows Mobile Device center Mobile Device Setting -> Connection Setting -> Allow connections to one of the following: Change to DMA in vs 2008, Go to Tools -> Device Emulator Manager select one from list, for example: windows mobile 6 professional emulator right on to cradle waiting for popup to establish the relationship (be sure get internet connection from Emulator)

Android Developer Learning Resource

Developing In Eclipse, with ADT http://developer.android.com/guide/developing/eclipse-adt.html Signing Your Applications http://developer.android.com/guide/publishing/app-signing.html Compile and sign with Eclipse ADT To create a signed and aligned .apk in Eclipse: Select the project in the Package Explorer and select File > Export . Open the Android folder, select Export Android Application, and click Next . The Export Android Application wizard now starts, which will guide you through the process of signing your application, including steps for selecting the private key with which to sign the .apk (or creating a new keystore and private key). Complete the Export Wizard and your application will be compiled , signed , aligned , and ready for distribution. DroidDraw is a graphical user interface (GUI) builder for the Android platform http://code.google.com/p/droiddraw/

android textsize sp, px, dp

android:textSize Since:  API Level Size of the text. Recommended dimension type for text is "sp" for scaled-pixels (example: 15sp). Must be a dimension value, which is a floating point number appended with a unit such as " 14.5sp ". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). This may also be a reference to a resource (in the form " @[ package :] type : name ") or theme attribute (in the form " ?[ package :][ type :] name ") containing a value of this type. This corresponds to the global attribute resource symbol  textSize .