Ponencia de Jorge del Casar en DroidconMAD2013.
Sinopsis: Cordova es un framework de desarrollo móvil de código abierto que permite usar tecnologías web standard como HTML5, CSS3 y Javascript para el desarrollo multiplataforma, evitando desarrollar en el lenguaje nativo de cada plataforma. La nueva Command Line Interface (CLI) desarrollada en Node.js te permite automatizar la creación de proyectos, adición de plataformas y plugins así como la construir la app y probarla en simuladores y dispositivos reales.
2. What's Apache Cordova?
A platform for building native mobile applications using HTML, CSS and
JavaScript
An open-source mobile development framework
http://cordova.apache.org
3. Apache Cordova 3.0
19 Jul 2013
Main release Notes:
New (lighter) Core
New Command Line Tooling (Node.js based)
Release Plugman 0.11.0 (new plugin management)
Change <plugin> to <feature> in config.xml
Breakout Plugins into their own repos
Deprecate Froyo
4. Apache Cordova 3.1
02 Oct 2013
Release notes:
Initial (alpha) support for Firefox OS
Windows 8 support for CLI project
Unified whitelist syntax on iOS and Android
Documentation translated into several languages:
fr, zh, de, it, ja, ko, ru & es
5. Apache Cordova 3.2
22 Nov 2013
Release notes:
Bug fixes and enhancements
Fixing Android 4.4 (KitKat) related bugs
Unified whitelist syntax on iOS and Android
6. Apache Cordova 3.3 RC1
06 Dec 2013
Release notes: when it ships
Install or update Cordova and report issues
Release date: 20 Dec 2013
7. CLI = Command Line Interface
1. Install Node.js
2. Install Cordova package:
sd nmisal- croa
uo p ntl g odv
8. Create
croacet <AH [D [AE
odv rae PT> I] NM]
Parameters:
PATH: directory to be generated for your project
ID: reverse domain-style identifier (optional)
NAME: application's display text (optional)
9. Platform(s)
croapafr()[adrmv|m <LTOM]
odv ltoms {d|eoer} PAFR>
Parameters:
PLATFORM: platform you want to add
android, blackberry10, firefoxos, ios, wp7, wp8, ...
Without parameters: list all installed and available platforms
Check Platform Support and Platform Guides Android before add a platform
10. Plugin(s)
croapui()[adrmv|m <AHUI]
odv lgns {d|eoer} PT|R>
Parameters:
PATH or URI: from where intall the plugin
Without parameters: list all currently installed plugins
You can find a Apache Cordova Plugin or Create your own one
20. Core Features
cordova CLI:
Supported: Android, BlackBerry 10, iOS, WP7 and WP8
Embedded WebView:
Supported: Android and iOS
Plug-in Interface:
Supported: Android, BlackBerry 10, iOS, WP7 and WP8
21. Full support Platfom APIs
Accelerometer
Contacts
Media
Camera
Compass
Connection
Device
Events
Geolocation
Notification
Splashscreen
22. Platfom APIs warnings
Capture: NO supported in Windows 8
File: WP7 and WP8 don't support FileTransfer
Globalization: NO supported in BB10, WP7 and W8
InAppBrowser: NO supported in Windows 8
Storage: WP7 and WP8 ONLY support localStorage
23. Platform guide: Android
1. Check the System Requirements
2. Install Android SDK
3. Append in the PATH enviroment:
[d-ah/d/ol
atpt]sktos
[d-ah/d/ltomtos
atpt]skpafr-ol
4. Register as
Google Play publisher
25. Make your onw Plugins
You can lern how reading the plugin development guide and read how to
implement the native code in Android
26. Platform Plugins
You can add a plugin to a specific platform using p u m n
l g a directly
pumn-pafr [LTOM -poet[AH -pui [R]
lga -ltom PAFR] -rjc PT] -lgn UL
If you don't have plugman you can install globally:
nmisal- pumn
p ntl g lga
27. Merges: customize each platform
All you put inside . m r e / p a f r ] overide the files
/ e g s [ l t o m will
placed in . w w in the specific platform
/w/