Presentazione Corso LAP 2 A.A. 2016/2017

24
Laboratorio Avanzato di Programmazione II (LAP II) “Sviluppo di applicazioni mobili native multipiattaforma” Prof. Antonio S. Calanducci Corso di Laurea in Informatica, Unict Anno accademico 2016/17 Lesson 1: Introduzione al corso

Transcript of Presentazione Corso LAP 2 A.A. 2016/2017

Page 1: Presentazione Corso LAP 2 A.A. 2016/2017

Laboratorio Avanzato di Programmazione II (LAP II)

“Sviluppo di applicazioni mobili native multipiattaforma”

Prof. Antonio S. Calanducci Corso di Laurea in Informatica, Unict

Anno accademico 2016/17

Lesson 1: Introduzione al corso

Page 2: Presentazione Corso LAP 2 A.A. 2016/2017

About meContract Professor @UniCT (DMI, SS-PSI)

iOS Developer Academy Teacher

Freelancer: Mobile app instructor & developer

Founder of EtnaTraining (http://www.etnatraining.it)

Ex studente@Corso di Laurea in Informatica - DMI !

Page 3: Presentazione Corso LAP 2 A.A. 2016/2017

How to reach meemail: calanducci AT unict.it

@tcaland | Facebook | github.com/etnatraining

http://www.dmi.unict.it/~calanducci

https://www.facebook.com/groups/unict.lap2/

Ricevimento:

• DMI @ Studio 19, blocco III

• DFA @ Sala INFN Grid (piano terra)

by appointment (to be changed if required)

Page 4: Presentazione Corso LAP 2 A.A. 2016/2017

ObjectiveLearn mobile development topics and its ecosystem

• development approach (native vs mobile web vs hybrid)

• tools, languages, frameworks, backends

• from design to publishing to the stores

• focus on cross-platform native development (iOS & Android)

Page 5: Presentazione Corso LAP 2 A.A. 2016/2017

Lesson hoursMonday, 09:00 - 11:00, Wednesday, 09:00 - 11:00

Martedì, 17:00 - 19:00 / Giovedì, 17:00 - 19:00

Laboratorio Archimede (?) / Aula 3 (at DMI) / Laboratorio di Informatica (DFA, 2nd floor)

TO BE CONFIRMED, check the FB group

Page 6: Presentazione Corso LAP 2 A.A. 2016/2017

Draft programhttp://www.dmi.unict.it/~calanducci/LAP2/

At studium.unict.it

Page 7: Presentazione Corso LAP 2 A.A. 2016/2017

Course approachIntro theoretical lesson

Demo & live coding

After the basics we will build a full fledged social & Cloud based app

hands-on labs in the second hour

Home assignments

Page 8: Presentazione Corso LAP 2 A.A. 2016/2017

Exams(Test based on multiple choice ?) / Project based

Oral exam (discussion on the project)

Ask me to assign you a project or propose it

Project deliveries on github

• code should build and run without errors

• depends on how big the project is, it can be done in group

Page 9: Presentazione Corso LAP 2 A.A. 2016/2017

RequirementsBring a laptop at lesson (recommended)

github / bitbucket account (mandatory)

basic knowledge of HTML/CSS/JavaScript would help

iOS development (and testing) requires a Mac

options if you don’t have a Mac:

• you need an iOS device at least

• other options I cannot write here :D

Page 10: Presentazione Corso LAP 2 A.A. 2016/2017

PollsHow many of you with Mac, PC, Linux?

Which Windows/Linux versions?

Previous knowledge of native iOS/Android development?

Knowledge of Objective-C/Swift, Java, C#, C/C++

Knowledge of Web development tools: Node.js, PHP, Angular.js, React, github

Page 11: Presentazione Corso LAP 2 A.A. 2016/2017

Prerequisite testHome assignment:

• http://www.dmi.unict.it/~calanducci/LAP2/test.html

Page 12: Presentazione Corso LAP 2 A.A. 2016/2017

Mobile development approaches

Silo

Mobile Web / Hybrid

Native & Cross-platform

Page 13: Presentazione Corso LAP 2 A.A. 2016/2017

Silo Approach

Same apps multiple times:

• Multiple teams

• Multiple code bases

• Different toolset

• Expensive and slow

• Pro: Exploitation of the target platform features

Swift

Page 14: Presentazione Corso LAP 2 A.A. 2016/2017

“Write once, run everywhere” approachMobile Web

• development based on HTML5/CSS/JavaScript

• responsive web page that adapts to different screens

• identical look & feel on all platforms

• not performant; limited access to hardware and offline capabilities

Hybrid

• Wrapping of Mobile Web apps into a native container (WebView)

• distribution through the official app stores

• plug-in allow access to hardware (camera, sensors, etc..)

• ex: Adobe PhoneGap/Apache Cordova

Page 15: Presentazione Corso LAP 2 A.A. 2016/2017

Native & cross-platform approachNative User Interface (UI) & User Experience (UX)

Native access to services:

• Camera, Microphone, Hardware sensors

• GPS, Mapkit, Direct & Reverse geocoding

• Push Notifications

• Database SQLite, FileSystem, Properties APIs

• Android Intents, Local Notification, Background Services, Contacts, Gestures, Socket, Clipboard, XML, Network, Locale, etc etc

Page 16: Presentazione Corso LAP 2 A.A. 2016/2017

Most popular native cross-platform frameworks

Xamarin (Microsoft)

• https://www.xamarin.com/platform

React Native (Facebook)

• https://facebook.github.io/react-native/

NativeScript (Progress Telerik)

• https://www.nativescript.org

Titanium (Appcelerator)

• http://www.appcelerator.org

Others: Fuse (https://www.fusetools.com), Rubymotion (http://www.rubymotion.com)

Page 17: Presentazione Corso LAP 2 A.A. 2016/2017

React NativeJavaScript based framework for building native iOS and Android apps (Native UI)

• support also Universal Windows Platform (UWP, Windows 10 SDK), Xbox One, macOS Desktop 10.10+ (Cocoa), Web, Apple TV

It makes use of React, a popular Web UI library

Created by Facebook. First released in March 2015 (iOS), Android support (September 2015)

• relatively young, but very popular (46,408 stars on github!)

Open Source (1239 contributors, 10,205 commits)

Used by many big companies (https://facebook.github.io/react-native/showcase.html):

• Facebook, AirBnb, Walmart, Wix, Tesla, Vogue, Bloomberg, etc

Page 18: Presentazione Corso LAP 2 A.A. 2016/2017

Why React NativeOne language: JavaScript vs Swift/Objective-C and Java

• ES2015 (or ES6) supported and advised

Best Development Experience (DX)

• no time wasting for compile & deploy cycles

• Live reload & Hot reload ( Web like experience)

• Debugging with Chrome Developer tools

bridge to native code if needed

hybrid native apps (react native views into a Swift/Objective-C/Java app, like Facebook, Instagram apps)

Page 19: Presentazione Corso LAP 2 A.A. 2016/2017

Why React Native80% share code between Android & iOS (can vary)

Its not write once, run everywhere but

• learn once, write anywhere!

Being based on React:

• Web Developer friendly

• Declarative UI (JSX) vs Imperative UI

• Component based (reusability)

• Async rendering

Page 20: Presentazione Corso LAP 2 A.A. 2016/2017

Live Demo

Page 21: Presentazione Corso LAP 2 A.A. 2016/2017

Expo Snackhttp://snack.expo.io

Page 22: Presentazione Corso LAP 2 A.A. 2016/2017

Any questions ?

Page 23: Presentazione Corso LAP 2 A.A. 2016/2017

ReferencesOfficial website:

• https://facebook.github.io/react-native/

React Native Express

• http://www.reactnativeexpress.com

Awesome React Native:

• https://github.com/jondot/awesome-react-native

Use React Native

• http://www.reactnative.com

Page 24: Presentazione Corso LAP 2 A.A. 2016/2017

BooksLearning React Native: Building Native Mobile Apps with JavaScript

Bonnie Eisenman, Dic 2015

http://amzn.eu/ig4Fg1T

Mastering React Native

Eric Masiello, Jacob Friedmann, Gen 2017

http://amzn.eu/36IL9MW