Posts in Category "BlazeDS"

New Features Added to Adobe ActionScript API Reference (ASDoc)

Use the ActionScript® 3.0 Reference for the Adobe® Flash® Platform as the API reference for many Adobe products, including Flash Player, AIR, and Flex. The new release of the ActionScript Reference (http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/) contains several new features:

  • Support for a quick search added to the Packages and Classes lists.The quick search lets you filter the content of the Packages and Classes lists as you type. This feature is not supported on IE 7 and IE 8.
  • When displaying all classes in the Classes list, selecting a class name in the list continues to display all classes.In the previous release, selecting a class name in the Classes list while displaying all classes changed the Classes list to display only the classes in the package of the selected class.
  • Added a Home link to the top of all pages.The Home link lets you navigate back to the index.html page from anywhere in the reference.
  • Fixes for issues associated with localization and translation.

 

Stephen Gilson
Flex Doc Team

LiveCycle Data Services 3 and doc available

LiveCycle Data Services ES2 version 3 is now available. Download the free developer edition.

LiveCycle Data Services documentation is available online:

* Using LiveCycle Data Services HTML | PDF
* Application Modeling Technology Reference HTML | PDF
* ActionScript Language Reference HTML
* Installing LiveCycle Data Services HTML
* Javadoc HTML
* Release Notes HTML
* Quick Starts HTML

LiveCycle Data Services 3 Beta Available

LiveCycle Data Service 3 Beta 1 is now available on Adobe Labs.

The new model-driven development features in LiveCycle Data Services 3 offer a huge leap in productivity and ease-of-use for end-to-end applications. You start an application by creating a data model (a simple XML file) in the new “Modeler” editor that plugs into Flash Builder. From that model, you automatically generate data access logic on the server and Flex client code for working with the server code.

You can even generate much of a model by dragging existing SQL database tables into the Modeler editor. When you save the model, client code is automatically generated. When you deploy the model to the server, a fully functional Data Management Service destination is automatically generated on the LiveCycle Data Services server. You can support even the most advanced Data Management Service features just by creating and deploying a model.

Using Flash Builder with LiveCycle Data Services, you can now build simple or complex data-driven applications without writing any server-side code or configuration files. You can also take full advantage of the new Flash Builder 4 features for building the client side of data-driven applications.

We would love to get your feedback on this release and the documentation. To learn more:

Calling remoting destinations from Flash or Java applications

The legacy NetConnection API of Flash Player provides a way to call remoting destinations from a standard (non-Flex) Flash application or from ActionScript in a Flex application if desired. The new Java AMF Client in BlazeDS gives you a Java API patterned on the NetConnection API but for calling remoting destinations from a Java application. You can use either of these APIs with BlazeDS, LiveCycle Data Services, or third-party remoting implementations.

Call a remoting destination from a Flash application

You can use the Flash Player flash.net.NetConnection API to call a BlazeDS remoting destination from a Flash application. You use the NetConnection.connection() method to connect to a destination and the NetConnection.call() method to call the service.
The following MXML code example shows this legacy way of making remoting object calls with NetConnection instead of RemoteObject:

<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%"
creationComplete="creationCompleteHandler();">
<!--
-->

<mx:Panel id="mainPanel" height="100%" width="100%">
<mx:HBox>
<mx:Label text="Enter a text for the server to echo"/>
<mx:TextInput id="ti" text="Hello World!"/>
<mx:Button label="Send" click="echo()"/>
<mx:Button label="Clear" click='ta.text = ""'/>
</mx:HBox>
<mx:TextArea id="ta" width="100%" height="100%"/>
</mx:Panel>
<mx:Script>
<![CDATA[
import flash.net.NetConnection;
import flash.net.ObjectEncoding;
import flash.net.Responder;
private var nc:NetConnection

private function creationCompleteHandler():void
{
nc = new NetConnection();
nc.objectEncoding = ObjectEncoding.AMF0;
nc.connect("http://[server]:[port]/yourapp/messagebroker/amf" );
}
private function echo():void
{
nc.call( "remoting_AMF.echo", new Responder( resultHandler, faultHandler ), ti.text );
}
private function resultHandler(result:Object):void
{
ta.text += "Server responded: "+ result + "\n";
}
private function faultHandler(fault:Object):void
{
ta.text += "Received fault: " + fault + "\n";
}
]]>
</mx:Script>
</mx:Application>

Call a remoting destination from a Java application

The Java AMF Client is new Java client API in the BlazeDS flex-messaging-core.jar file that makes it simple to work with remoting destinations from a Java application. The Java AMF Client is similar to the Flash Player flash.net.NetConnection API, but uses typical Java coding style rather than ActionScript coding style.

The Java AMF Client classes are in the flex.messaging.io.amf.client* package in the flex-messaging-amf.jar file. The primary class of the Java AMF Client is the AMFConnection class. You connect to remote URLs with the AMFConnection.connect() method and call the service with the AMFConnection.call() method. You catch ClientStatusException and ServerStatusException exceptions when there are errors.
Here’s a simple example of how you can use AMFConnection to call a Remoting Service destination from a method in a Java class:

