welcome to ocflex - scalenine : skins and themes for flex and air

24
Welcome to OCFlex Orange County Flex User Group

Upload: others

Post on 12-Sep-2021

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Welcome to OCFlex - ScaleNine : Skins and Themes for Flex and AIR

Welcome to OCFlexOrange County Flex User Group

Page 2: Welcome to OCFlex - ScaleNine : Skins and Themes for Flex and AIR

Flex ShowcaseLet’s look at some cool Flex stuff

Page 5: Welcome to OCFlex - ScaleNine : Skins and Themes for Flex and AIR

What is Flex?Introduction to Adobe Flex™

Page 6: Welcome to OCFlex - ScaleNine : Skins and Themes for Flex and AIR

Introduction to Flex™What is Flex?‣ A way to make SWF files!‣ It is for developers‣ It is for making applications:•On the Web (Flash Player 9)•On the Desktop (AIR)

Page 7: Welcome to OCFlex - ScaleNine : Skins and Themes for Flex and AIR

Flash Player 9‣ New Virtual Machine with JIT‣ 20X performance improvements‣ Reduced memory consumption‣ ActionScript 3.0 - ECMA 4 Compliant‣ Dynamic and Strong typed language‣ ECMAScript for XML (E4X)‣ Seamless One-click upgrade‣ Full backward compatibility

Page 8: Welcome to OCFlex - ScaleNine : Skins and Themes for Flex and AIR

MXML

MXML is the language of Flex

<Application> <WebService id=“ws” wsdl=“catalog.wsdl”/> <Button label=“Get Data” click=“ws.getProducts()”/> <DataGrid dataProvider=“{ws.getProducts.result}”/> <LineChart dataProvider=“{ws.getProducts.result}”/></Application>

Page 9: Welcome to OCFlex - ScaleNine : Skins and Themes for Flex and AIR

MXML

MXML : Components

<Application> <WebService id=“ws” wsdl=“catalog.wsdl”/> <Button label=“Get Data” click=“ws.getProducts()”/> <DataGrid dataProvider=“{ws.getProducts.result}”/> <LineChart dataProvider=“{ws.getProducts.result}”/></Application>

Page 10: Welcome to OCFlex - ScaleNine : Skins and Themes for Flex and AIR

MXML

MXML : Properties

<Application> <WebService id=“ws” wsdl=“catalog.wsdl”/> <Button label=“Get Data” click=“ws.getProducts()”/> <DataGrid dataProvider=“{ws.getProducts.result}”/> <LineChart dataProvider=“{ws.getProducts.result}”/></Application>

Page 11: Welcome to OCFlex - ScaleNine : Skins and Themes for Flex and AIR

MXML

MXML : Events

<Application> <WebService id=“ws” wsdl=“catalog.wsdl”/> <Button label=“Get Data” click=“ws.getProducts()”/> <DataGrid dataProvider=“{ws.getProducts.result}”/> <LineChart dataProvider=“{ws.getProducts.result}”/></Application>

Page 12: Welcome to OCFlex - ScaleNine : Skins and Themes for Flex and AIR

MXML

MXML : Bindings

<Application> <WebService id=“ws” wsdl=“catalog.wsdl”/> <Button label=“Get Data” click=“ws.getProducts()”/> <DataGrid dataProvider=“{ws.getProducts.result}”/> <LineChart dataProvider=“{ws.getProducts.result}”/></Application>

Page 13: Welcome to OCFlex - ScaleNine : Skins and Themes for Flex and AIR

MXML Compiler

MXML to ActionScript 3

CSS to ActionScript 3

ActionScript 3 to ByteCode

Assets to SWF

ByteCode to SWF

SWF running in Flash Player 9

Page 14: Welcome to OCFlex - ScaleNine : Skins and Themes for Flex and AIR

Controls

Button

CheckBox

ColorPicker

ComboBox

DataGrid

DateChooser

DateField

HSlider

HorizontalList

Image

Label

LinkButton

List

NumericStepper

PopUpButton

PopUpMenuButton

ProgressBar

RadioButton

RichTextEditor

Text

TextArea

TextInput

TileList

Tree

VSlider

VideoDisplay

Page 15: Welcome to OCFlex - ScaleNine : Skins and Themes for Flex and AIR

Containers

Canvas

ControlBar

Form

FormHeading

Grid

HBox

HDividedBox

ModuleLoader

Panel

Spacer

Tile

TitleWindow

VBox

VDividedBox

These hold Controls and other Containers

Page 16: Welcome to OCFlex - ScaleNine : Skins and Themes for Flex and AIR

Layoutmx:Application

mx:Button

mx:Panel

mx:DataGrid

mx:Button

<?xml version="1.0" ?><mx:Application>

<mx:Button width="100" height="50"/>

<mx:Panel width="100%" height="100%">

<mx:Button width="100%"/>

<mx:DataGrid width="100%" height="100%"/>

</mx:Panel>

</mx:Application>

Page 17: Welcome to OCFlex - ScaleNine : Skins and Themes for Flex and AIR

MXML to ActionScript

package com.ocflex{ import mx.controls.Button; public class MyButton extends Button { public function MyButton():void { super(); } }}

<ocflex:MyButton label="ClickMe"/>

Page 18: Welcome to OCFlex - ScaleNine : Skins and Themes for Flex and AIR

Custom componentsBuilding what is not already provided by Flex

Page 19: Welcome to OCFlex - ScaleNine : Skins and Themes for Flex and AIR

SkinningMaking your Flex app look beautiful

Page 20: Welcome to OCFlex - ScaleNine : Skins and Themes for Flex and AIR

FrameworksOrganizing your code

Page 21: Welcome to OCFlex - ScaleNine : Skins and Themes for Flex and AIR

What do they provide?‣ Code organization

• by following a specific architectural style๏ Event-based / Implicit invocation

• by using design patterns๏ Command๏ ModelLocator๏ MVC

‣ Helper code• Framework classes that we can use or extend

Page 22: Welcome to OCFlex - ScaleNine : Skins and Themes for Flex and AIR

Existing frameworksMany options:‣ Cairngorm‣ PureMVC‣ ARP‣ Model-Glue: Flex‣ Guasax‣ and others...

Page 23: Welcome to OCFlex - ScaleNine : Skins and Themes for Flex and AIR

AIRRunning Flex (and HTML) in your desktop

Page 24: Welcome to OCFlex - ScaleNine : Skins and Themes for Flex and AIR

AIR Applications‣ Installed as native applications

• Installer

• Start menu

•Dock

‣ Can access local file system

‣ Can send notifications to task bar and dock

‣ Drag and drop from desktop

‣ Can have embedded databases

• SQLite