Archive

Archive for July, 2010

Flex 4: Asynchronous Token

Flex is all about Event Driven Development

Consider an enterprise application in which a user can place purchase orders for some
parts and request price quotes from various suppliers. In this case, the user may click
several buttons, resulting in server-side calls to one or more destinations. On each click
event of the button, a RemoteObject sends a new request to the server.

Here’s the million-dollar question: how can the application code map arriving result
objects back to the initial requesters if they can come back to the client in an arbitrary
order?.

Ans: Asynchronous Token Pattern
The goal of the Asynchronous Token pattern is to properly route the processing on the
client in response to the data arriving asynchronously from the server.

OK, How do i design using it:
Flash 4 Builder can generate CallResponders for your service calls and what you all have
to do is write your business logic.
<fx:Script>
<![CDATA[
import mx.controls.Alert;
import mx.rpc.events.ResultEvent;
protected function getHelloString():void
{
getHelloStringResult.token = excelDbService.getHelloString();
}
protected function getHelloStringResult_resultHandler(event:ResultEvent):void
{
Alert.show( getHelloStringResult.lastResult);
}
]]>
</fx:Script>
<fx:Declarations>
<s:CallResponder id=”getHelloStringResult” result=”getHelloStringResult_resultHandler(event)”/>
<services:ExcelDbService id=”excelDbService” fault=”Alert.show(event.fault.faultString + ‘\n’ + event.fault.faultDetail)” showBusyCursor=”true”/>
</fx:Declarations>
reference: Enterprise Development with Flex and Flash 4 tutorials
Categories: Flex, Uncategorized

Java Code findings DashBoard using Flex on AppEngine

Experience the Java Architectural/Code findings at glance.
This Application uses simple Flex XML features and Flex Charts
Feel the Experience at: demo

Export Excel data into Google’s BigTable using JPA, Flex

This is a Simple Flex Application that manages your Excel data and exports into Google’s BigTable on Google’s App Engine.

Presentation Layer: Flex 4

Communication Layer: AMF Blazeds 4

Integration Layer: Spring 3

Persistence Layer: JPA

Infrastructure:  Google’s App Engine

Click here to experience the demo

Categories: Uncategorized

Flex 4

Familiar with Flex? Make the most of what’s new in Flash Builder 4 and Flex 4.

A Flex 4 application is just a Flash movie (SWF), which lives inside a web
page loaded by a web browser that has Flash 10 installed.
Flex 4 applications typically use three XML namespaces, since Flex
4 is introducing an entirely new set of components (the Spark components).
The old school Halo components are what were used in Flex 1-3.
They have the mx prefix by convention, since that’s what was used in
Flex 1 through 3. The namespace for the Halo components is
library://ns.adobe.com/flex/halo. You still need to use the Halo components
where there are no Spark equivalents yet, such as DataGrid.
The new Spark components use, by convention, an s prefix for the
new namespace of library://ns.adobe.com/flex/spark. These components
have “Design in Mind,” which will allow designers and developers
to work together in a more harmonious way.
The fx prefix is for the core Flex namespace (http://ns.adobe.com/
mxml/2009). This is for things like declarations, metadata, and script
blocks—basically, for nonvisual language elements.

Flash Builder 4

Data-centric development with Flash Builder 4

Flash Builder 4 beta has built-in support for services created with ColdFusion, PHP, and Java. Other kinds of services can be used as SOAP web services or HTTP services.

In Flash Builder 4 beta, the new Data/Services panel is the central location for managing and interacting with all of the servers and services used in your application.

Select a DataGrid (grouped under Data Controls in the Components panel) and drag it out onto the page. You’ll notice that the grid isn’t bound to any data; if you run the application now it will just be an empty grid                         with three columns. To have the grid display data that comes back from one of your service operations, simply drag the operation from the Data/Services panel and drop it on the grid.

Flex 4

References: flexblog.com, adobe, Hello! Flex 4.

A Flex 4 application is just a Flash movie (SWF), which lives inside a webpage loaded by a web browser that has Flash 10 installed.

Categories: Flex