public void callRemoting()
{
// Create the AMF connection.
AMFConnection amfConnection = new AMFConnection();

// Connect to the remote url.
String url = "http://[server]:[port]/yourapp/messagebroker/amf";
try
{
amfConnection.connect(url);
}
catch (ClientStatusException cse)
{
System.out.println(cse);
return;
}

// Make a remoting call and retrieve the result.
try
{
Object result = amfConnection.call("remoting_AMF.echo", "echo me1");
}
catch (ClientStatusException cse)
{
System.out.println(cse);
}
catch (ServerStatusException sse)
{
System.out.println(sse);
}
// Close the connection.
amfConnection.close();
}

The Java AMF Client automatically handles cookies similarly to the way in which web browsers do, so there is no need for custom cookie handling.

Using BlazeDS with Maven

If you are interested in getting started with BlazeDS, particularly with Maven, Espen Dalløkken has a great blog article and demo application:

English:

http://www.totalworldannihilation.org/blog/2008/02/22/just-blaze-getting-started-with-blaze-ds/

Norwegian:

http://dallokken.com/espen/2008/06/blazeds-og-flex/

LiveCycle Data Services ES 2.6 documentation

We are happy to announce that LiveCycle Data Services ES 2.6 was just released and includes many documentation improvements. Much of the documentation has been revised and reorganized, and there are completely new sections on:
Getting Started
– Introduction
– Building and deploying

Architecture
– General architecture
– Channels and endpoints
– Managing session data

You can get the documentation here:
http://www.adobe.com/support/documentation/en/livecycledataservices/

The main product page is here:
http://www.adobe.com/products/livecycle/dataservices/

Thanks go out to the LiveCycle Data Services development and quality engineering teams, who put a great effort into shaping and reviewing this content. Special thanks go to Mete Atamel, Seth Hodgson, Ed Solovey, and Jeff Vroom for their contributions.

Building Adobe LiveCycle Data Services ES Beta 2 Applications

Adobe LiveCycle Data Services ES Beta 2 applications consist of two parts: client-side code and server-side code. Client-side code is a Flex application written in MXML and ActionScript and deployed as a SWF file. Server-side code is written in Java and deployed as Java class files or Java Archive (JAR) files. You can develop Adobe LiveCycle Data Services ES applications in Flex Builder, or in your own IDE. This article describes how to set up your development environment to compile, debug, and deploy LiveCycle Data Services ES applications.

Download the PDF: Building and Deploying LiveCycle Data Services ES Applications

Adding Java Development Tools to Flex Builder Standalone

Many Flex, Adobe AIR, Adobe BlazeDS, and Adobe LiveCycle ES developers choose to use the Eclipse plug-in configuration of Flex Builder so that they can develop Java code in the same IDE that they use to develop the MXML and ActionScript code. While the standalone version of Flex Builder does not contain tools to edit Java code by default, you can install them as Eclipse plugins. That lets you use the standalone version of Flex Builder to edit Java code.

To install the Java development tools in the standalone version of Flex Builder:

1. Use the Help > Software Updates > Find and Install menu command to open the Install/Update dialog box

2. Select Search for new features to install.

3. Click Next.

4. In the results, choose Europa Discovery Site.

5. Click Finish.

6. Select the Java Development package to install.

7. Click Next.

8. Accept the license.

9. Click Finish.

Note: You might be prompted to install additional plugins required by the Java Development package.

To change perspective:

1. Use the Window > Perspective > Other to access all perspectives.

You can also click the Open Perspective button in the upper-right corner of the workbench window, then select a perspective from the pop-up menu.

2. Select Java from the list of perspectives.

 

Stephen Gilson
Flex Doc Team

Measuring Message Processing Performance in BlazeDS

One place to examine application performance is in the message processing part of the application. To help you gather this performance information in BlazeDS, you can enable the gathering of message timing and sizing data.

When enabled, information regarding message size, server processing time, and network travel time is available to the client that pushed a message to the server, to a client that received a pushed message from the server, or to a client that received an acknowledge message from the server in response a pushed message. A subset of this information is also available for access on the server.

Download the new chapter’s PDF: Measuring Message Processing Performance

BlazeDS Beta 1 Documentation

Adobe has made a very exciting announcement. We announced a new open source data services project called BlazeDS. BlazeDS Beta 1 is now available on Adobe Labs.

BlazeDS contains the latest versions of the Message Service, Remoting Service, and Proxy Service that were previously only available as part of Adobe® LiveCycle® Data Services ES. BlazeDS is a server-based Java remoting and messaging technology that lets developers easily connect to back-end distributed data and push data in real time to Adobe Flex™ and Adobe AIR™ applications.

BlazeDS usage documentation is available in HTML format on LiveDocs and as a PDF file:

BlazeDS ActionScript and Java reference documentation is available in these ZIP files:

Information about setting up a BlazeDS project in Flex Builder 3 is available here:

http://learn.adobe.com/wiki/display/Flex/Using+Flex+Builder+with+your+J2EE+server

Key features and benefits of BlazeDS are highlighted in the release notes. A great way to get started quickly with BlazeDS is the Test Drive application. The Test Drive is one of the sample applications included in the BlazeDS installation.