Creare una Progressive Web App in Angular 竪 un processo semplice e potente. Vediamone tutte le caratteristiche messe a disposizione dal famoso framework frontend, per rendere le nostre Single Page Application pronte per lavorare offline, ricevere notifiche e tanto altro!
Repository GitHub: https://github.com/fsciuti/ng-pwa-conf-demo
PHP is a server-side scripting language used for web development. It allows developers to add dynamic content and functionality to websites. Some key points about PHP from the document:
- PHP code is embedded into HTML and executed on the server to create dynamic web page content. It can be used to connect to databases, process forms, and more.
- PHP has many data types including strings, integers, floats, booleans, arrays, objects, null values and resources. Variables, operators, and conditional statements allow for control flow and data manipulation.
- Common PHP structures include if/else statements for conditional logic, loops like for/while/foreach for iteration, and functions for reusability. Ar
This slide guides through the differences of the Span and Div tags in HTML.
I started a channel on YouTube for Networking lovers. "VERY SIMPLE NETWORKING" SERIES can be found at http://www.youtube.com/bgccnadom.
THANK YOU FOR YOUR SUPPORT AND LIKES.
php complete reference with database concepts for beginners is generally useful for those who want to start the career as a php developer. given each and every information right from the scratch to understand for the beginners and students as well. I hope this will help you a lot for the beginners to start the career.
Laravel is a free, open-source PHP web framework, created by Taylor Otwell and intended for the development of web applications following the modelviewcontroller (MVC) architectural pattern and based on Symfony.
Deep diving SignalR with ASP.NET MVC 6.
Speaker: Mr Sherman Chen - Telerik Senior Architect/Advocate with more than 15 years developing desktop, web and mobile apps
The document provides an introduction to installing and using WAMP (Windows + Apache + MySQL + PHP) as a local development environment. It discusses installing WAMP and using its features like PHPMyAdmin. It also covers migrating a website from Microsoft SQL Server to the WAMP stack, including changing data definitions and queries to be compatible with MySQL. The key applications that would be affected by the migration are Perl for replication, PHP, and Tomcat. Overall, the document presents WAMP as an easy-to-install free option for local PHP and database development.
HTML is a markup language used to define the structure and layout of web pages. HTML uses tags to label different parts of a web page like headings, paragraphs, links, and images. The basic structure of an HTML page includes <html>, <head>, and <body> tags. Common HTML tags are <h1> for main headings, <p> for paragraphs, <a> for links, <img> for images, and <div> and <span> for dividing content. HTML documents are displayed in web browsers which use the HTML tags to render the page elements properly.
This document provides a cheat sheet of commands for the VI text editor, organized into categories for editing text, moving around, searching, and managing files. It includes both single key commands and longer commands to perform actions like undoing edits, copying/pasting/deleting text, finding and replacing text, and quitting/saving files. Over 50 commands in total are described.
This document discusses audio and video support in HTML5. It covers the audio and video elements that allow embedding multimedia content in web pages without requiring plugins. The audio element is used to embed audio files while the video element embeds video files. Both support various attributes to control playback like autoplay, controls, and loop. Common audio and video file formats like MP3, MP4, Ogg and WebM are supported in HTML5. The document provides examples of using the audio and video elements and describes their attributes.
The document provides an overview of basic PHP concepts including syntax, arrays, conditional statements, loops, forms, functions, and operators. It explains that PHP code is executed on the server and plain HTML is sent to the browser. It also demonstrates how to create arrays, if/else statements, for loops, handle form input, build functions, and use basic math operators in PHP code.
This document provides 15 examples of using the Linux grep command to search files for text patterns. Some key examples include searching for a string in single or multiple files, ignoring case, using regular expressions to match patterns, displaying lines before/after/around matches, inverting matches, counting matches, and highlighting matched text. The examples demonstrate many useful grep options for finding text in files.
This document provides an overview of HTML and CSS topics including:
- A brief history of HTML and CSS standards from 1990 to present.
- Descriptions of common HTML elements like <body>, <head>, <img>, <a>, and lists.
- Explanations of CSS concepts like selectors, properties, units, positioning, and layout fundamentals.
- Details on CSS topics like the box model, centering content, semantic HTML, and flexbox.
The document serves as a course outline or reference for learning HTML and CSS fundamentals.
CSS3 is an update to the CSS2.1 specification that introduces many new features and modules. Some key CSS3 modules include selectors, backgrounds and borders, text effects, transformations, transitions, multiple columns, and user interface. CSS3 allows for rounded borders using border-radius, box shadows using box-shadow, and image borders using border-image. Other CSS3 properties include text-shadow, word-wrap, transforms like rotate and scale, transitions for animated effects, multiple columns layout, and user interface features like resizing and outlines. Support for CSS3 varies across browsers.
The <iframe> tag is used to embed another HTML document within the current page. It can specify the source of the embedded content using the src attribute or embed content directly using the srcdoc attribute. The sandbox attribute enables security restrictions for the embedded content by default but allows whitelisting specific features like forms, scripts, or navigation.
This document provides an overview of Git and how to use it. It discusses version control systems and how distributed version control systems like Git work. It explains how Git was created by Linus Torvalds for Linux kernel development and why it gained popularity due to its speed and efficiency. The document then covers Git basics like setup, commits, branches and workflows. It also introduces tools for using Git in Eclipse and GitLab for code hosting and collaboration.
JavaScript is the programming language of the web. It can dynamically manipulate HTML content by changing element properties like innerHTML. Functions allow JavaScript code to run in response to events like button clicks or timeouts. JavaScript uses objects and prototypes to define reusable behaviors and properties for objects. It is an important language for web developers to learn alongside HTML and CSS.
A Presentation on Registry forensics from one of my lectures. Thanks to Harlan Carvy and Jolanta Thomassen for wonderful researches in the field. The work is based on their researches
Wireshark is a free and open-source packet analyzer that can be used to capture packets on a network for troubleshooting purposes, with options to filter captures by IP address, port number, or other criteria. Wireshark runs either directly on the device being monitored or by configuring port mirroring on a switch to send traffic to a separate machine running Wireshark. The document discusses different locations and methods for capturing packets both on and off the target device.
Docker landed almost two years ago, making it possible to build, ship, and run
any Linux application, on any platform, it was quickly adopted by developers
and ops, like no other tool before. The CI/CD industry even took it to
production long before it was stamped "production-ready."
Why does everyone (or almost!) love Docker? Because it puts powerful
automation abilities within the hands of normal developers. Automation
almost always involves building distribution packages, virtual machine
images, or writing configuration management manifests. With Docker,
those tasks are radically transformed: sometimes they're far easier than before,
other times they're no longer needed at all. Either way, the intervention
of a seasoned sysadmin guru is no longer required.
Learning log4j for Java beginners with a sample set of projects using log4j 1.2.
This was done for Level 2 computer engineering students at University of Moratuwa 2015.
I have hosted the samples in github (https://github.com/lkamal/log4j-workshop
), so that you will be able to download and try yourself.
際際滷s from our CodeMash 2013 Precompiler session, "Web Development with Python and Django", including a breezy introduction to the Python programming language and the Django web framework. The example code repository is available at https://github.com/finiteloopsoftware/django-precompiler/
Sessions in PHP allow storing user information to be used across multiple pages. A session is started with the session_start() function and session variables are set using the $_SESSION global array. Session variables last until the browser is closed by default. Cookies are small pieces of information stored in the client browser that are used to recognize the user. Cookies are created and saved on the client side but sent to the server with each request, allowing the server to access them through the $_COOKIE superglobal array. The main difference is that sessions last until the browser closes while cookies persist for a set time period or until deleted.
YAGNI = You Aint Gonna Need It
Emerged as one of the key principles of Extreme Programming
and says that you should do the simplest thing that could Possibly work!
Cookies in PHP allows you to create, retrieve, modify, and delete cookies using PHP. Cookies are small files stored on a user's computer that are sent back to the server each time the same page is requested. Cookies can be created using the setcookie() function, which takes parameters like the cookie name, value, expiration date, and path. Cookie values can then be retrieved on subsequent page loads using the $_COOKIE superglobal array in PHP.
Un talk che affronta gli aspetti principali di una Progressive Web App, dal Manifest ai Service Worker, passando da tutte le Web API utili per le app mobile del prossimo futuro.
Il talk affronta il viaggio attraverso le PWA e dopo una panoramica sulle principali caratteristiche delle Progressive Web App, approfondisce tutti gli aspetti principali della realizzazione di una PWA in Angular.
HTML is a markup language used to define the structure and layout of web pages. HTML uses tags to label different parts of a web page like headings, paragraphs, links, and images. The basic structure of an HTML page includes <html>, <head>, and <body> tags. Common HTML tags are <h1> for main headings, <p> for paragraphs, <a> for links, <img> for images, and <div> and <span> for dividing content. HTML documents are displayed in web browsers which use the HTML tags to render the page elements properly.
This document provides a cheat sheet of commands for the VI text editor, organized into categories for editing text, moving around, searching, and managing files. It includes both single key commands and longer commands to perform actions like undoing edits, copying/pasting/deleting text, finding and replacing text, and quitting/saving files. Over 50 commands in total are described.
This document discusses audio and video support in HTML5. It covers the audio and video elements that allow embedding multimedia content in web pages without requiring plugins. The audio element is used to embed audio files while the video element embeds video files. Both support various attributes to control playback like autoplay, controls, and loop. Common audio and video file formats like MP3, MP4, Ogg and WebM are supported in HTML5. The document provides examples of using the audio and video elements and describes their attributes.
The document provides an overview of basic PHP concepts including syntax, arrays, conditional statements, loops, forms, functions, and operators. It explains that PHP code is executed on the server and plain HTML is sent to the browser. It also demonstrates how to create arrays, if/else statements, for loops, handle form input, build functions, and use basic math operators in PHP code.
This document provides 15 examples of using the Linux grep command to search files for text patterns. Some key examples include searching for a string in single or multiple files, ignoring case, using regular expressions to match patterns, displaying lines before/after/around matches, inverting matches, counting matches, and highlighting matched text. The examples demonstrate many useful grep options for finding text in files.
This document provides an overview of HTML and CSS topics including:
- A brief history of HTML and CSS standards from 1990 to present.
- Descriptions of common HTML elements like <body>, <head>, <img>, <a>, and lists.
- Explanations of CSS concepts like selectors, properties, units, positioning, and layout fundamentals.
- Details on CSS topics like the box model, centering content, semantic HTML, and flexbox.
The document serves as a course outline or reference for learning HTML and CSS fundamentals.
CSS3 is an update to the CSS2.1 specification that introduces many new features and modules. Some key CSS3 modules include selectors, backgrounds and borders, text effects, transformations, transitions, multiple columns, and user interface. CSS3 allows for rounded borders using border-radius, box shadows using box-shadow, and image borders using border-image. Other CSS3 properties include text-shadow, word-wrap, transforms like rotate and scale, transitions for animated effects, multiple columns layout, and user interface features like resizing and outlines. Support for CSS3 varies across browsers.
The <iframe> tag is used to embed another HTML document within the current page. It can specify the source of the embedded content using the src attribute or embed content directly using the srcdoc attribute. The sandbox attribute enables security restrictions for the embedded content by default but allows whitelisting specific features like forms, scripts, or navigation.
This document provides an overview of Git and how to use it. It discusses version control systems and how distributed version control systems like Git work. It explains how Git was created by Linus Torvalds for Linux kernel development and why it gained popularity due to its speed and efficiency. The document then covers Git basics like setup, commits, branches and workflows. It also introduces tools for using Git in Eclipse and GitLab for code hosting and collaboration.
JavaScript is the programming language of the web. It can dynamically manipulate HTML content by changing element properties like innerHTML. Functions allow JavaScript code to run in response to events like button clicks or timeouts. JavaScript uses objects and prototypes to define reusable behaviors and properties for objects. It is an important language for web developers to learn alongside HTML and CSS.
A Presentation on Registry forensics from one of my lectures. Thanks to Harlan Carvy and Jolanta Thomassen for wonderful researches in the field. The work is based on their researches
Wireshark is a free and open-source packet analyzer that can be used to capture packets on a network for troubleshooting purposes, with options to filter captures by IP address, port number, or other criteria. Wireshark runs either directly on the device being monitored or by configuring port mirroring on a switch to send traffic to a separate machine running Wireshark. The document discusses different locations and methods for capturing packets both on and off the target device.
Docker landed almost two years ago, making it possible to build, ship, and run
any Linux application, on any platform, it was quickly adopted by developers
and ops, like no other tool before. The CI/CD industry even took it to
production long before it was stamped "production-ready."
Why does everyone (or almost!) love Docker? Because it puts powerful
automation abilities within the hands of normal developers. Automation
almost always involves building distribution packages, virtual machine
images, or writing configuration management manifests. With Docker,
those tasks are radically transformed: sometimes they're far easier than before,
other times they're no longer needed at all. Either way, the intervention
of a seasoned sysadmin guru is no longer required.
Learning log4j for Java beginners with a sample set of projects using log4j 1.2.
This was done for Level 2 computer engineering students at University of Moratuwa 2015.
I have hosted the samples in github (https://github.com/lkamal/log4j-workshop
), so that you will be able to download and try yourself.
際際滷s from our CodeMash 2013 Precompiler session, "Web Development with Python and Django", including a breezy introduction to the Python programming language and the Django web framework. The example code repository is available at https://github.com/finiteloopsoftware/django-precompiler/
Sessions in PHP allow storing user information to be used across multiple pages. A session is started with the session_start() function and session variables are set using the $_SESSION global array. Session variables last until the browser is closed by default. Cookies are small pieces of information stored in the client browser that are used to recognize the user. Cookies are created and saved on the client side but sent to the server with each request, allowing the server to access them through the $_COOKIE superglobal array. The main difference is that sessions last until the browser closes while cookies persist for a set time period or until deleted.
YAGNI = You Aint Gonna Need It
Emerged as one of the key principles of Extreme Programming
and says that you should do the simplest thing that could Possibly work!
Cookies in PHP allows you to create, retrieve, modify, and delete cookies using PHP. Cookies are small files stored on a user's computer that are sent back to the server each time the same page is requested. Cookies can be created using the setcookie() function, which takes parameters like the cookie name, value, expiration date, and path. Cookie values can then be retrieved on subsequent page loads using the $_COOKIE superglobal array in PHP.
Un talk che affronta gli aspetti principali di una Progressive Web App, dal Manifest ai Service Worker, passando da tutte le Web API utili per le app mobile del prossimo futuro.
Il talk affronta il viaggio attraverso le PWA e dopo una panoramica sulle principali caratteristiche delle Progressive Web App, approfondisce tutti gli aspetti principali della realizzazione di una PWA in Angular.
Visual Studio Online 竪 gi molto completo, ma offre interessanti possibilit di integrazione.
Vedremo come estendere Visual Studio Online (ma anche TFS) mediante le sue REST API ed i Service Hooks.
I servizi offerti dalla piattaforma BING consentono di realizzare facilmente applicazioni per Windows 8.1 moderne ed evolute. Le funzionalit di Speech Recognition, ad esempio, consentono di fornire all'utente un diverso modo per interagire con la nostra applicazione mentre le funzionalit infrastrutturali di App Linking ci permettono di integrare la nostra applicazione all'interno dei risultati della Smart Search di Windows 8.1, consentendoci di essere pi湛 visibili e, quindi, di avere un maggior successo.
際際滷 della sessione "BING e Windows Store App" tenuta al DotNetCampus 2014 a Roma il 10/05/2014
際際滷 utilizzate durante l'intervento sulle Progressive Web App e le Trusted Web Activities applicate a Wordpress e Woocommerce.
Trovate informazioni pi湛 precise sull'argomento su https://2019.catania.wordcamp.org/session/progressive-web-app-e-twa/
e sugli articoli https://www.francescogiammanco.it/progressive-web-app-lighthouse/
e https://www.francescogiammanco.it/trasformare-un-sito-in-twa/
FAST 竪 una raccolta di tecnologie, basate su Web Components e su Web Standards moderni, che ci aiuta ad affrontare in modo efficiente alcune delle sfide pi湛 comuni nella progettazione e nello sviluppo di siti ed applicazioni Web.
FAST ci aiuta a creare interfacce si adattano facilmente a qualunque Design System e che possono essere utilizzate con qualsiasi framework!
Lo Spring Framework viene ancora una volta incontro agli sviluppatori Java semplificandone la vita, questa volta vedremo come implementare facilmente uno strato servizi stateless da rendere disponibile remotamente nei diversi formati fruibili dalle diverse tecnologie client RIA, introducendo i concetti di Exporter e Proxy di Spring Remoting. Tutto questo tramite pura configurazione, via XML o annotation a seconda dei gusti, e con un esempio specifico in Flex con Spring BlazeDS Integration.
際際滷 del decimo Meetup di Milano, che si 竪 tenuto il 26 Gennaio dalle ore 10:30 alle ore 12:00 in formato virtuale.
Abbiamo parlato insieme a Davide Bonaciti di come ha realizzato un caso d'uso di automazione e CI/CD. Stefano Bernardini, Serena Galassi e Lorenzo Ornella, invece, ci parleranno di DataGraph e ci mostreranno una demo di implementazione per realizzare un'asta del fantacalcio 2.0.
Come creare una PWA Progressive Web App @ Inbound Strategies 2018Giovanni Sacheli
油
際際滷 del mio intervento sulla tecnologia delle PWA ad Inbound Strategies 9 marzo 2018.
Link alla guida online: https://www.evemilano.com/progressive-web-app/
Sempre pi湛 di frequente sentiamo parlare di nuove librerie, framework o linguaggi. Tutte queste nuove tecnologie promettono miracoli ma il nostro tempo 竪 una risorsa finita e non abbiamo il lusso di poter approfondire ogni novit.
Le PWA si basano su tecnologie che gi usiamo tutti i giorni nello sviluppo WEB quindi, senza farci intimidire, possiamo approcciare qualcosa che effettivamente rivoluzioni il nostro lavoro e che possa farlo con il minimo sforzo da parte nostra.
際際滷 delle serate del GDG Milano "App Engine Take Off" del 2015.
In questa serie di incontri vedremo insieme come funziona la piattaforma PaaS di Google App Engine, in particolare con il linguaggio Python. Lo scopo principale sar spiegare come funziona la piattaforma e realizzare piccole demo e/o snippets che possano tornare utili per lo sviluppo di tutti i giorni. Le serate saranno focalizzate su un topic specifico, iniziando da situazioni semplici ed adatte a tutti, addentrandosi poi, man mano, in situazioni sempre pi湛 specifiche.
SMAU Milano 2014 GAE 24/10/2014 - IWA ItalyPaolo Dadda
油
Spesso si tende a considerare il lavoro di piccoli team e sviluppatori individuali di minor qualit per questioni di competenze.
Un cloud, infatti, necessita spesso di VPS da configurare, far funzionare e mantenere, che seppur virtuali e dedicate, richiedono un minimo di competenza.
Come mantenere alta la qualit per piccoli team e singoli developer?
Come ridurre lesigenza di dover saper far tutto?
Utilizzare servizi che eliminano, lato sviluppatore, gestione e sicurezza del server, pu嘆 essere determinante, permettendo di specializzarsi di pi湛 sui propri skill senza trovarsi obbligati a coinvolgere terze figure o diventare factotum del web.
Target:
WSP-G3-002 - Web Project Manager,
WSP-G3-005 - Business Analyst,
WSP-G3-009 - Frontend Web developer,
WSP-G3-010 - Server Side Web Developer,
WSP-G3-014 - Digital Strategic Planner.
Angular js o React? Spunti e idee per la scelta di un frameworkGiovanni Buffa
油
Come poter scegliere un framework da utilizzare in un progetto per una web applications? Durante questo workshop analizzeremo le parti fondamentali di AngularJs e React, in modo da capire pregi e difetti di ognungo dei due principali strumenti di sviluppo.
Antonio Russo, Federico Oldrini e Jacopo Giola di Makeitapp hanno presentato il workshop di CommitUniversity, dedicato al Backend as a Service, mostrandoci come costruire con esso un applicazione.
Quante volte abbiamo aperto una pagina web sul nostro browser e ci siamo lamentati di quanto il nostro strumento di navigazione sia "pesante" o "divoratore di risorse"? Sappiamo quanta fatica fa un browser per renderizzare una semplice pagina web e quante sfide deve affrontare? Beh, di recente mi sono posto queste domande e ho tentato di capire di pi湛 come 竪 fatto un browser e quali sfide deve affrontare per far s狸 che le nostre pagine web (o applicazioni) possano oggi essere cos狸 interessanti come le pensiamo. Conoscerlo meglio ci aiuter a realizzare forse un web migliore e magari rendere la vita pi湛 facile al browser stesso ed al nostro amato computer. Prover嘆 a dare anche a voi un po' di ci嘆 che ho capito e che mi ha aiutato a stare pi湛 attento e responsabile come artigiano del web!
uscita la release 1.0 da pochi giorni e non 竪 chiaro se 竪 una meteora o qualcosa che rester sul mercato e ritaglier una fetta della torta...ma proviamo a capire insieme cosa offre questo nuovo runtime per Javascript che vanta maggiore sicurezza rispetto a Node e la possibilit di utilizzare TypeScript...e non solo!
ES6 竪 stata una rivoluzione nel mondo JavaScript ed ha portato il linguaggio ad uno step successivo.
In questo talk si affrontano gli aspetti che hanno resto fondamentale questo nuovo standard.
Visual Studio Code 竪 il editor di codice sorgente che rende subito produttivi grazie alla sua semplicit e leggerezza ed in questo talk troverete una panoramica, oltre a tip & tricks utili.
Acadevmy - AngularDay 2018 - Change Detection, Zone.js ed altri mostriFrancesco Sciuti
油
Un talk dedicato agli aspetti pi湛 arcani di Angular tra i quali sono presenti alcuni mostri, che una volta conosciuti non fanno poi cos狸 tanta paura. Approfondiamo quindi alcuni aspetti della Change Detection di Angular, proviamo a capire a cosa serve e come funziona Zone.js e se sono presenti in giro altre creature o miti da sfatare!
TypeScript ha cambiato il modo di scrivere JavaScript ed in questo talk andiamo a scoprirne le principali caratteristiche per scrivere "JavaScript che non si rompe!"
N.B. Le slides sono aggiornate sino a TS 3.
Una panoramica delle caratteristiche e delle possibilit che hanno reso Angular uno dei framework pi湛 importanti sulla scena frontend.
N.B. Le slides sono aggiornate sino ad Angular 6.
Acadevmy - GraphQL & Angular: Tutto il REST 竪 noia!Francesco Sciuti
油
Un workshop da 2h con una prima parte dedicato ai fondamenti di GraphQL ed unapprofondita seconda parte che affronta lecosistema Apollo ed in particolar modo lintegrazione di Apollo Client su Angular.
Acadevmy - GraphQL & Angular: Tutto il REST 竪 noia!Francesco Sciuti
油
Creare PWA con Angular
1. PWA & Angular
...e la tua SPA diventa PWA
in pochi secondi!
Francesco Sciuti
Google Certi鍖ed Developer
https://www.acadevmy.it/intro
2. Chi sono?
Developer per scelta e per passione,
amante di nerdaggini di ogni tipo
ed amante della condivisione del sapere!
Da non troppo anche (quasi)
imprenditore!
Francesco Sciuti
Google Certi鍖ed Developer
https://www.acadevmy.it/intro
3. Software & Learning Factory
Francesco Sciuti
Google Certi鍖ed Developer
https://www.acadevmy.it/intro
10. Cosa sono le PWA?
Progressive Web App 竪 un termine che si riferisce ad applicazioni
web che vengono sviluppate e caricate come normali pagine web,
ma che si comportano in modo simile alle applicazioni native
quando utilizzate su un dispositivo mobile
Wikipedia
Francesco Sciuti
Google Certi鍖ed Developer
https://www.acadevmy.it/intro
11. Cosa sono le PWA?
Progressive Web App sono delle comuni web application che
sfruttano delle tecnologie (alcune neanche cos狸 nuove) che
consentono allutente di vivere unesperienza molto simile a quella
nativa, che sia essa mobile o desktop
Me medesimo
Ciccio Sciuti 1 - 0 Wikipedia
Ti竪! Francesco Sciuti
Google Certi鍖ed Developer
https://www.acadevmy.it/intro
12. Affidabilit
Funzionano anche in caso di instabilit di rete
Rapidit
Si caricano istantaneamente e rispondono rapidamente alle interazioni
dell'utente
Coinvolgimento
Sembrano applicazioni native sul dispositivo e offrono un'esperienza utente
ottimale
Cosa distingue una PWA?
Francesco Sciuti
Google Certi鍖ed Developer
https://www.acadevmy.it/intro
13. Progressive
Grazie al Progressive Enhancement da cui
ereditano parte del nome
Responsive
Si adattano quindi ai dispositivi che le ospitano
Network Independent
Possono lavorare offline!
App-like
Possono essere esteticamente uguali alle app
native, quindi ad esempio a tutto schermo
Continuous Update
Hanno un processo di aggiornamento molto pi湛
semplice in quanto web application
Quali caratteristiche hanno?
Safe (HTTPS)
Viaggiano su protocollo sicuro
Discoverable
Facilmente identi鍖cabili come applicazioni ma
rintracciabili dai motori di ricerca
Re-engageable
Possono richiamare linteresse degli utenti
tramite le Push Noti鍖cation
Installable
Possiamo installarle sui nostri dispositivi come
app native
Linkable
Ci basta un url per raggiungerle
Francesco Sciuti
Google Certi鍖ed Developer
https://www.acadevmy.it/intro
14. Add to Home Screen
(o A2HS perch辿 gli acronimi fanno sempre 鍖go!)
Cache Management
Push Noti鍖cation
App Shell
Devices Interaction
Persistance
...
Come fanno a fare tutto ci嘆?
Francesco Sciuti
Google Certi鍖ed Developer
https://www.acadevmy.it/intro
15. Web Manifest
Service Workers
Server Side Rendering
Web API Push API, Noti鍖cation API, Cache API, Intersection Observer, etc...
Client-side Storage IndexedDB
Native App Integration Trusted Web Activities/WebAPK/APPX
HTTPS
Con quali tecnologie?
Francesco Sciuti
Google Certi鍖ed Developer
https://www.acadevmy.it/intro
16. Ripassiamo rapidamente le principali...
Francesco Sciuti
Google Certi鍖ed Developer
https://www.acadevmy.it/intro
17. Manifest
Un semplice 鍖le JSON che consente di descrivere il
comportamento della nostra PWA
Il 鍖le manifest contiene tutte le informazioni necessarie allambiente che dovr
eseguire la nostra app, consentendo quindi allenvironment ospitante di sapere
quali sono il titolo o le icone da utilizzare per installare lapplicazione, lo scope di
esecuzione, alcuni aspetti estetici, etc...
Francesco Sciuti
Google Certi鍖ed Developer
https://www.acadevmy.it/intro
18. ManifestComunemente il 鍖le ha estensione .webmanifest
Nome
Icone
Url di avvio
Colore di fondo e del tema
Modalit di visualizzazione
Scope di esecuzione
Orientamento
Splash Screen
MDN Manifest Francesco Sciuti
Google Certi鍖ed Developer
https://www.acadevmy.it/intro
19. Service Workers
Sposando alcune API consentono di gestire funzionalit quali le noti鍖che push, la
gestione offline e la sincronizzazione in background.
Il cuore delle nostre PWA
Francesco Sciuti
Google Certi鍖ed Developer
https://www.acadevmy.it/intro
20. Service Workers
Sono degli script che vengono eseguiti dal browser in processi
separati rispetto alla pagina che li registra e che lavorano quindi in
background.
I SW lavorano come dei proxy ed
intercettano tutte le richieste HTTP
dellapplicazione e decidono come
rispondere secondo la logica che
svilupperemo.
Francesco Sciuti
Google Certi鍖ed Developer
https://www.acadevmy.it/intro
21. Service Workers
Gestione della Cache
Gestione Push Noti鍖cation
Sync dei dati in background
Lifecycle programmabile
Processo separato e con un
proprio scope di esecuzione
MDN - Service Workers Overview
MDN - Service Workers Offline Implementation
Francesco Sciuti
Google Certi鍖ed Developer
https://www.acadevmy.it/intro
22. App Shell
Il minimo indispensabile per un rendering veloce
Per App Shell intendiamo tutto lHTML, CSS e JS minimo ed indispensabile utile per
essere renderizzato immediatamente dal browser in modo da offrire allutente un
immediato feedback visivo ed evitare labbandono della nostra PWA.
Francesco Sciuti
Google Certi鍖ed Developer
https://www.acadevmy.it/intro
23. App Shell
I Service Worker (sempre loro!)
memorizzano l'interfaccia di base (la
shell) della web application in modalit
Responsive Web Design.
Questa shell fornisce un layout statico
iniziale,nella quale il contenuto pu嘆
essere caricato sia progressivamente
che dinamicamente immediatamente.
Francesco Sciuti
Google Certi鍖ed Developer
https://www.acadevmy.it/intro
24. Push Noti鍖cation
Sebbene non siano ancora supportati su iOS, le nostre PWA
possono inviare noti鍖che push al browser con l'API Push.
L'API Push viene utilizzata insieme alle
Noti鍖cation API per visualizzare il
messaggio.
Il vantaggio 竪 che l'API Push consente la
consegna della noti鍖ca anche quando
l'utente non naviga sulla PWA, poich辿
sono build on top sui Service Workers. Francesco Sciuti
Google Certi鍖ed Developer
https://www.acadevmy.it/intro
25. Push Noti鍖cation
Un utente visita la PWA (quindi protetta tramite HTTPS);
Viene richiesta l'autorizzazione per visualizzare le noti鍖che push;
Se l'utente ha concesso l'autorizzazione, il token del dispositivo (endpoint)
viene inviato al Server e archiviato;
Il Service Worker tiene docchio la ricezione di una noti鍖ca push;
Il Server invia una richiesta POST HTTP all'endpoint
(che 竪 un URL che contiene il token del dispositivo);
Quando il Service Worker riceve una noti鍖ca esegue si prende carico
della gestione dell'evento, del recupero dei dati di noti鍖ca dal server e
della visualizzazione della noti鍖ca all'utente. Francesco Sciuti
Google Certi鍖ed Developer
https://www.acadevmy.it/intro
29. Web API
Gli ingredienti indispensabili per unottima ricetta
Le Web API sono ormai molteplici e supportate rapidamente da tutti i browser sul
mercato, e molte di esse sono fondamentali per creare PWA e far si che siano
appunto progressive.
Francesco Sciuti
Google Certi鍖ed Developer
https://www.acadevmy.it/intro
30. Service Worker API
Utili per la gestione proxy dello stato del network e della
comunicazione server.
Noti鍖cation/Push API
Due API usate per con鍖gurare e mostrare le noti鍖che
allutente, ed iscriversi a un servizio push e ricevere messaggi
push
Cache API
Possiamo installarle sui nostri dispositivi come app native
Fetch API
Un modo 鍖essibile e potente per ottenere risorse locali o
remote.
Intersection Observer
Consente di con鍖gurare un callback che viene triggerato ogni
volta che un elemento, chiamato target, interseca il viewport
o un ulteriore elemento speci鍖cato.
Qualche API da usare
FormData API
Fornisce un modo per costruire facilmente un insieme di
coppie chiave / valore che rappresentano i campi modulo
e i loro valori, da utilizzare con il metodo
XMLHttpRequest.send ()
Channel Messaging API
Consente l'esecuzione di due script separati in contesti di
navigazione diversi allegati allo stesso documento.
Background Sync
Consente di rimandare le azioni 鍖no a quando l'utente non
ha una connettivit stabile.
Payment Request API
Standard aperto che sostituisce i 鍖ussi di pagamento
tradizionali consentendo ai commercianti di richiedere e
accettare qualsiasi pagamento in una singola chiamata
API.
Streams API
Francesco Sciuti
Google Certi鍖ed Developer
https://www.acadevmy.it/intro
32. Angular
One framework. Mobile & desktop.
Cross Platform
(PWA, Native, Desktop)
Veloce e Performante
(Code Generation, Universal, Code Splitting)
Produttivit
(Templates, Angular CLI, IDEs)
Pensato per la Full Dev Story
(Testing, Animation, Accessibility)
Francesco Sciuti
Google Certi鍖ed Developer
https://www.acadevmy.it/intro
33. Angular
SEMPLIFICA lo sviluppo di applicazioni web dinamiche
PRODUTTIVIT numerose funzionalit e utility incluse
MANUTENIBILIT codice leggibile e ben organizzato
RIDUCE i tempi di inserimento di nuovi membri in team e progetti
EFFICIENZA, PERFORMANCE E GESTIONE MEMORIA
ECOSISTEMA ricco di tools, librerie, componenti ready-to-use,
addons
COMMUNITY open source, supporto/forum/articoli, 鍖x/PR
frequenti
Francesco Sciuti
Google Certi鍖ed Developer
https://www.acadevmy.it/intro
34. Angular
Dalla versione 5 del Framework 竪 stato
aggiunto il supporto ai Service Workers, che
hanno aperto quindi le porte alla creazione
di PWA su Angular in maniera semplice e
rapida.
Il logo 鍖go invece 竪 arrivato dopo :D
Francesco Sciuti
Google Certi鍖ed Developer
https://www.acadevmy.it/intro
35. Angular
Come creare una PWA
ng new pwa-test
ng add @angular/pwa [--project pwa-test]
Durante questo processo vengono creati e modi鍖cati alcuni 鍖les di progetto come
index.html, package.json, angular.json, ngsw-con鍖g.json, etc
(il tutto grazie a Schematics).
ng build --prod
http-server -p 8080 -c-1 dist/pwa-test
N.B. Il pacchetto http-server va installato separatamente con il comando:
npm install -g http-server.
Navigare col browser su http://localhost:8080/
N.B. consigliata la incognito mode Francesco Sciuti
Google Certi鍖ed Developer
https://www.acadevmy.it/intro
36. La PWA 竪 stata creata
ed ha gi tutti i requisiti
richiesti!
Per veri鍖carlo usiamo
Lighthouse
ad esempio dai Chrome Dev Tools
Angular
Francesco Sciuti
Google Certi鍖ed Developer
https://www.acadevmy.it/intro
37. Angular
Come con鍖gurare una PWA
La con鍖gurazione dellapplicazione PWA 竪 presente nel 鍖le di
progetto manifest.webmanifest
Il 鍖le 竪 un 鍖le manifest standard a tutti gli effetti e quindi ha tutte le chiavi utili per le PWA
La con鍖gurazione per la gestione di tutti i comportamenti dei SW
竪 presente nel 鍖le di progetto ngsw-con鍖g.json
Il 鍖le in fase di build viene poi lavorato dalla CLI per produrre i comportamenti necessari del SW.
Francesco Sciuti
Google Certi鍖ed Developer
https://www.acadevmy.it/intro
38. Angular
Come con鍖gurare una PWA (ngsw-con鍖g.json)
La chiave assetGroups 竪 utilizzata per
le richieste HTTP vengono memorizzate
nella cache dal SW.
utilizzata per:
鍖les di progetto (html, css, js)
gli assets (come ad esempio le
immagini)
Ogni gruppo pu嘆 avere strategie di caching differenti
(prefetch | lazy).
interface AssetGroup {
name: string;
installMode?: 'prefetch' | 'lazy';
updateMode?: 'prefetch' | 'lazy';
resources: {
鍖les?: string[];
urls?: string[];
};
cacheQueryOptions?: { ignoreSearch?: boolean; };
}
Francesco Sciuti
Google Certi鍖ed Developer
https://www.acadevmy.it/intro
39. Angular
Come con鍖gurare una PWA (ngsw-con鍖g.json)
export interface DataGroup {
name: string;
urls: string[];
version?: number;
cacheCon鍖g: {
maxSize: number;
maxAge: string;
timeout?: string;
strategy?: 'freshness' | 'performance';
};
cacheQueryOptions?: { ignoreSearch?: boolean; };
}
La chiave dataGroups 竪 utilizzata per le
richieste HTTP che non sono sottoposte a
versione insieme all'app.
utilizzata per:
Chiamate API
Risorse non versionate
Ogni gruppo pu嘆 avere strategie di caching differenti
(freshness | performance).
Per simulare la strategia staleWhileRevalidate imposta
strategy a freshness e timeout a 0u in cacheCon鍖g.
Francesco Sciuti
Google Certi鍖ed Developer
https://www.acadevmy.it/intro
40. Angular
Cosa viene prodotto dal processo di build
ngsw-worker.js
il vero e proprio SW ed 竪 istanziato (su un processo separato) da Angular
per mezzo di navigation.serviceWorker.register()
N.B. Il 鍖le ngsw-worker.js sar sempre lo stesso per ogni build e rimarr quindi lo stesso 鍖no all'aggiornamento a
una nuova versione di Angular.
ngsw.json
Questo 竪 il 鍖le di con鍖gurazione che verr utilizzato dal SW.
Questo 鍖le 竪 basato sulle con鍖gurazioni indicate sul 鍖le ngsw-con鍖g.json
La versione dellapp 竪 determinata dal contenuto del 鍖le ngsw.json, che include hash per tutto il contenuto
monitorato. Se anche uno dei 鍖les memorizzati nella cache cambia, l'hash del 鍖le cambier in ngsw.json, facendo s狸
che il SW si accorga di una nuova versione disponibile. Francesco Sciuti
Google Certi鍖ed Developer
https://www.acadevmy.it/intro
41. Angular
Il ServiceWorkerModule
Il ServiceWorkerModule 竪 il modulo che gestisce e che ci
consente di dialogare con il SW ed offre due interessantissimi
servizi:
SwUpdate per la gestione degli updates delle versioni
della nostra applicazione
SwPush per la gestione delle Push Noti鍖cation
Francesco Sciuti
Google Certi鍖ed Developer
https://www.acadevmy.it/intro
42. Francesco Sciuti
Google Certi鍖ed Developer
https://www.acadevmy.it/intro
Analizziamo il progetto!
(in caso di allarme usare il Piano B)
43. Angular
Creare una App Shell
Angular consente la generazione di una App Shell per mezzo
della CLI, utile per la renderizzazione del contenuto iniziale.
ng generate app-shell [--client-project
my-app --universal-project server-app]
ng run my-app:app-shell:production
Francesco Sciuti
Google Certi鍖ed Developer
https://www.acadevmy.it/intro
44. Il Caching dei 鍖les dellapplicazione viene valutato come una
singola unit, e difatti i 鍖les sono aggiornati tutti insieme.
Un'applicazione in esecuzione continua a essere eseguita con la stessa versione di tutti i
鍖le. Non inizia improvvisamente a ricevere 鍖le memorizzati nella cache da una versione
pi湛 recente, dato che potrebbero essere potenzialmente incompatibili.
Quando gli utenti aggiornano l'applicazione, vedono l'ultima
versione completamente memorizzata nella cache.
Gli aggiornamenti avvengono in background, relativamente rapidamente dopo la
pubblicazione delle modi鍖che. La versione precedente dell'applicazione viene
pubblicata 鍖no a quando un aggiornamento 竪 pronto dopo essere stato installato.
Angular
Come funziona il caching del Service Worker
Francesco Sciuti
Google Certi鍖ed Developer
https://www.acadevmy.it/intro
45. Ogni volta che viene distribuita una nuova build dell'app, anche
se viene aggiornato solo un singolo 鍖le, il SW tratta tale build
come una nuova versione dell'app.
Il SW fornisce una garanzia: un'app in esecuzione continuer a
eseguire la stessa versione dell'app. Se viene aperta un'altra
istanza dell'app in una nuova tab del browser Web, verr invece
offerta la versione pi湛 recente dell'app.
Di conseguenza, quella nuova scheda pu嘆 eseguire una versione diversa dell'app
rispetto alla scheda originale.
Angular
Come funziona il caching del Service Worker
Francesco Sciuti
Google Certi鍖ed Developer
https://www.acadevmy.it/intro
46. Ogni volta che l'utente ricarica l'applicazione, il SW veri鍖cher se
sul server 竪 disponibile un nuovo 鍖le ngsw.json.
La precedente e la nuova versione del 鍖le ngsw.json verranno
confrontate e il nuovo bundle verr scaricato e installato in
background.
pertanto essenziale veri鍖care frequentemente se sul server 竪 disponibile una nuova
versione dell'applicazione.
Se viene trovato un aggiornamento, questo viene scaricato e
memorizzato nella cache automaticamente e viene pubblicato al
successivo caricamento dell'applicazione.
Angular
Come vengono installate le versioni dellapp
Francesco Sciuti
Google Certi鍖ed Developer
https://www.acadevmy.it/intro
47. Il SW viene scaricato quando l'app viene aperta per la prima
volta e quando si accede all'app dopo un periodo di inattivit.
Se il SW 竪 stato modi鍖cato, verr aggiornato in background.
possibile ignorare il SW per alcune richieste ed 竪 sufficiente
impostare ngsw-bypass come header della richiesta o come
parametro di query.
Angular
Come funziona il caching del Service Worker
Francesco Sciuti
Google Certi鍖ed Developer
https://www.acadevmy.it/intro
48. Angular
Debug e Disattivazione del Service Worker
Debug
Il SW espone sotto un path virtuale le informazioni di debug
ed attualmente il path 竪 ngsw/state.
Disattivazione del SW
possibile farlo seguendo due strategie distinte:
Fail-safe o Safety Worker
Francesco Sciuti
Google Certi鍖ed Developer
https://www.acadevmy.it/intro
49. Angular & Workbox
In alcune occasioni, le comunque in鍖nite
possibilit offerte dal NgSW non sono
sufficienti per le nostre esigenze e serve
qualche arma ancora pi湛 potente e
鍖essibile.
Qui entra in gioco Workbox!
The JavaScript Libraries for adding offline support to web apps
https://developers.google.com/web/tools/workbox
Francesco Sciuti
Google Certi鍖ed Developer
https://www.acadevmy.it/intro
50. Workbox
Integrare WB in Angular
Creare un 鍖le manifest, icone ed aggiungere il tutto al progetto Angular
Aggiungere il manifest generato (https://app-manifest.鍖rebaseapp.com/) come asset nel 鍖le angular.json
Aggiungere il tag link del manifest al 鍖le index.html
<link href="manifest.json" rel="manifest">
Installare pacchetti workbox necessari da npm
npm install workbox-core workbox-precaching workbox-routing workbox-strategies
Creare il 鍖le per il Service Worker ed utilizzare le API di Workbox per
gestire tutto ci嘆 che si desidera!
Creare un 鍖le per la con鍖gurazione Workbox per iniettare
dinamicamente ci嘆 che si desidera mettere in cache
Creare un 鍖le per la con鍖gurazione Webpack
Aggiungere le chiavi script in package.json
Francesco Sciuti
Google Certi鍖ed Developer
https://www.acadevmy.it/intro
52. Mobile e Desktop
Le PWA offrono unesperienza native-like sia su
mobile che su desktop.
Attualmente il supporto 竪 offerto dai browser Chromium based
ma ci si sta lavorando anche da altri fronti!
Francesco Sciuti
Google Certi鍖ed Developer
https://www.acadevmy.it/intro
55. Gli store
La pubblicazione sugli store di applicazioni sono
ufficialmente supportate su
Google Play Store e Windows Store
In queste occasioni sar necessario lavorare su tecnologie
come TWA (Trusted Web Activity) o APPX
Per Apple 竪 necessario invece continuare a lavorare come avremmo fatto con unapp Cordova
con tutte le limitazioni che impone lApp Store.
Francesco Sciuti
Google Certi鍖ed Developer
https://www.acadevmy.it/intro
56. La compatibilit
I browser sono molto avanti nellimplementazione delle
tecnologie utili per le PWA ma ancora la compatibilit non 竪
completa (soprattutto su IOS).
Supporto parziale alle gesture
Supporto parziale al Manifest
Web API disponibili
Tags speci鍖ci per IOS
Add to Home Screen
Splash Screen
Supporto alle Push Noti鍖cation
Ciclo di Vita della PWA
Orientation
Francesco Sciuti
Google Certi鍖ed Developer
https://www.acadevmy.it/intro
61. Grazie a tutti!
Se avete voglia di dare
unopinione, di contattarmi
o di vincere un premio
(scherzo...non c竪 alcun premio
ma faceva molto 鍖go! :D)
Francesco Sciuti
Google Certi鍖ed Developer
https://www.acadevmy.it/intro
https://bit.ly/2CVtITW