fun with qml and javascript - elinux.org · what is meego is a linux-based open source mobile...

51
Fun with QML and JavaScript Mobile Apps for MeeGo Rajesh Lal MeeGo Team, Nokia Silicon Valley

Upload: ngocong

Post on 10-Apr-2018

236 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Fun with QML and JavaScript - eLinux.org · What is MeeGo is a Linux-based open source mobile operating system Targeted to mobile devices & consumer electronics

Fun with QML and JavaScript

Mobile Apps for MeeGo

Rajesh LalMeeGo Team, Nokia Silicon Valley

Page 2: Fun with QML and JavaScript - eLinux.org · What is MeeGo is a Linux-based open source mobile operating system Targeted to mobile devices & consumer electronics

Fast Development on

QML JavaScript Mobile Apps

+ =

Page 3: Fun with QML and JavaScript - eLinux.org · What is MeeGo is a Linux-based open source mobile operating system Targeted to mobile devices & consumer electronics

Mobile Apps Download

http://distimo.com By 2013

Total

Revenue

$29 billion+

Paid Free

Source: Gartner

Page 4: Fun with QML and JavaScript - eLinux.org · What is MeeGo is a Linux-based open source mobile operating system Targeted to mobile devices & consumer electronics

What is MeeGo

is a Linux-based open source

mobile operating system

Targeted to mobile devices & consumer electronics

Page 5: Fun with QML and JavaScript - eLinux.org · What is MeeGo is a Linux-based open source mobile operating system Targeted to mobile devices & consumer electronics

What makes Exciting ?

Fully Open Source

Linux Foundation

Target Multiple devices Available Today

MeeGo V1.1 - Handsets

MeeGo V1.1 - Net books

MeeGo V1.1 - In-Vehicle Infotainment

… and SmartTV, IPTV-boxes, Tablets

Page 6: Fun with QML and JavaScript - eLinux.org · What is MeeGo is a Linux-based open source mobile operating system Targeted to mobile devices & consumer electronics

MeeGo Development Environment

• Qt Application Framework

• IDE – Qt Creator

• Qt Quick & QML

• Qt UI Designer

• Qemu Emulator

• Smartphone Simulator

… and we have a device to testAvailable Today

Page 7: Fun with QML and JavaScript - eLinux.org · What is MeeGo is a Linux-based open source mobile operating system Targeted to mobile devices & consumer electronics

3 Steps to Develop FAST on MeeGo

Cutting-edge UI Rich Features Mobile Apps

Qt Quick & QML JavaScript Fast

+ =

Page 8: Fun with QML and JavaScript - eLinux.org · What is MeeGo is a Linux-based open source mobile operating system Targeted to mobile devices & consumer electronics

4 Mobile Apps for MeeGo

Popu

larity

Effort on MeeGo

Page 9: Fun with QML and JavaScript - eLinux.org · What is MeeGo is a Linux-based open source mobile operating system Targeted to mobile devices & consumer electronics

1/4 News Apps on MeeGo

CNN News

Page 10: Fun with QML and JavaScript - eLinux.org · What is MeeGo is a Linux-based open source mobile operating system Targeted to mobile devices & consumer electronics

1/4 News Apps on MeeGo

List/Grid

View

XML

Reader

Display UI

(Delegate)

Page 11: Fun with QML and JavaScript - eLinux.org · What is MeeGo is a Linux-based open source mobile operating system Targeted to mobile devices & consumer electronics

1/4 News Apps on MeeGo

XML Reader

http://rss.cnn.com/rss/magazines_fortune.rss

Page 12: Fun with QML and JavaScript - eLinux.org · What is MeeGo is a Linux-based open source mobile operating system Targeted to mobile devices & consumer electronics

1/4 News Apps on MeeGo

XML Reader

Page 13: Fun with QML and JavaScript - eLinux.org · What is MeeGo is a Linux-based open source mobile operating system Targeted to mobile devices & consumer electronics

1/4 News Apps on MeeGo

Display UI (Delegate)

Delegate is a component that creates an instance for each item in the model

Page 14: Fun with QML and JavaScript - eLinux.org · What is MeeGo is a Linux-based open source mobile operating system Targeted to mobile devices & consumer electronics

1/4 News Apps on MeeGo

Delegate

Page 15: Fun with QML and JavaScript - eLinux.org · What is MeeGo is a Linux-based open source mobile operating system Targeted to mobile devices & consumer electronics

1/4 News Apps on MeeGo

ListView

Page 16: Fun with QML and JavaScript - eLinux.org · What is MeeGo is a Linux-based open source mobile operating system Targeted to mobile devices & consumer electronics

