Skip to content

flex notes

ActionScript 3
Flex Charting
LiveCycle Data Services ES
RPC services
Data Management Service
Message Service.

In FlexBuilder :
trace() method to debug.
Avoid using pixel and use percentage.

Data model can be defined in an MXML tag, an ActionScript function, or an ActionScript class.

MXML  for simple data, use ActionScript for more complex
Data Model tags:
=======================
<mx:Model>  compiled into ActionScript object of type mx.utils.ObjectProxy,  contains a tree of objects , with no type information.
Contains no business logic.
script-based models
There is no advantage to using a script-based model instead of an MXML-based model.
Class-based models
to store complex data structures with typed properties, or to execute client-side business logic by using application data.
Also, the type information  is retained on the server

EVENTS
=========================
Events can be looked at as: System(creationComplete,Initialize, Show) and User Events(click,change,mouseDown)
Event listeners can be registered either through inline MXML code or through an Actionscript code

Parent visual obj = DisplayObject class child of EventDispatcher.
Children = tree is “display list”
Stage->System- Manager-> Application
Child containers and components are leaf nodes of the tree
Event – capturing, targeting and bubbling phase.
EventDispatcher implements IEventDispatcher interface
Every object use addEventListener() inherited from EventDispatcher

EventDispatcher is not just a “dispatcher”, it implements the complete event model
Commonly used methods:
addEventListener()
dispatchEvent()
hasEventListener()
willTrigger()

LayoutContainers:
NavigationContainer – Accordion,ViewStacks.
ControlBar.
N-Control = LinkBar, TabBar, ButtonBar, xxx

====================================
7th August 2008.

Livecycle DataServices – uses a message framework.
– Msg Svc
– Remoting Svc
– Data Mgmt Svc

This msg framework works through channels and endpoints.

Channel – encapsulates the msg format, network format, network protocol. == tunnel that connects client to server.
Many  message formats – HTTP, AMF (Action Msg Format) , RTMS (Real times msg’g svc) that work with network protocal.

Channel transforms msg to network specific and send it to the endpoint on server.

Server – endpoint unmarshals messages and sends it to “Msg Broker” that routes them to appropriate service.

Client ->Channel ->End point-> Msg Broker -> (Remoting/ Messaging/DataMgmtSvc ) -> Adapter-> Your Service.

Msging = jms?Realt time?/ DMS = pagination, synchronization,datagrid features.
=========================
Remoting:
=========================
HttpService, WebServices (Soap), RemoteObject (Calls your java method using the AMF protocol).

To use Lifecycle data services: get lcds.war –

Copy the jars from the above war in your own application/lib
Divide service-config.xml this in 4 difft parts:  All below are available only if LCDS is switched on.
remoting-config (AMF usage)
messaging-config (Message svc application)
proxy-config (To set security)
data-config  (To use DMS app)

In service-config:
The channels are specified and configured (All channel  classes are there in jar files)

Collection classes acting as Data Provider to data related controls.

-ICollectionView
-IList
-ICursorView – Enumerator
Implementation = ArrayCollection,XMLCollection

Sort class for sorting. – sortA.softField= new SortFied / control.sort= sortA; control.refresh;
Filter class

Messaging class – mx:producer / mx:consumer ] –>
=====================================================
DATA MANAGEMENT SERVICE – 8th August 2008.
——————————————

Data is replicated/synchronized on multiple clients/servers – handles auto updation across mutiple x client/servers.

identity properties – destination
Send PropertyChangeEvents for the property to be managed – use metadata to avoid coding for this.

A copy of changed object – original copy kept to rever to revertChanges.
Autocommit flag
-if set to false – only the Q updated not server side objects.
-If set to true – Q is committed to server after each changes is made.
-CommitQueueMode property.
(Default, Auto – Dependency check made (Is this update needed? +/-),NoWAIT – no dependency check)

Client = DataStore
ServerSide = DataService

Adapters – 3 types of adapters. Receive request from Message broker.
– java-dao
– sql
– hibernate

Assemblers ->
flex.data.assebler.AbstractAssembler

===========================================================
Flex and Javascript

Javascript:    AC_OETags.js file used for calling functions.

Template and Startup Params
flashVars properties – are read in runtime
Send flashVars as paramters to AC_FL_RunContent() function in the template file –
like – initParam for servletContext parameters.

ExternalInterface API – communicate b/w actionScript and FlashPlayer container.
import flex.external.*;
call()            – calls method in flashPayer ( actionscript calls javascript)
addCallback()     – Registers a method (javascript method calls actionscript)

navigateToURL()  loads doc from  another doc.
Depends on domain based seuciry restrictions – flags : allowScriptAccess, allowNetworking in template file.

Template file is for – creating the html for generic container settings (javascript/security/web context param). HistoryManager class for saving information for access from back button.

XMLListCollection for binding to a tree and manipulating xml elements.

Bridge js files for Flex/AJAX.

Advertisements
No comments yet

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: