intro to sencha touch 2

70

Upload: patrick-sheridan

Post on 11-May-2015

3.252 views

Category:

Technology


0 download

DESCRIPTION

Here, Jay Garcia describes

TRANSCRIPT

Page 1: Intro to sencha touch 2
Page 2: Intro to sencha touch 2

About us

Page 3: Intro to sencha touch 2

#WIN

-Danny Winokur, Adobe’s vice president and general manager of interactive development

http://bits.blogs.nytimes.com/2011/11/09/adobe-to-kill-mobile-flash-focus-on-html5/

Page 4: Intro to sencha touch 2

What is Sencha Touch

• The first and best mobile-centric HTML 5 framework

• Provides the foundation to develop kick ass cross platform mobile Web apps

• Built on the best Web Standards

• 2.0 is killing it!

Page 5: Intro to sencha touch 2

New to Sencha Touch 2.0

• Improved Class system (from Ext JS 4.0)

• Faster layouts

• Faster startup speed

• Smoother scrolling

• Updated rendering process

Page 6: Intro to sencha touch 2

New to Sencha Touch 2.0

• DataView can render components

• Way better documentation

• High quality examples

• Updated MVC

Page 7: Intro to sencha touch 2

A peek under the hood

• Full Component lifecycle

• Well designed class inheritance model

• Observable event model

• Components and elements

• Elaborate Container model

• Configureable layout managers

Page 8: Intro to sencha touch 2

Robust class system

• Simple class registration

• Automatic Name Spacing

• Class dependency system

• Dynamic class loading

Ext.Base

MyClass

Mixin Mixin

Page 9: Intro to sencha touch 2

The SenchaCon app team

Development Design

Page 10: Intro to sencha touch 2

The SenchaCon app team

Development Design

Page 11: Intro to sencha touch 2

The SenchaCon app team

Development Design

Page 12: Intro to sencha touch 2

The SenchaCon app team

Development Design

Page 13: Intro to sencha touch 2

The SenchaCon app team

Development Design

Page 14: Intro to sencha touch 2

The SenchaCon app supporters

Web API Sencha Engineers

Page 15: Intro to sencha touch 2

The SenchaCon app supporters

Web API Sencha Engineers

Page 16: Intro to sencha touch 2

The SenchaCon app supporters

Web API Sencha Engineers

Page 17: Intro to sencha touch 2

The SenchaCon app supporters

Web API Sencha Engineers

Page 18: Intro to sencha touch 2

The SenchaCon app supporters

Web API Sencha Engineers

Page 19: Intro to sencha touch 2

The SenchaCon app supporters

Web API Sencha Engineers

Page 20: Intro to sencha touch 2

The SenchaCon app

• Uses Sencha Touch 2

• 35 classes

• Takes advantage of Ext Loader (debug)

• Implements MVC (extensively!)

Page 21: Intro to sencha touch 2

The SenchaCon app

• Uses Sencha Touch 2

• 35 classes

• Takes advantage of Ext Loader (debug)

• Implements MVC (extensively!)

Page 22: Intro to sencha touch 2

The SenchaCon app

• Leverages Local Storage

• Uses app cache (offline storage)

• Implements ComponentQuery

• Not a single component with a static id!

Page 23: Intro to sencha touch 2

The SenchaCon app

Page 24: Intro to sencha touch 2

The SenchaCon app

• Highly optimized custom components

• Reusability kept in mind throughout code base

• Code developed with minification in mind

• Minified with Sencha SDK Tools 2.0

Page 25: Intro to sencha touch 2

Breaking the ice

• Develop individual views & models in their own sandbox

• Views should work independently

• One HTML file per view for testing

• Test fired events via Webkit console

• Allowed for us to divide and conquer

Page 26: Intro to sencha touch 2

Pass #1

• Initial development done in Sencha touch 1.0

• Used MVC

• Router

• History

• Best practices for extending components

• Paved the way for the Sencha Touch 2.0 migration