1/4 News Apps on MeeGo

ListView Grid View

Page 17: Fun with QML and JavaScript - eLinux.org · What is MeeGo is a Linux-based open source mobile operating system Targeted to mobile devices & consumer electronics

1/4 News Apps on MeeGo

Demo

Page 18: Fun with QML and JavaScript - eLinux.org · What is MeeGo is a Linux-based open source mobile operating system Targeted to mobile devices & consumer electronics

2/4 Social Apps on MeeGo

REST

API

Auth.

Welcome

Access

Edit

Data

Page 19: Fun with QML and JavaScript - eLinux.org · What is MeeGo is a Linux-based open source mobile operating system Targeted to mobile devices & consumer electronics

2/4 Social Apps on MeeGo

CallLogin(name,pwd)

Worker Script

Login

Login thread

JSON

API Call

From QML

AJAXRemote

Cloud

Page 20: Fun with QML and JavaScript - eLinux.org · What is MeeGo is a Linux-based open source mobile operating system Targeted to mobile devices & consumer electronics

2/4 Social Apps on MeeGo

1. API Call

2. Login thread instance

3. Worker Script

4. Login.js with AJAX

Page 21: Fun with QML and JavaScript - eLinux.org · What is MeeGo is a Linux-based open source mobile operating system Targeted to mobile devices & consumer electronics

2/4 Social Apps on MeeGo

API Call

Page 22: Fun with QML and JavaScript - eLinux.org · What is MeeGo is a Linux-based open source mobile operating system Targeted to mobile devices & consumer electronics

2/4 Social Apps on MeeGo

Login Thread Instance

Page 23: Fun with QML and JavaScript - eLinux.org · What is MeeGo is a Linux-based open source mobile operating system Targeted to mobile devices & consumer electronics

2/4 Social Apps on MeeGo

ScriptLogin.QML (Actual Thread)

Page 24: Fun with QML and JavaScript - eLinux.org · What is MeeGo is a Linux-based open source mobile operating system Targeted to mobile devices & consumer electronics

2/4 Social Apps on MeeGo

Login.js with AJAX

Page 25: Fun with QML and JavaScript - eLinux.org · What is MeeGo is a Linux-based open source mobile operating system Targeted to mobile devices & consumer electronics

3/4 Tools on MeeGo

N900 Access Device Data

Page 26: Fun with QML and JavaScript - eLinux.org · What is MeeGo is a Linux-based open source mobile operating system Targeted to mobile devices & consumer electronics

3/4 Tools on MeeGo

Device

Data

Qt Mobility

API

JavaScript

Binding

Page 27: Fun with QML and JavaScript - eLinux.org · What is MeeGo is a Linux-based open source mobile operating system Targeted to mobile devices & consumer electronics

JavaScript Expressions

Import JavaScript Files

Qt Mobility API

JavaScript

3/4 Tools on MeeGo

Page 28: Fun with QML and JavaScript - eLinux.org · What is MeeGo is a Linux-based open source mobile operating system Targeted to mobile devices & consumer electronics

3/4 Tools on MeeGo: Clock.js

Page 29: Fun with QML and JavaScript - eLinux.org · What is MeeGo is a Linux-based open source mobile operating system Targeted to mobile devices & consumer electronics

3/4 Tools on MeeGo: QML Binding

Page 30: Fun with QML and JavaScript - eLinux.org · What is MeeGo is a Linux-based open source mobile operating system Targeted to mobile devices & consumer electronics

30

QML Plug-ins Qt Mobility API

Gallery Document Gallery API

Location Location API

Multimedia API includes audio and video

Service Framework

Discovering and connecting to services

Messaging Messaging , email ,sms etc

3/4 Tools on MeeGo: Qt Mobility

Page 31: Fun with QML and JavaScript - eLinux.org · What is MeeGo is a Linux-based open source mobile operating system Targeted to mobile devices & consumer electronics

31

import Qt 4.7

import QtMultimediaKit 1.1

...

Audio {

id: myMedia

source: “beethoven.wav"

}

MouseArea {

id: playArea

anchors.fill: parent

onPressed: { myMedia.play() }

}

3/4 Tools on MeeGo: Multimedia

Page 32: Fun with QML and JavaScript - eLinux.org · What is MeeGo is a Linux-based open source mobile operating system Targeted to mobile devices & consumer electronics

32

import Qt 4.7

import QtMobility.location 1.1

Rectangle {

width: 500

height: 500

Map {

id: myMap

size.width: parent.width

size.height: parent.height

zoomLevel: 5

center: Coordinate {

latitude: 101

longitude: 202

}

}

}

3/4 Tools on MeeGo: Location

