Gabriele Mittica, CEO @Corley Cloud – “Come creare un’azienda “nativa in clou...
Sviluppo di applicazioni mobile con Titanium Appcelerator
1. TechBar
Sviluppo di applicazioni mobile con
Titanium Appcelerator
@lorenzomassacci
@g_mandolini
@emanuele_r
2. Cos'è un TechBar?
TechBar è il nome con cui abbiamo pensato di chiamare questo tipo di
eventi, in cui si va oltre all'apprendimento di nozioni in modo frontale, come
nelle classiche conferenze: si ha la possibilità di sperimentare in prima
persona, ad esempio "giocando" direttamente con il codice, e di confrontarsi
con gli altri, il tutto con un tono molto colloquiale, come amici al bar!
Twitter: @TechBarIt (https://twitter.com/TechBarIt)
Facebook: https://www.facebook.com/groups/techbar/
4° TechBar – Sviluppo di applicazioni mobile con Titanium Appcelerator | pag. 2
TechBar e-xtrategy srl - www.e-xtrategy.net
3. Esperienze con Titanium?
Esperienza con Javascript?
Esperienze sviluppo Mobile con altre piattaforme/framework?
http://www.flickr.com/photos/duskolo/2777742751/
4° TechBar – Sviluppo di applicazioni mobile con Titanium Appcelerator | pag. 3
TechBar e-xtrategy srl - www.e-xtrategy.net
4. Appcelerator Titanium
Titanium is an open source framework for building
Native, Hybrid and Mobile Web apps from a single
JavaScript-based SDK
4° TechBar – Sviluppo di applicazioni mobile con Titanium Appcelerator | pag. 4
TechBar e-xtrategy srl - www.e-xtrategy.net
5. Piattaforme Supportate Android
4° TechBar – Sviluppo di applicazioni mobile con Titanium Appcelerator | pag. 5
TechBar e-xtrategy srl - www.e-xtrategy.net
6. Piattaforme Supportate iOS(iPhone/iPad)
4° TechBar – Sviluppo di applicazioni mobile con Titanium Appcelerator | pag. 6
TechBar e-xtrategy srl - www.e-xtrategy.net
7. Piattaforme Supportate - Mobile Web
browser
*richiede Titanium SDK > 1.7.2
4° TechBar – Sviluppo di applicazioni mobile con Titanium Appcelerator | pag. 7
TechBar e-xtrategy srl - www.e-xtrategy.net
8. BlackBerry? Windows Phone? Windows 8?
The goal of Titanium Mobile is to provide a high level, cross-platform JavaScript
runtime and API for mobile development (today we support iOS, Android, and
the browser, with BlackBerry 10 and Windows Phone coming soon and
eventually, respectively).
(Maggio, 2012 - http://developer.appcelerator.com/blog/2012/05/comparing-titanium-and-phonegap.html)
4° TechBar – Sviluppo di applicazioni mobile con Titanium Appcelerator | pag. 8
TechBar e-xtrategy srl - www.e-xtrategy.net
9. Write once, run DEBUG everywhere iOS/Android
Titanium is built on two assertions about mobile development:
●
There is a core of mobile development APIs which can be normalized across
platforms. These areas should be targeted for code reuse.
●
There are platform-specific APIs, UI conventions, and features which developers
should incorporate when developing for that platform. Platform-specific code
should exist for these use cases to provide the best possible experience.
So for those reasons, Titanium is not an attempt at “write once, run everywhere”. We
think there are great, user-experience enhancing features across multiple platforms that
developers should be using. We think that native apps should, where appropriate,
take advantage of familiar, high-performance native UI widgets. However, we think
it is unnecessary that native developers need to learn platform-specific APIs to
draw a rectangle, or make an HTTP request.
(Maggio, 2012 - http://developer.appcelerator.com/blog/2012/05/comparing-titanium-and-phonegap.html)
4° TechBar – Sviluppo di applicazioni mobile con Titanium Appcelerator | pag. 9
TechBar e-xtrategy srl - www.e-xtrategy.net
10. Performance vs. Flexibility
http://www.titaniumninja.com
4° TechBar – Sviluppo di applicazioni mobile con Titanium Appcelerator | pag. 10
TechBar e-xtrategy srl - www.e-xtrategy.net
11. it's only javascript, baby
4° TechBar – Sviluppo di applicazioni mobile con Titanium Appcelerator | pag. 11
TechBar e-xtrategy srl - www.e-xtrategy.net
12. it's only javascript, baby
http://www.titaniumninja.com
4° TechBar – Sviluppo di applicazioni mobile con Titanium Appcelerator | pag. 12
TechBar e-xtrategy srl - www.e-xtrategy.net
13. API
●
Contacts
●
Database
●
Filesystem
●
Geolocation
●
Map Supports 5,000+ native APIs
●
Media
●
Network http://docs.appcelerator.com/titanium/2.0/index.html#!/api
●
UI
●
Accelerometer
●
Gesture
●
....
4° TechBar – Sviluppo di applicazioni mobile con Titanium Appcelerator | pag. 13
TechBar e-xtrategy srl - www.e-xtrategy.net
14. cloud services
●
Users
●
photos
●
push notifications
●
email template
●
custom objects
●
places
●
ratings, reviews, like
●
analytics
●
.....
SDK > 2.0
4° TechBar – Sviluppo di applicazioni mobile con Titanium Appcelerator | pag. 14
TechBar e-xtrategy srl - www.e-xtrategy.net
15. Extending api
why? how?
●
Accessing specific OS features ●
Creating one or more native
●
Leveraging existing native modules throught the Titanium
libraries Module SDK
●
Optimizing critical portions of ●
Great flexibility
the app ●
Easy to distribute (Open Source,
●
Extending portions of the Binary packages, Appcelerator
Titanium Mobile framework Marketplace)
http://www.appcelerator.com/marketplace
http://www.slideshare.net/omorandi/extending-appcelerator-titanium-mobile-through-native-modules
4° TechBar – Sviluppo di applicazioni mobile con Titanium Appcelerator | pag. 15
TechBar e-xtrategy srl - www.e-xtrategy.net
16. Titanium Studio
Titanium Studio Eclipse-based IDE. (ex Aptana)
●
Use Titanium Studio build, test, package and publish mobile and web
applications.
●
Code assisting, ACS integration, module management, Git integration,
publishing workflow and a full-featured editor.
●
Manage Titanium projects,
test your mobile apps in the
simulator or on device,
automate app packaging
deploy to a public or private App
4° TechBar – Sviluppo di applicazioni mobile con Titanium Appcelerator | pag. 16
TechBar e-xtrategy srl - www.e-xtrategy.net
17. Titanium Project
4° TechBar – Sviluppo di applicazioni mobile con Titanium Appcelerator | pag. 17
TechBar e-xtrategy srl - www.e-xtrategy.net
18. tiapp.xml
4° TechBar – Sviluppo di applicazioni mobile con Titanium Appcelerator | pag. 18
TechBar e-xtrategy srl - www.e-xtrategy.net
19. Demo
4° TechBar – Sviluppo di applicazioni mobile con Titanium Appcelerator | pag. 19
TechBar e-xtrategy srl - www.e-xtrategy.net
20. Watch your step
●
su iOs ok :-) Android crash :-(
android first
●
sul simulatore va sul device no
non fidarsi troppo del simulatore
●
risoluzioni diverse dei device
dp e misure relative
●
performance
moduli nativi
●
non prevede una suite di test
jasmine con node (forse Anvil)
●
gestione memoria
best practices js
●
bug di titanium
armarsi di pazienza
(aggirarli o correggerli è open source)
http://www.flickr.com/photos/modowd/352920834/
4° TechBar – Sviluppo di applicazioni mobile con Titanium Appcelerator | pag. 20
TechBar e-xtrategy srl - www.e-xtrategy.net
21. links
●
http://docs.appcelerator.com/titanium/2.0/index.html
●
http://developer.appcelerator.com/questions/newest
●
http://docs.appcelerator.com/titanium/2.0/index.html#!/guide
●
http://docs.appcelerator.com/titanium/2.0/index.html#!/video
●
https://wiki.appcelerator.org/display/guides/Managing+Memory+and+Finding+Lea
●
@LearningTi
●
@appcelerator
●
https://github.com/appcelerator (KitchenSink)
●
http://titaniumninja.com/
4° TechBar – Sviluppo di applicazioni mobile con Titanium Appcelerator | pag. 21
TechBar e-xtrategy srl - www.e-xtrategy.net
22. Hands on
1)Creiamo una Tabella con dei dati fissi (es: una lista della spesa)
2)Facciamo provenire questi dati da un database (popolato con valori di default all'avvio
dell'app se vuoto)
3)Diamo la possibilità di aggiungere una riga (togliendo il ripristino db all'avvio e
rendendo l'app usabile)
suggerimenti:
la window iniziale viene sostituita da un tabGroup e viene usata per la lista
aggiungiamo una seconda window per gestire l'aggiunta del nuovo prodotto
4)Gestiamo il refresh della lista per vedere le modifiche (attualmente viene popolata
solo all'avvio dell'app)
5)Cancelliamo tutti i prodotti con uno shake
6)Ottimizzazioni, spunti e conquista del mondo con un click :-)
https://github.com/e-xtrategy/titanium-shopping-list
4° TechBar – Sviluppo di applicazioni mobile con Titanium Appcelerator | pag. 22
TechBar e-xtrategy srl - www.e-xtrategy.net
23. Contatti
www.e-xtrategy.net
info@e-xtrategy.net
4° TechBar – Sviluppo di applicazioni mobile con Titanium Appcelerator | pag. 23
TechBar e-xtrategy srl - www.e-xtrategy.net