Using design pattern for mobile
-
Upload
luca-mezzalira -
Category
Technology
-
view
6.164 -
download
0
description
Transcript of Using design pattern for mobile
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
luca mezzaliraUsing Design Pattern 4 Mobile
Wednesday, May 18, 2011
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 2
Speaker bio - Luca Mezzalira TWITTTER: @lucamezzalira
Wednesday, May 18, 2011
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Design Pattern?
In software engineering, a design pattern is a general reusable solution to a commonly occurring problem in software design. [...]
It is a description or template for how to solve a problem that can be used in many different situations.
Patterns provide a way to organize and name those ordinary solutions to make it easier for people to use them.
3
Wednesday, May 18, 2011
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Design Pattern?
Development speed up
Utilizzati nelle micro architetture
Coprono molte casistiche comuni nei progetti
Aiutano nella realizzazione dell’architettura
Rendono il progetto mantenibile e documentato
Spesso li usiamo ma non ce ne rendiamo conto
4
Wednesday, May 18, 2011
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
MicroArchitetture
5
E SU MOBILE ?!
Wednesday, May 18, 2011
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
altre tecnologie a confronto
6
MVVMModel - View -View Model
Model/ViewModel - View -View Model
Wednesday, May 18, 2011
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
mobile VS desktop
diverse tipologie di schermi (tablet, smartphone, ...)
diversi sistemi operativi con diverse caratteristiche
potenza di calcolo
user interaction e input method
porting da desktop a mobile
7
Wednesday, May 18, 2011
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
c’erano una volta 3 design pattern...
8
Singleton
Presentation Model
Observer
Wednesday, May 18, 2011
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Singleton
rappresentazione della Singleton matematica in programmazione
un gruppo con 1 solo oggetto
9
Quando utilizzarlo?
Wednesday, May 18, 2011
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Observer
Un oggetto principale (Subject) tiene una lista di oggetti osserverti (Observer) e notifica ogni cambio di stato ad ogni oggetto osservato.
10
Quando utilizzarlo?
Wednesday, May 18, 2011
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Presentation Model (Application Model)
Scissione completa tra elementi della GUI e le loro funzionalità e
valori
11
Wednesday, May 18, 2011
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Presentation Model (Application Model)
Quando utilizzarlo?
12
Wednesday, May 18, 2011
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Presentation Model (Application Model)
MVVM (Model-View-View Model)
contiene i dati che la view utilizza
come sincronizzo i dati tra presentation model e relativa view?
favorisce lo sviluppo di un software con view differenti ma
stesse funzionalità
dobbiamo dividere le funzionalità inerenti alla view da quelle del
presentation model
favorisce lo unit testing
13
Wednesday, May 18, 2011
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
CODE TIME!
14
Wednesday, May 18, 2011
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Da dove iniziare...
15
Wednesday, May 18, 2011
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
DOMANDE & RISPOSTE
16
email: [email protected] blog: lucamezzalira.com
twitter: @lucamezzalira site: www.mart3.org
Wednesday, May 18, 2011
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Wednesday, May 18, 2011