Page 33: Fun with QML and JavaScript - eLinux.org · What is MeeGo is a Linux-based open source mobile operating system Targeted to mobile devices & consumer electronics

Demo

3/4 Tools on MeeGo: Location

Page 34: Fun with QML and JavaScript - eLinux.org · What is MeeGo is a Linux-based open source mobile operating system Targeted to mobile devices & consumer electronics

4/4 Fun and Games on MeeGo

Angry Developer

Page 35: Fun with QML and JavaScript - eLinux.org · What is MeeGo is a Linux-based open source mobile operating system Targeted to mobile devices & consumer electronics

4/4 Fun and Games on MeeGo

Events

BindingGraphics State

Animation

Page 36: Fun with QML and JavaScript - eLinux.org · What is MeeGo is a Linux-based open source mobile operating system Targeted to mobile devices & consumer electronics

4/4 Fun and Games on MeeGo

Graphics

Elements

Shapes

Text

Animation

State

Transitions

Transform.

Binding

Property

JavaScript

C++

Page 37: Fun with QML and JavaScript - eLinux.org · What is MeeGo is a Linux-based open source mobile operating system Targeted to mobile devices & consumer electronics

Playing Moving

4/4 Fun and Games on MeeGo

Page 38: Fun with QML and JavaScript - eLinux.org · What is MeeGo is a Linux-based open source mobile operating system Targeted to mobile devices & consumer electronics

AngryMissed

4/4 Fun and Games on MeeGo

Page 39: Fun with QML and JavaScript - eLinux.org · What is MeeGo is a Linux-based open source mobile operating system Targeted to mobile devices & consumer electronics

HappyDestroyed

4/4 Fun and Games on MeeGo

Page 40: Fun with QML and JavaScript - eLinux.org · What is MeeGo is a Linux-based open source mobile operating system Targeted to mobile devices & consumer electronics

4/4 Fun and Games: QML Elements

Page 41: Fun with QML and JavaScript - eLinux.org · What is MeeGo is a Linux-based open source mobile operating system Targeted to mobile devices & consumer electronics

Playing Angry Happy Pig Moving Pig Destroyed

4/4 Fun and Games: State Change

Page 42: Fun with QML and JavaScript - eLinux.org · What is MeeGo is a Linux-based open source mobile operating system Targeted to mobile devices & consumer electronics

4/4 Fun and Games: State Change

Page 43: Fun with QML and JavaScript - eLinux.org · What is MeeGo is a Linux-based open source mobile operating system Targeted to mobile devices & consumer electronics

Bouncing Ball Animation Throw Transition

4/4 Fun and Games: Ball Animation

Page 44: Fun with QML and JavaScript - eLinux.org · What is MeeGo is a Linux-based open source mobile operating system Targeted to mobile devices & consumer electronics

4/4 Fun and Games: Bouncing Ball

Page 45: Fun with QML and JavaScript - eLinux.org · What is MeeGo is a Linux-based open source mobile operating system Targeted to mobile devices & consumer electronics

4/4 Fun and Games: Throw Transition

Page 46: Fun with QML and JavaScript - eLinux.org · What is MeeGo is a Linux-based open source mobile operating system Targeted to mobile devices & consumer electronics

Pig’s Random

Movement

Hit or Miss

4/4 Fun and Games: Logic Timers

Page 47: Fun with QML and JavaScript - eLinux.org · What is MeeGo is a Linux-based open source mobile operating system Targeted to mobile devices & consumer electronics

4/4 Fun and Games: Pig Movement

Page 48: Fun with QML and JavaScript - eLinux.org · What is MeeGo is a Linux-based open source mobile operating system Targeted to mobile devices & consumer electronics

4/4 Fun and Games: Hit or Miss

Page 49: Fun with QML and JavaScript - eLinux.org · What is MeeGo is a Linux-based open source mobile operating system Targeted to mobile devices & consumer electronics

4/4 Fun and Games on MeeGo

Angry DeveloperDemo

Page 50: Fun with QML and JavaScript - eLinux.org · What is MeeGo is a Linux-based open source mobile operating system Targeted to mobile devices & consumer electronics

3 Steps for FAST development on

Download Qt SDK

Create UI QML

Develop Logic

JavaScript

Page 51: Fun with QML and JavaScript - eLinux.org · What is MeeGo is a Linux-based open source mobile operating system Targeted to mobile devices & consumer electronics

Thank You

Download MeeGohttp://meego.com/downloads

Get Qt SDK with Qt Quickhttp://get.qt.nokia.com

Know MADDEhttp://wiki.maemo.org/MADDE

Questions [email protected] @rajeshlalnokia