Ktowes@PangaeaNewMedia.ca Welcome to the New World Kevin Towes Creative and Technical Director...

Post on 17-Jan-2016

219 views 0 download

Transcript of Ktowes@PangaeaNewMedia.ca Welcome to the New World Kevin Towes Creative and Technical Director...

<Kevin Towes> ktowes@PangaeaNewMedia.ca

Welcome to the New World

Kevin Towes Creative and Technical Director Pangaea NewMedia, Inc. Toronto, Canada

:: Certified ColdFusion Professional:: Manager, CFUGToronto:: Professor,

Ryerson University; School of Image Arts, Toronto

Flash Remoting: a Developers Perspective

www.PangaeaNewMedia.ca

<Kevin Towes> ktowes@PangaeaNewMedia.ca

Advent 1

The ADVENT LabsExample can be found@ Macromedia.com

Search for “ADVENT”

This is an excellent example to demonstrate how Flash can supply a rich data management interface.

<Kevin Towes> ktowes@PangaeaNewMedia.ca

Advent 3

<Kevin Towes> ktowes@PangaeaNewMedia.ca

Agenda (:60min)

1.Review examples of Rich-UI2.DISCUSS: The client and Server – Roles

3.Squash the perception of Flash4.Context: Review of how data XFer “was”

done

5.Introduction to Flash Remotinga. Getting Startedb. ColdFusion Componentsc. Invoking CFCs in ColdFusiond. Invoking CFCs in Flash MXe. Debugging Tools (if we have time)f. DataGlue (in case we get Stuck )

<Kevin Towes> ktowes@PangaeaNewMedia.ca

CF & Flash

+

ColdFusion is the Glue that holds it all together

- Ben Forta

What is Flash MX and How does it Work?

<Kevin Towes> ktowes@PangaeaNewMedia.ca

Flash Remoting Availability

Flash Remoting Components are available in:

– ColdFusion MX (native support)– JRUN 4.0 (native support)– IBM WebSphere (add-on)– Microsoft ASP.NET (add-on)

<Kevin Towes> ktowes@PangaeaNewMedia.ca

Remoting: Build the ColdFusion Component

Our application requires 3 Methods inside the Component1. Get the Park Types

::: getParkTypes();

2. Get the List of Parks ( in the selected Type) ::: getParksList(parkType);

3. Get the Details of the Selected Park::: getParkDetails(thisParkName);

<Kevin Towes> ktowes@PangaeaNewMedia.ca

Remoting: Calling the CFC – in ColdFusion

Test the CFC by: Invoke the Component in ColdFusion

<Kevin Towes> ktowes@PangaeaNewMedia.ca

Remoting: Calling the CFC – in Flash MX

(for comparison – review the same command from within Flash)

Invoke the CFC inside Flash

<Kevin Towes> ktowes@PangaeaNewMedia.ca

ActionScript Steps to Connect

1. Develop the Layout2. Include the NetServices Class Files3. Set up the server connection4. Invoke the CFC (consume the web

service)

5. Build a default Responder

<Kevin Towes> ktowes@PangaeaNewMedia.ca

:: Develop the Layout (UI)

What you Need to Know:1) The Timeline 2) Text Fields 3) Flash UI Components

<Kevin Towes> ktowes@PangaeaNewMedia.ca

:: Text Fields and UI Components

TEXT FIELDS

FLASH UI COMPONENTS

<Kevin Towes> ktowes@PangaeaNewMedia.ca

ActionScript Steps to Connect

1. Develop the Layout2. Include the NetServices Class

Files*3. Set up the server connection4. Invoke the CFC (consume the web

service)

5. Build a default Responder

<Kevin Towes> ktowes@PangaeaNewMedia.ca

ActionScript Steps to Connect

1. Develop the Layout2. Include the NetServices Class Files3. Set up the server connection*4. Invoke the CFC (consume the web

service)

5. Build a default Responder

<Kevin Towes> ktowes@PangaeaNewMedia.ca

ActionScript Steps to Connect

1. Develop the Layout2. Include the NetServices Class Files3. Set up the server connection4. Invoke the CFC (consume the web

service)

5. Build a default Responder

<Kevin Towes> ktowes@PangaeaNewMedia.ca

:: Remoting: Calling the CFC – in Flash MX

Invoke the CFC inside Flash

<Kevin Towes> ktowes@PangaeaNewMedia.ca

ActionScript Steps to Connect

1. Develop the Layout2. Include the NetServices Class Files3. Set up the server connection4. Invoke the CFC (consume the web

service)

5. Build a default Responder

<Kevin Towes> ktowes@PangaeaNewMedia.ca

:: Default Responder 1

Flash will invoke a function when it has finished. This function is called the Default Responder:

NameOfFunction_result(returnObject)

<Kevin Towes> ktowes@PangaeaNewMedia.ca

:: Default Responder 2

to populate the ComboBox Componentuse the setDataProvider method.

ComponentName.setDataProvider(dataObj)

<Kevin Towes> ktowes@PangaeaNewMedia.ca

:: Default Responder 3

Access the Database Column By Name

=Result.items[0].ParkName

<Kevin Towes> ktowes@PangaeaNewMedia.ca

DataGlue

DataGlue.BindFormatStrings(lb_ParkList, result, "#parkName# (location: #city#, #state#)",

"#parkName#");

<Kevin Towes> ktowes@PangaeaNewMedia.ca

Debugging

<Kevin Towes> ktowes@PangaeaNewMedia.ca

Macromedia DevCentre

The Macromedia Developers Centre is the best online resource for integrating Flash MX and ColdFusion MX

http://www.Macromedia.com/DesDev/

<Kevin Towes> ktowes@PangaeaNewMedia.ca

Inside Flash MX

NOWAVAILABLE

The mostComprehensive

Book onIntegrating

Flash MX withColdFusion MX

<Kevin Towes> ktowes@PangaeaNewMedia.ca

FlashCFM.com

<Kevin Towes> ktowes@PangaeaNewMedia.ca

Welcome to the New World

Kevin Towes Creative and Technical Director Pangaea NewMedia, Inc. Toronto, Canada

:: Certified ColdFusion Professional:: Manager, CFUGToronto:: Professor,

Ryerson University; School of Image Arts, Toronto

Flash Remoting: a Developers Perspective

www.PangaeaNewMedia.ca