KEMBAR78
Using design pattern for mobile | PDF
Using Design Pattern 4 Mobile
      luca mezzalira




 © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.



Wednesday, May 18, 2011
Speaker bio - Luca Mezzalira                                                    TWITTTER: @lucamezzalira




 © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.   2



Wednesday, May 18, 2011
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.


 © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.   3



Wednesday, May 18, 2011
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



 © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.   4



Wednesday, May 18, 2011
MicroArchitetture




                                                  E SU MOBILE ?!
 © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.   5



Wednesday, May 18, 2011
altre tecnologie a confronto




                             MVVM                                                       Model/View
   Model - View -View Model                                                       Model - View -View Model




 © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.   6



Wednesday, May 18, 2011
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




 © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.   7



Wednesday, May 18, 2011
c’erano una volta 3 design pattern...



                                                                      Singleton

                                                                      Observer

                                             Presentation Model



 © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.   8



Wednesday, May 18, 2011
Singleton

     rappresentazione della Singleton matematica in programmazione


     un gruppo con 1 solo oggetto

      Quando utilizzarlo?




 © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.   9



Wednesday, May 18, 2011
Observer

     Un oggetto principale (Subject) tiene una lista di oggetti osserverti
      (Observer) e notifica ogni cambio di stato ad ogni oggetto
      osservato.

      Quando utilizzarlo?




 © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.   10



Wednesday, May 18, 2011
Presentation Model (Application Model)

     Scissione completa tra elementi della GUI e le loro funzionalità e
      valori




 © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.   11



Wednesday, May 18, 2011
Presentation Model (Application Model)

      Quando utilizzarlo?




 © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.   12



Wednesday, May 18, 2011
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



 © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.   13



Wednesday, May 18, 2011
CODE TIME!




 © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.   14



Wednesday, May 18, 2011
Da dove iniziare...




 © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.   15



Wednesday, May 18, 2011
DOMANDE & RISPOSTE



     email: luca@mart3.org                                                           twitter: @lucamezzalira
     blog: lucamezzalira.com                                                            site: www.mart3.org

 © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.   16



Wednesday, May 18, 2011
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.



Wednesday, May 18, 2011

Using design pattern for mobile

  • 1.
    Using Design Pattern4 Mobile luca mezzalira © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Wednesday, May 18, 2011
  • 2.
    Speaker bio -Luca Mezzalira TWITTTER: @lucamezzalira © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 2 Wednesday, May 18, 2011
  • 3.
    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. © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 3 Wednesday, May 18, 2011
  • 4.
    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 © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 4 Wednesday, May 18, 2011
  • 5.
    MicroArchitetture E SU MOBILE ?! © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 5 Wednesday, May 18, 2011
  • 6.
    altre tecnologie aconfronto MVVM Model/View Model - View -View Model Model - View -View Model © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 6 Wednesday, May 18, 2011
  • 7.
    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 © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 7 Wednesday, May 18, 2011
  • 8.
    c’erano una volta3 design pattern... Singleton Observer Presentation Model © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 8 Wednesday, May 18, 2011
  • 9.
    Singleton  rappresentazione della Singleton matematica in programmazione  un gruppo con 1 solo oggetto Quando utilizzarlo? © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 9 Wednesday, May 18, 2011
  • 10.
    Observer  Un oggetto principale (Subject) tiene una lista di oggetti osserverti (Observer) e notifica ogni cambio di stato ad ogni oggetto osservato. Quando utilizzarlo? © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 10 Wednesday, May 18, 2011
  • 11.
    Presentation Model (ApplicationModel)  Scissione completa tra elementi della GUI e le loro funzionalità e valori © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 11 Wednesday, May 18, 2011
  • 12.
    Presentation Model (ApplicationModel) Quando utilizzarlo? © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 12 Wednesday, May 18, 2011
  • 13.
    Presentation Model (ApplicationModel)  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 © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 13 Wednesday, May 18, 2011
  • 14.
    CODE TIME! ©2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 14 Wednesday, May 18, 2011
  • 15.
    Da dove iniziare... © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 15 Wednesday, May 18, 2011
  • 16.
    DOMANDE & RISPOSTE  email: luca@mart3.org  twitter: @lucamezzalira  blog: lucamezzalira.com  site: www.mart3.org © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 16 Wednesday, May 18, 2011
  • 17.
    © 2011 AdobeSystems Incorporated. All Rights Reserved. Adobe Confidential. Wednesday, May 18, 2011