Page 27: Intro to sencha touch 2
Page 28: Intro to sencha touch 2
Page 29: Intro to sencha touch 2
Page 30: Intro to sencha touch 2
Page 31: Intro to sencha touch 2
Page 32: Intro to sencha touch 2

Enter Sencha Touch 2!

Page 33: Intro to sencha touch 2

Migrate to the new class system

Page 34: Intro to sencha touch 2

Migrate to the new class system

Page 35: Intro to sencha touch 2

Sencha Touch 2.0 migration

• Change the namespace to match the new MVC pattern

• Views

• Models

• Controllers

• Utilities

Page 36: Intro to sencha touch 2

Quick MVC thoughts

• Controller is at the center

• Controller subscribes to events from the view

• Controller updates the model

• Model drives the view

Model

Controller

View

Page 37: Intro to sencha touch 2

Quick MVC thoughts

• Application extends Controller!

• Controllers can talk to the application via events or direct methods calls

ModelView

Controller

AppController

Page 38: Intro to sencha touch 2

Multi-controller application

ModelView ModelView

Controller Controller

AppController

Page 39: Intro to sencha touch 2

The class architecture

SchedulePanelViewport

Viewport

SessionsList

SessionsList

NavBar

NavBar SchedulePanel

App

SessionDetail

SessionDetail

SessionSpeakers

List

SpeakersList

SpeakerSpeakerDetail

SpeakerDetail

DataManager Util

Page 40: Intro to sencha touch 2
Page 41: Intro to sencha touch 2
Page 42: Intro to sencha touch 2
Page 43: Intro to sencha touch 2

Building the Viewport

Viewport

App

History store

Viewport

Page 44: Intro to sencha touch 2
Page 45: Intro to sencha touch 2
Page 46: Intro to sencha touch 2
Page 47: Intro to sencha touch 2
Page 48: Intro to sencha touch 2

Building navigation

Viewport NavBar

App

NavBar

History store

Viewport

Page 49: Intro to sencha touch 2
Page 50: Intro to sencha touch 2
Page 51: Intro to sencha touch 2

Adding the schedule panel

SchedulePanelViewport NavBar

NavBar SchedulePanel

App

History store

Viewport

Page 52: Intro to sencha touch 2
Page 53: Intro to sencha touch 2
Page 54: Intro to sencha touch 2
Page 55: Intro to sencha touch 2

Adding the sessions list

SchedulePanelViewport

Viewport

SessionSessionsList

SessionsList

NavBar

NavBar SchedulePanel

App

Page 56: Intro to sencha touch 2
Page 57: Intro to sencha touch 2
Page 58: Intro to sencha touch 2
Page 59: Intro to sencha touch 2

Adding the schedule panel

SchedulePanelViewport

Viewport

SessionsList

SessionsList

NavBar

NavBar SchedulePanel

App

SessionDetail

SessionDetail

Session

Page 60: Intro to sencha touch 2

A highly optimized view!

Page 61: Intro to sencha touch 2
Page 62: Intro to sencha touch 2
Page 63: Intro to sencha touch 2
Page 64: Intro to sencha touch 2
Page 65: Intro to sencha touch 2

Adding session speaker details

SchedulePanelViewport

Viewport

SessionsList

SessionsList

NavBar

NavBar SchedulePanel

App

SessionDetailSession

SpeakerDetail

SpeakerDetail

SessionDetail

Speaker

Page 66: Intro to sencha touch 2

Adding session speaker details

Page 67: Intro to sencha touch 2
Page 68: Intro to sencha touch 2
Page 69: Intro to sencha touch 2

Adding session speaker details

SchedulePanelViewport

Viewport

SessionsList

SessionsList

NavBar

NavBar SchedulePanel

App

SessionDetail

SessionDetail

SessionSpeakers

List

SpeakersList

SpeakerSpeakerDetail

SpeakerDetail

Page 70: Intro to sencha touch 2

Questions?

• Contact info:

• twitter :

• @moduscreate

• @_jdg

[email protected]

Thank you!