16

Native Apps and Web Apps - JBoss...Native Apps and Web Apps iOS Native App Native App Native App Native App Web App Web App Desktop OSs Desktop Browsers Mobile Browsers Android Blackberry

  • Upload
    others

  • View
    15

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Native Apps and Web Apps - JBoss...Native Apps and Web Apps iOS Native App Native App Native App Native App Web App Web App Desktop OSs Desktop Browsers Mobile Browsers Android Blackberry
Page 2: Native Apps and Web Apps - JBoss...Native Apps and Web Apps iOS Native App Native App Native App Native App Web App Web App Desktop OSs Desktop Browsers Mobile Browsers Android Blackberry

Native Apps and Web Apps

iOS

NativeApp

NativeApp

NativeApp

NativeApp

NativeApp

NativeApp

NativeApp

NativeApp

WebAppWebApp

WebAppWebApp

Desktop OSs

Desktop Browsers

Mobile Browsers

Android Blackberry

Page 3: Native Apps and Web Apps - JBoss...Native Apps and Web Apps iOS Native App Native App Native App Native App Web App Web App Desktop OSs Desktop Browsers Mobile Browsers Android Blackberry

One Tool, One Language, One Codebase

Any Platform

Flex Application

AIR Flash Player

Goal of the Flash Platform

iOS Desktop OSs

Desktop Browsers

Mobile Browsers

Android Blackberry

Page 4: Native Apps and Web Apps - JBoss...Native Apps and Web Apps iOS Native App Native App Native App Native App Web App Web App Desktop OSs Desktop Browsers Mobile Browsers Android Blackberry

Flash Platform - A complete system for web innovation

Page 5: Native Apps and Web Apps - JBoss...Native Apps and Web Apps iOS Native App Native App Native App Native App Web App Web App Desktop OSs Desktop Browsers Mobile Browsers Android Blackberry

MXML and ActionScript

XML/HTTPREST

SOAP Web Services

How Flex WorksBrowser

J2EE Application Server

BlazeDS orLC Data Services

Flash Player

Web Server

Existing Applications and Infrastructure

Flex Builder IDE

Flex SDKMXML ActionScriptFlex Class Library

.swf

Compile

.swf

HTTP/S AMF/S RTMP/SSOAP

Adobe AIR

Page 6: Native Apps and Web Apps - JBoss...Native Apps and Web Apps iOS Native App Native App Native App Native App Web App Web App Desktop OSs Desktop Browsers Mobile Browsers Android Blackberry

Deploying AIR Mobile Applications

App.apk

App.air

Android Market Android Device

App.ipk iTunes App Store iOS Device

App.bar BlackBerry App World RIM Device

Page 7: Native Apps and Web Apps - JBoss...Native Apps and Web Apps iOS Native App Native App Native App Native App Web App Web App Desktop OSs Desktop Browsers Mobile Browsers Android Blackberry

Mobile Applications in "Hero"s:TabbedApplication s:ViewNavigatorApplications:Application

Page 8: Native Apps and Web Apps - JBoss...Native Apps and Web Apps iOS Native App Native App Native App Native App Web App Web App Desktop OSs Desktop Browsers Mobile Browsers Android Blackberry

1

ViewNavigatorApplication and TabbedApplication

• View stack metaphor– View– ViewNavigator / TabbedViewNavigator

• Built-in mobile navigation experience– Action bar– Back button– Transitions– APIs

Page 9: Native Apps and Web Apps - JBoss...Native Apps and Web Apps iOS Native App Native App Native App Native App Web App Web App Desktop OSs Desktop Browsers Mobile Browsers Android Blackberry

ViewNavigator API

• navigator.pushView();• navigator.popView();• navigator.popToFirstView()

• navigator.activeView;

2

Page 10: Native Apps and Web Apps - JBoss...Native Apps and Web Apps iOS Native App Native App Native App Native App Web App Web App Desktop OSs Desktop Browsers Mobile Browsers Android Blackberry

ActionBar

<s:View xmlns:fx=http://ns.adobe.com/mxml/2009 …title=”Expenses">

<s:navigationContent><s:Button icon="@Embed('assets/home.png')"/>

</s:navigationContent>

<s:actionContent><s:Button label=”+"/>

</s:actionContent>

</s:View>3

navigationContent titleContent actionContent

Page 11: Native Apps and Web Apps - JBoss...Native Apps and Web Apps iOS Native App Native App Native App Native App Web App Web App Desktop OSs Desktop Browsers Mobile Browsers Android Blackberry

View Lifecycle

• Alternative option: destructionPolicy=“none”

View becomes activeView

Created

Another view becomes active

View Destroyed User

navigates back to view View

Recreated

data

3B

Page 12: Native Apps and Web Apps - JBoss...Native Apps and Web Apps iOS Native App Native App Native App Native App Web App Web App Desktop OSs Desktop Browsers Mobile Browsers Android Blackberry

Mobile ItemRenderers• ItemRenderer• IconItemRenderer

<s:IconItemRendererlabelField="lastName" messageField="title"iconField="picture"decoratorClass=”phoneIcon">

4

Page 13: Native Apps and Web Apps - JBoss...Native Apps and Web Apps iOS Native App Native App Native App Native App Web App Web App Desktop OSs Desktop Browsers Mobile Browsers Android Blackberry

Flex with Java via Text-based Serialization

Web Service

Client

App Server

XML, JSON, etc

(RESTful / SOAP)

Page 14: Native Apps and Web Apps - JBoss...Native Apps and Web Apps iOS Native App Native App Native App Native App Web App Web App Desktop OSs Desktop Browsers Mobile Browsers Android Blackberry

Remoting Performance Example

Page 15: Native Apps and Web Apps - JBoss...Native Apps and Web Apps iOS Native App Native App Native App Native App Web App Web App Desktop OSs Desktop Browsers Mobile Browsers Android Blackberry

Flex with Java via Binary Serialization

BlazeDS

Spring Bean

Client

App Server

POJO

EJB

Other

Endpoint

AMF

Page 16: Native Apps and Web Apps - JBoss...Native Apps and Web Apps iOS Native App Native App Native App Native App Web App Web App Desktop OSs Desktop Browsers Mobile Browsers Android Blackberry

Flex with Java via Messaging

MessageService

BlazeDS

Adapter Y

Adapter X

MessagingSystem Y

MessagingSystem X

Endpoint JMSProviderJMS Adapter

PublisherSubscriber

AMF

App Server