In questo talk ho spiegato perchè secondo me JS ha vinto la battaglia del web e come ionic e capacitor superano il concetto di app ibrida con le native progressive web apps
5. –David Wheeler
“All problems in computer science can be solved by
another level of indirection”.
INDIRECTION
“Compatibility means deliberately repeating other
people's mistakes.”.
COMPATIBILITY
29. MAGGIO 1995
A 34 ANNI BRENDAN EICH
SCRIVE JAVASCRIPT IN 10 GIORNI
https://www.youtube.com/watch?v=GxouWy-ZE80
ispirato da SCHEME(dialetto del LISP) per il FRONTEND
ispirato da JVM per il BACKEND
30. So in 10 days in May 1995, I wrote
A lexical scanner and parser for early JS
The parser emitted stack-machine bytecode
Which ran in a bytecode interpreter
Function.prototype.toString bytecode decompiler
The standard library was poor
Array was Object with .length property
Date hand-ported (h/t ksmith@netscape.com) from java.util.Date
https://brendaneich.com/2015/06/from-asm-js-to-webassembly/
40. –Steve Jobs
“New open standards created in the mobile era, such
as HTML5, will win on mobile devices (and PCs too).
Perhaps Adobe should focus more on creating great
HTML5 tools for the future, and less on criticizing
Apple for leaving the past behind.”.
APRILE 2010 -THOUGHTS ON FLASH
49. IONIC È UN WEB UI FRAMEWORK
CHE EMULA I WIDGET NATIVI
UTILIZZANDO WEB COMPONENTS
https://ionicframework.com/docs/components
54. WEB COMPONENTS
CUSTOM ELEMENTS
progetta e utilizza nuovi tipi di elementi DOM.
SHADOW DOM
utilizza gli stili incapsulati e il markup all'interno di un componente web.
HTML IMPORT
include e riutilizza il documento HTML in un altro documento HTML.
HTML TEMPLATE
dichiara i frammenti di codice che non verranno utilizzati durante il
caricamento della pagina, ma che potranno essere successivamente
istanziati in fase di runtime.
56. CUSTOM PROPERTIES
sono variabili definite nei CSS che contengono valori specifici da
riutilizzare e ridefinire in tutto il documento.
Le variabili CSS consentono di archiviare un valore in un unico posto,
quindi di fare riferimento in più altri posti.
Consentono inoltre di modificare il CSS in modo dinamico a runtime
(che in precedenza richiedeva un preprocessore CSS).
Le variabili CSS rendono più semplice che mai l'override dei
componenti.
https://ionicframework.com/docs/theming/css-variables
58. STENCILJS
• TypeScript support
• Asynchronous rendering pipeline
• A tiny virtual DOM layer
• One-way data binding
• JSX support
• Simple component lazy-loading
60. DECORATORS
• @Component() declares a new web component
• @Prop() declares an exposed property/attribute
• @State() declares an internal state of the component
• @Watch() declares a hook that runs when a property or state changes
• @Element() declares a reference to the host element
• @Method() declares an exposed public method
• @Event() declares a DOM event the component might emit
• @Listen() listens for DOM events
LIFECYCLE HOOKS
• componentWillLoad()
• componentDidLoad()
• componentWillUpdate()
• componentDidUpdate()
• componentDidUnload()
65. Capacitor is a cross-platform app runtime
that makes it easy to build web apps that
run natively on iOS,Android,
Electron, and the web.
We call these apps "Native Progressive
Web Apps" and they represent the next
evolution beyond Hybrid apps.
CAPACITOR?
70. CAPACITOR SUPPORTA I
PLUGIN DI CORDOVA
https://ionicframework.com/docs/native/
(OLTRE AD AVERE UN SUO SISTEMA DI PLUGIN)
https://capacitor.ionicframework.com/docs/plugins/
78. MODULES
I moduli di angular sono contenitori. Possono contenere componenti,
provider di servizi e altri file di codice il cui ambito è definito dal
modulo che lo contiene. Possono importare funzionalità esportate da
altri moduli ed esportare funzionalità selezionate per l'uso da parte di
altri moduli.
84. RXJS
composing asynchronous and event-based programs by using
observable sequences
imperative programming => declarative programming
RxJS is a library for reactive programming using Observables
promise on steroids
https://rxjs-dev.firebaseapp.com/