Slide 1

Slide 1 text

Realtim Cr Platfor App Angular, ASP.NET Cor & Signa R wit

Slide 2

Slide 2 text

Fabian Gosebrink

Slide 3

Slide 3 text

Realtim Cr Platfor App Angular, ASP.NET Cor & Signa R wit

Slide 4

Slide 4 text

Server Clien

Slide 5

Slide 5 text

Server Clien

Slide 6

Slide 6 text

Server Clien HTTP WS

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

Realtim Signa R wit

Slide 9

Slide 9 text

Pollin

Slide 10

Slide 10 text

Pollin

Slide 11

Slide 11 text

Signa R

Slide 12

Slide 12 text

Signa R WebSocket

Slide 13

Slide 13 text

Signa R Server Sen Event

Slide 14

Slide 14 text

Signa R Lon Pollin

Slide 15

Slide 15 text

Signa R WebSocket Server Sen Event Lon Pollin

Slide 16

Slide 16 text

namespace server { public class Startup { public void ConfigureServices(IServiceCollection services) { // ... services.AddSignalR(); // ... } public void Configure(/* ... */) { // ... app.UseRouting(); app.UseEndpoints(endpoints => { endpoints.MapControllers(); endpoints.MapHub("/todohub"); }); } } } 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24

Slide 17

Slide 17 text

namespace server { public class Startup { public void ConfigureServices(IServiceCollection services) { // ... services.AddSignalR(); // ... } public void Configure(/* ... */) { // ... app.UseRouting(); app.UseEndpoints(endpoints => { endpoints.MapControllers(); endpoints.MapHub("/todohub"); }); } } } 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 public void ConfigureServices(IServiceCollection services) { // ... services.AddSignalR(); // ... } namespace server 1 { 2 public class Startup 3 { 4 5 6 7 8 9 10 11 public void Configure(/* ... */) 12 { 13 // ... 14 app.UseRouting(); 15 16 app.UseEndpoints(endpoints => 17 { 18 endpoints.MapControllers(); 19 endpoints.MapHub("/todohub"); 20 }); 21 } 22 } 23 } 24

Slide 18

Slide 18 text

namespace server { public class Startup { public void ConfigureServices(IServiceCollection services) { // ... services.AddSignalR(); // ... } public void Configure(/* ... */) { // ... app.UseRouting(); app.UseEndpoints(endpoints => { endpoints.MapControllers(); endpoints.MapHub("/todohub"); }); } } } 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 public void ConfigureServices(IServiceCollection services) { // ... services.AddSignalR(); // ... } namespace server 1 { 2 public class Startup 3 { 4 5 6 7 8 9 10 11 public void Configure(/* ... */) 12 { 13 // ... 14 app.UseRouting(); 15 16 app.UseEndpoints(endpoints => 17 { 18 endpoints.MapControllers(); 19 endpoints.MapHub("/todohub"); 20 }); 21 } 22 } 23 } 24 services.AddSignalR(); namespace server 1 { 2 public class Startup 3 { 4 public void ConfigureServices(IServiceCollection services) 5 { 6 // ... 7 8 // ... 9 } 10 11 public void Configure(/* ... */) 12 { 13 // ... 14 app.UseRouting(); 15 16 app.UseEndpoints(endpoints => 17 { 18 endpoints.MapControllers(); 19 endpoints.MapHub("/todohub"); 20 }); 21 } 22 } 23 } 24

Slide 19

Slide 19 text

namespace server { public class Startup { public void ConfigureServices(IServiceCollection services) { // ... services.AddSignalR(); // ... } public void Configure(/* ... */) { // ... app.UseRouting(); app.UseEndpoints(endpoints => { endpoints.MapControllers(); endpoints.MapHub("/todohub"); }); } } } 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 public void ConfigureServices(IServiceCollection services) { // ... services.AddSignalR(); // ... } namespace server 1 { 2 public class Startup 3 { 4 5 6 7 8 9 10 11 public void Configure(/* ... */) 12 { 13 // ... 14 app.UseRouting(); 15 16 app.UseEndpoints(endpoints => 17 { 18 endpoints.MapControllers(); 19 endpoints.MapHub("/todohub"); 20 }); 21 } 22 } 23 } 24 services.AddSignalR(); namespace server 1 { 2 public class Startup 3 { 4 public void ConfigureServices(IServiceCollection services) 5 { 6 // ... 7 8 // ... 9 } 10 11 public void Configure(/* ... */) 12 { 13 // ... 14 app.UseRouting(); 15 16 app.UseEndpoints(endpoints => 17 { 18 endpoints.MapControllers(); 19 endpoints.MapHub("/todohub"); 20 }); 21 } 22 } 23 } 24 public void Configure(/* ... */) { // ... app.UseRouting(); app.UseEndpoints(endpoints => { endpoints.MapControllers(); endpoints.MapHub("/todohub"); }); } } } namespace server 1 { 2 public class Startup 3 { 4 public void ConfigureServices(IServiceCollection services) 5 { 6 // ... 7 services.AddSignalR(); 8 // ... 9 } 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24

Slide 20

Slide 20 text

namespace server { public class Startup { public void ConfigureServices(IServiceCollection services) { // ... services.AddSignalR(); // ... } public void Configure(/* ... */) { // ... app.UseRouting(); app.UseEndpoints(endpoints => { endpoints.MapControllers(); endpoints.MapHub("/todohub"); }); } } } 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 public void ConfigureServices(IServiceCollection services) { // ... services.AddSignalR(); // ... } namespace server 1 { 2 public class Startup 3 { 4 5 6 7 8 9 10 11 public void Configure(/* ... */) 12 { 13 // ... 14 app.UseRouting(); 15 16 app.UseEndpoints(endpoints => 17 { 18 endpoints.MapControllers(); 19 endpoints.MapHub("/todohub"); 20 }); 21 } 22 } 23 } 24 services.AddSignalR(); namespace server 1 { 2 public class Startup 3 { 4 public void ConfigureServices(IServiceCollection services) 5 { 6 // ... 7 8 // ... 9 } 10 11 public void Configure(/* ... */) 12 { 13 // ... 14 app.UseRouting(); 15 16 app.UseEndpoints(endpoints => 17 { 18 endpoints.MapControllers(); 19 endpoints.MapHub("/todohub"); 20 }); 21 } 22 } 23 } 24 public void Configure(/* ... */) { // ... app.UseRouting(); app.UseEndpoints(endpoints => { endpoints.MapControllers(); endpoints.MapHub("/todohub"); }); } } } namespace server 1 { 2 public class Startup 3 { 4 public void ConfigureServices(IServiceCollection services) 5 { 6 // ... 7 services.AddSignalR(); 8 // ... 9 } 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 app.UseRouting(); namespace server 1 { 2 public class Startup 3 { 4 public void ConfigureServices(IServiceCollection services) 5 { 6 // ... 7 services.AddSignalR(); 8 // ... 9 } 10 11 public void Configure(/* ... */) 12 { 13 // ... 14 15 16 app.UseEndpoints(endpoints => 17 { 18 endpoints.MapControllers(); 19 endpoints.MapHub("/todohub"); 20 }); 21 } 22 } 23 } 24

Slide 21

Slide 21 text

namespace server { public class Startup { public void ConfigureServices(IServiceCollection services) { // ... services.AddSignalR(); // ... } public void Configure(/* ... */) { // ... app.UseRouting(); app.UseEndpoints(endpoints => { endpoints.MapControllers(); endpoints.MapHub("/todohub"); }); } } } 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 public void ConfigureServices(IServiceCollection services) { // ... services.AddSignalR(); // ... } namespace server 1 { 2 public class Startup 3 { 4 5 6 7 8 9 10 11 public void Configure(/* ... */) 12 { 13 // ... 14 app.UseRouting(); 15 16 app.UseEndpoints(endpoints => 17 { 18 endpoints.MapControllers(); 19 endpoints.MapHub("/todohub"); 20 }); 21 } 22 } 23 } 24 services.AddSignalR(); namespace server 1 { 2 public class Startup 3 { 4 public void ConfigureServices(IServiceCollection services) 5 { 6 // ... 7 8 // ... 9 } 10 11 public void Configure(/* ... */) 12 { 13 // ... 14 app.UseRouting(); 15 16 app.UseEndpoints(endpoints => 17 { 18 endpoints.MapControllers(); 19 endpoints.MapHub("/todohub"); 20 }); 21 } 22 } 23 } 24 public void Configure(/* ... */) { // ... app.UseRouting(); app.UseEndpoints(endpoints => { endpoints.MapControllers(); endpoints.MapHub("/todohub"); }); } } } namespace server 1 { 2 public class Startup 3 { 4 public void ConfigureServices(IServiceCollection services) 5 { 6 // ... 7 services.AddSignalR(); 8 // ... 9 } 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 app.UseRouting(); namespace server 1 { 2 public class Startup 3 { 4 public void ConfigureServices(IServiceCollection services) 5 { 6 // ... 7 services.AddSignalR(); 8 // ... 9 } 10 11 public void Configure(/* ... */) 12 { 13 // ... 14 15 16 app.UseEndpoints(endpoints => 17 { 18 endpoints.MapControllers(); 19 endpoints.MapHub("/todohub"); 20 }); 21 } 22 } 23 } 24 app.UseEndpoints(endpoints => { endpoints.MapControllers(); endpoints.MapHub("/todohub"); }); namespace server 1 { 2 public class Startup 3 { 4 public void ConfigureServices(IServiceCollection services) 5 { 6 // ... 7 services.AddSignalR(); 8 // ... 9 } 10 11 public void Configure(/* ... */) 12 { 13 // ... 14 app.UseRouting(); 15 16 17 18 19 20 21 } 22 } 23 } 24

Slide 22

Slide 22 text

namespace server { public class Startup { public void ConfigureServices(IServiceCollection services) { // ... services.AddSignalR(); // ... } public void Configure(/* ... */) { // ... app.UseRouting(); app.UseEndpoints(endpoints => { endpoints.MapControllers(); endpoints.MapHub("/todohub"); }); } } } 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 public void ConfigureServices(IServiceCollection services) { // ... services.AddSignalR(); // ... } namespace server 1 { 2 public class Startup 3 { 4 5 6 7 8 9 10 11 public void Configure(/* ... */) 12 { 13 // ... 14 app.UseRouting(); 15 16 app.UseEndpoints(endpoints => 17 { 18 endpoints.MapControllers(); 19 endpoints.MapHub("/todohub"); 20 }); 21 } 22 } 23 } 24 services.AddSignalR(); namespace server 1 { 2 public class Startup 3 { 4 public void ConfigureServices(IServiceCollection services) 5 { 6 // ... 7 8 // ... 9 } 10 11 public void Configure(/* ... */) 12 { 13 // ... 14 app.UseRouting(); 15 16 app.UseEndpoints(endpoints => 17 { 18 endpoints.MapControllers(); 19 endpoints.MapHub("/todohub"); 20 }); 21 } 22 } 23 } 24 public void Configure(/* ... */) { // ... app.UseRouting(); app.UseEndpoints(endpoints => { endpoints.MapControllers(); endpoints.MapHub("/todohub"); }); } } } namespace server 1 { 2 public class Startup 3 { 4 public void ConfigureServices(IServiceCollection services) 5 { 6 // ... 7 services.AddSignalR(); 8 // ... 9 } 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 app.UseRouting(); namespace server 1 { 2 public class Startup 3 { 4 public void ConfigureServices(IServiceCollection services) 5 { 6 // ... 7 services.AddSignalR(); 8 // ... 9 } 10 11 public void Configure(/* ... */) 12 { 13 // ... 14 15 16 app.UseEndpoints(endpoints => 17 { 18 endpoints.MapControllers(); 19 endpoints.MapHub("/todohub"); 20 }); 21 } 22 } 23 } 24 app.UseEndpoints(endpoints => { endpoints.MapControllers(); endpoints.MapHub("/todohub"); }); namespace server 1 { 2 public class Startup 3 { 4 public void ConfigureServices(IServiceCollection services) 5 { 6 // ... 7 services.AddSignalR(); 8 // ... 9 } 10 11 public void Configure(/* ... */) 12 { 13 // ... 14 app.UseRouting(); 15 16 17 18 19 20 21 } 22 } 23 } 24 endpoints.MapHub("/todohub"); namespace server 1 { 2 public class Startup 3 { 4 public void ConfigureServices(IServiceCollection services) 5 { 6 // ... 7 services.AddSignalR(); 8 // ... 9 } 10 11 public void Configure(/* ... */) 12 { 13 // ... 14 app.UseRouting(); 15 16 app.UseEndpoints(endpoints => 17 { 18 endpoints.MapControllers(); 19 20 }); 21 } 22 } 23 } 24

Slide 23

Slide 23 text

Hub

Slide 24

Slide 24 text

Hub namespace server.Hubs { public class TodoHub : Hub { public async Task MySuperDuperAction(object data) { await Clients.All.SendAsync("myclientmethod", data); } } } 1 2 3 4 5 6 7 8 9 10

Slide 25

Slide 25 text

public class TodosController : ControllerBase { private readonly IHubContext _todoHubContext; public TodosController( IHubContext todoHubContext ) { _todoHubContext = todoHubContext; } [HttpPost(Name = nameof(AddTodo))] public async Task AddTodo( [FromBody] TodoCreateDto todoCreateDto) { // ... do http things await _todoHubContext.Clients.All.SendAsync("todo-added", newTodoEntity); return CreatedAtRoute(/* ... */); } } 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22

Slide 26

Slide 26 text

No content

Slide 27

Slide 27 text

No content

Slide 28

Slide 28 text

No content

Slide 29

Slide 29 text

@microsoft/signalr

Slide 30

Slide 30 text

No content

Slide 31

Slide 31 text

No content

Slide 32

Slide 32 text

No content

Slide 33

Slide 33 text

No content

Slide 34

Slide 34 text

No content

Slide 35

Slide 35 text

Dem

Slide 36

Slide 36 text

Cr Platfor

Slide 37

Slide 37 text

Ma

Slide 38

Slide 38 text

Ma Window

Slide 39

Slide 39 text

Ma Window Lin

Slide 40

Slide 40 text

Mobil

Slide 41

Slide 41 text

Mobil Desktop

Slide 42

Slide 42 text

Mobil Desktop Web

Slide 43

Slide 43 text

s muc mor ...

Slide 44

Slide 44 text

Cordov

Slide 45

Slide 45 text

Apache Cordova is an open- source mobile development framework. It allows you to use standard web technologies - HTML5, CSS3, and JavaScript for cross-platform development. " "

Slide 46

Slide 46 text

No content

Slide 47

Slide 47 text

$ npm install cordova -g

Slide 48

Slide 48 text

$ cordova create myFirstApp

Slide 49

Slide 49 text

├── www │ ├── css │ │ └── index.css │ ├── img │ │ └── logo.png │ ├── js │ │ └── index.js │ └── index.html ├── .gitignore ├── config.xml └── package.json 1 2 3 4 5 6 7 8 9 10 11

Slide 50

Slide 50 text

├── www │ ├── css │ │ └── index.css │ ├── img │ │ └── logo.png │ ├── js │ │ └── index.js │ └── index.html ├── .gitignore ├── config.xml └── package.json 1 2 3 4 5 6 7 8 9 10 11 ├── www 1 │ ├── css 2 │ │ └── index.css 3 │ ├── img 4 │ │ └── logo.png 5 │ ├── js 6 │ │ └── index.js 7 │ └── index.html 8 ├── .gitignore 9 ├── config.xml 10 └── package.json 11

Slide 51

Slide 51 text

├── www │ ├── css │ │ └── index.css │ ├── img │ │ └── logo.png │ ├── js │ │ └── index.js │ └── index.html ├── .gitignore ├── config.xml └── package.json 1 2 3 4 5 6 7 8 9 10 11 ├── www 1 │ ├── css 2 │ │ └── index.css 3 │ ├── img 4 │ │ └── logo.png 5 │ ├── js 6 │ │ └── index.js 7 │ └── index.html 8 ├── .gitignore 9 ├── config.xml 10 └── package.json 11 │ ├── css │ │ └── index.css │ ├── img │ │ └── logo.png │ ├── js │ │ └── index.js │ └── index.html ├── www 1 2 3 4 5 6 7 8 ├── .gitignore 9 ├── config.xml 10 └── package.json 11

Slide 52

Slide 52 text

├── www │ ├── css │ │ └── index.css │ ├── img │ │ └── logo.png │ ├── js │ │ └── index.js │ └── index.html ├── .gitignore ├── config.xml └── package.json 1 2 3 4 5 6 7 8 9 10 11 ├── www 1 │ ├── css 2 │ │ └── index.css 3 │ ├── img 4 │ │ └── logo.png 5 │ ├── js 6 │ │ └── index.js 7 │ └── index.html 8 ├── .gitignore 9 ├── config.xml 10 └── package.json 11 │ ├── css │ │ └── index.css │ ├── img │ │ └── logo.png │ ├── js │ │ └── index.js │ └── index.html ├── www 1 2 3 4 5 6 7 8 ├── .gitignore 9 ├── config.xml 10 └── package.json 11 ├── config.xml ├── www 1 │ ├── css 2 │ │ └── index.css 3 │ ├── img 4 │ │ └── logo.png 5 │ ├── js 6 │ │ └── index.js 7 │ └── index.html 8 ├── .gitignore 9 10 └── package.json 11

Slide 53

Slide 53 text

Gatherr Gatherr - Demo Application Offering Solutions Software 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36

Slide 54

Slide 54 text

Gatherr Gatherr - Demo Application 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29

Slide 55

Slide 55 text

Gatherr Gatherr - Demo Application 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 1 2 Gatherr 3 Gatherr - Demo Application 4 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29

Slide 56

Slide 56 text

Gatherr Gatherr - Demo Application 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 1 2 Gatherr 3 Gatherr - Demo Application 4 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 1 2 Gatherr 3 Gatherr - Demo Application 4 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29

Slide 57

Slide 57 text

Gatherr Gatherr - Demo Application 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 1 2 Gatherr 3 Gatherr - Demo Application 4 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 1 2 Gatherr 3 Gatherr - Demo Application 4 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 g p g Offering Solutions Software 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34

Slide 58

Slide 58 text

Gatherr Gatherr - Demo Application 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 1 2 Gatherr 3 Gatherr - Demo Application 4 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 1 2 Gatherr 3 Gatherr - Demo Application 4 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 1 2 Gatherr 3 Gatherr - Demo Application 4 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36

Slide 59

Slide 59 text

Gatherr Gatherr - Demo Application 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 1 2 Gatherr 3 Gatherr - Demo Application 4 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 1 2 Gatherr 3 Gatherr - Demo Application 4 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 1 2 Gatherr 3 Gatherr - Demo Application 4 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 1 2 Gatherr 3 Gatherr - Demo Application 4 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36

Slide 60

Slide 60 text

Gatherr Gatherr - Demo Application 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 1 2 Gatherr 3 Gatherr - Demo Application 4 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 1 2 Gatherr 3 Gatherr - Demo Application 4 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 1 2 Gatherr 3 Gatherr - Demo Application 4 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 1 2 Gatherr 3 Gatherr - Demo Application 4 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 1 2 Gatherr 3 Gatherr - Demo Application 4 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36

Slide 61

Slide 61 text

Gatherr Gatherr - Demo Application 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 1 2 Gatherr 3 Gatherr - Demo Application 4 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 1 2 Gatherr 3 Gatherr - Demo Application 4 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 1 2 Gatherr 3 Gatherr - Demo Application 4 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 1 2 Gatherr 3 Gatherr - Demo Application 4 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 1 2 Gatherr 3 Gatherr - Demo Application 4 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 1 2 Gatherr 3 Gatherr - Demo Application 4 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36

Slide 62

Slide 62 text

$ cordova plugin add cordova-plugin-camera

Slide 63

Slide 63 text

cordova platform add android cordova platform add ios cordova build 1 2 3 4

Slide 64

Slide 64 text

cordova platform add android cordova platform add ios cordova build 1 2 3 4 cordova platform add android 1 cordova platform add ios 2 3 cordova build 4

Slide 65

Slide 65 text

cordova platform add android cordova platform add ios cordova build 1 2 3 4 cordova platform add android 1 cordova platform add ios 2 3 cordova build 4 cordova platform add ios cordova platform add android 1 2 3 cordova build 4

Slide 66

Slide 66 text

cordova platform add android cordova platform add ios cordova build 1 2 3 4 cordova platform add android 1 cordova platform add ios 2 3 cordova build 4 cordova platform add ios cordova platform add android 1 2 3 cordova build 4 cordova build cordova platform add android 1 cordova platform add ios 2 3 4

Slide 67

Slide 67 text

No content

Slide 68

Slide 68 text

No content

Slide 69

Slide 69 text

No content

Slide 70

Slide 70 text

No content

Slide 71

Slide 71 text

No content

Slide 72

Slide 72 text

Dem

Slide 73

Slide 73 text

Electro

Slide 74

Slide 74 text

Electron is a tool for building Cross- Platform Desktop Apps with Javascript, Html and CSS " "

Slide 75

Slide 75 text

No content

Slide 76

Slide 76 text

No content

Slide 77

Slide 77 text

Chromiu

Slide 78

Slide 78 text

No content

Slide 79

Slide 79 text

No content

Slide 80

Slide 80 text

an man mor ...

Slide 81

Slide 81 text

$ npm install electron -g

Slide 82

Slide 82 text

├── index.html ├── index.js └── package.json

Slide 83

Slide 83 text

{ "name": "your-app", "version": "0.1.0", "main": "index.js", "scripts": { "start": "electron ." } } 1 2 3 4 5 6 7 8

Slide 84

Slide 84 text

{ "name": "your-app", "version": "0.1.0", "main": "index.js", "scripts": { "start": "electron ." } } 1 2 3 4 5 6 7 8 "main": "index.js", { 1 "name": "your-app", 2 "version": "0.1.0", 3 4 "scripts": { 5 "start": "electron ." 6 } 7 } 8

Slide 85

Slide 85 text

const { app, BrowserWindow } = require('electron'); createWindow = () => { // Create the browser window. const win = new BrowserWindow({ width: 800, height: 600, webPreferences: { nodeIntegration: true, }, }); // and load the index.html of the app. win.loadFile('index.html'); }; app.whenReady().then(createWindow); 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

Slide 86

Slide 86 text

const { app, BrowserWindow } = require('electron'); createWindow = () => { // Create the browser window. const win = new BrowserWindow({ width: 800, height: 600, webPreferences: { nodeIntegration: true, }, }); // and load the index.html of the app. win.loadFile('index.html'); }; app.whenReady().then(createWindow); 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 const { app, BrowserWindow } = require('electron'); 1 2 createWindow = () => { 3 // Create the browser window. 4 const win = new BrowserWindow({ 5 width: 800, 6 height: 600, 7 webPreferences: { 8 nodeIntegration: true, 9 }, 10 }); 11 12 // and load the index.html of the app. 13 win.loadFile('index.html'); 14 }; 15 16 app.whenReady().then(createWindow); 17

Slide 87

Slide 87 text

const { app, BrowserWindow } = require('electron'); createWindow = () => { // Create the browser window. const win = new BrowserWindow({ width: 800, height: 600, webPreferences: { nodeIntegration: true, }, }); // and load the index.html of the app. win.loadFile('index.html'); }; app.whenReady().then(createWindow); 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 const { app, BrowserWindow } = require('electron'); 1 2 createWindow = () => { 3 // Create the browser window. 4 const win = new BrowserWindow({ 5 width: 800, 6 height: 600, 7 webPreferences: { 8 nodeIntegration: true, 9 }, 10 }); 11 12 // and load the index.html of the app. 13 win.loadFile('index.html'); 14 }; 15 16 app.whenReady().then(createWindow); 17 createWindow = () => { // Create the browser window. const win = new BrowserWindow({ width: 800, height: 600, webPreferences: { nodeIntegration: true, }, }); // and load the index.html of the app. win.loadFile('index.html'); }; const { app, BrowserWindow } = require('electron'); 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 app.whenReady().then(createWindow); 17

Slide 88

Slide 88 text

const { app, BrowserWindow } = require('electron'); createWindow = () => { // Create the browser window. const win = new BrowserWindow({ width: 800, height: 600, webPreferences: { nodeIntegration: true, }, }); // and load the index.html of the app. win.loadFile('index.html'); }; app.whenReady().then(createWindow); 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 const { app, BrowserWindow } = require('electron'); 1 2 createWindow = () => { 3 // Create the browser window. 4 const win = new BrowserWindow({ 5 width: 800, 6 height: 600, 7 webPreferences: { 8 nodeIntegration: true, 9 }, 10 }); 11 12 // and load the index.html of the app. 13 win.loadFile('index.html'); 14 }; 15 16 app.whenReady().then(createWindow); 17 createWindow = () => { // Create the browser window. const win = new BrowserWindow({ width: 800, height: 600, webPreferences: { nodeIntegration: true, }, }); // and load the index.html of the app. win.loadFile('index.html'); }; const { app, BrowserWindow } = require('electron'); 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 app.whenReady().then(createWindow); 17 const win = new BrowserWindow({ width: 800, height: 600, webPreferences: { nodeIntegration: true, }, }); const { app, BrowserWindow } = require('electron'); 1 2 createWindow = () => { 3 // Create the browser window. 4 5 6 7 8 9 10 11 12 // and load the index.html of the app. 13 win.loadFile('index.html'); 14 }; 15 16 app.whenReady().then(createWindow); 17

Slide 89

Slide 89 text

const { app, BrowserWindow } = require('electron'); createWindow = () => { // Create the browser window. const win = new BrowserWindow({ width: 800, height: 600, webPreferences: { nodeIntegration: true, }, }); // and load the index.html of the app. win.loadFile('index.html'); }; app.whenReady().then(createWindow); 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 const { app, BrowserWindow } = require('electron'); 1 2 createWindow = () => { 3 // Create the browser window. 4 const win = new BrowserWindow({ 5 width: 800, 6 height: 600, 7 webPreferences: { 8 nodeIntegration: true, 9 }, 10 }); 11 12 // and load the index.html of the app. 13 win.loadFile('index.html'); 14 }; 15 16 app.whenReady().then(createWindow); 17 createWindow = () => { // Create the browser window. const win = new BrowserWindow({ width: 800, height: 600, webPreferences: { nodeIntegration: true, }, }); // and load the index.html of the app. win.loadFile('index.html'); }; const { app, BrowserWindow } = require('electron'); 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 app.whenReady().then(createWindow); 17 const win = new BrowserWindow({ width: 800, height: 600, webPreferences: { nodeIntegration: true, }, }); const { app, BrowserWindow } = require('electron'); 1 2 createWindow = () => { 3 // Create the browser window. 4 5 6 7 8 9 10 11 12 // and load the index.html of the app. 13 win.loadFile('index.html'); 14 }; 15 16 app.whenReady().then(createWindow); 17 win.loadFile('index.html'); const { app, BrowserWindow } = require('electron'); 1 2 createWindow = () => { 3 // Create the browser window. 4 const win = new BrowserWindow({ 5 width: 800, 6 height: 600, 7 webPreferences: { 8 nodeIntegration: true, 9 }, 10 }); 11 12 // and load the index.html of the app. 13 14 }; 15 16 app.whenReady().then(createWindow); 17

Slide 90

Slide 90 text

const { app, BrowserWindow } = require('electron'); createWindow = () => { // Create the browser window. const win = new BrowserWindow({ width: 800, height: 600, webPreferences: { nodeIntegration: true, }, }); // and load the index.html of the app. win.loadFile('index.html'); }; app.whenReady().then(createWindow); 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 const { app, BrowserWindow } = require('electron'); 1 2 createWindow = () => { 3 // Create the browser window. 4 const win = new BrowserWindow({ 5 width: 800, 6 height: 600, 7 webPreferences: { 8 nodeIntegration: true, 9 }, 10 }); 11 12 // and load the index.html of the app. 13 win.loadFile('index.html'); 14 }; 15 16 app.whenReady().then(createWindow); 17 createWindow = () => { // Create the browser window. const win = new BrowserWindow({ width: 800, height: 600, webPreferences: { nodeIntegration: true, }, }); // and load the index.html of the app. win.loadFile('index.html'); }; const { app, BrowserWindow } = require('electron'); 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 app.whenReady().then(createWindow); 17 const win = new BrowserWindow({ width: 800, height: 600, webPreferences: { nodeIntegration: true, }, }); const { app, BrowserWindow } = require('electron'); 1 2 createWindow = () => { 3 // Create the browser window. 4 5 6 7 8 9 10 11 12 // and load the index.html of the app. 13 win.loadFile('index.html'); 14 }; 15 16 app.whenReady().then(createWindow); 17 win.loadFile('index.html'); const { app, BrowserWindow } = require('electron'); 1 2 createWindow = () => { 3 // Create the browser window. 4 const win = new BrowserWindow({ 5 width: 800, 6 height: 600, 7 webPreferences: { 8 nodeIntegration: true, 9 }, 10 }); 11 12 // and load the index.html of the app. 13 14 }; 15 16 app.whenReady().then(createWindow); 17 app.whenReady().then(createWindow); const { app, BrowserWindow } = require('electron'); 1 2 createWindow = () => { 3 // Create the browser window. 4 const win = new BrowserWindow({ 5 width: 800, 6 height: 600, 7 webPreferences: { 8 nodeIntegration: true, 9 }, 10 }); 11 12 // and load the index.html of the app. 13 win.loadFile('index.html'); 14 }; 15 16 17

Slide 91

Slide 91 text

Hello World!

Hello World!

1 2 3 4 5 6 7 8 9 10

Slide 92

Slide 92 text

$ electron .

Slide 93

Slide 93 text

No content

Slide 94

Slide 94 text

No content

Slide 95

Slide 95 text

Process Mai

Slide 96

Slide 96 text

Process Renderer

Slide 97

Slide 97 text

No content

Slide 98

Slide 98 text

No content

Slide 99

Slide 99 text

No content

Slide 100

Slide 100 text

├── assets │ ... ├── 6.2c6c97b8608a85a82adc.js ├── common.42c8477e0640407ae045.js ├── favicon.ico ├── icon.ico ├── index.html ├── index.js ├── main.8bb24261aa275d6a43db.js ├── package.json ├── polyfills-es5.739d51467cc1d8efbfae.js ├── polyfills.ef4ae634e106e395892c.js ├── runtime.061b6e0597d9fe17b937.js ├── scripts.82aad45f2fad02beee3c.js ├── styles.f503a9ab21b5d570c8af.css 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

Slide 101

Slide 101 text

├── assets │ ... ├── 6.2c6c97b8608a85a82adc.js ├── common.42c8477e0640407ae045.js ├── favicon.ico ├── icon.ico ├── index.html ├── index.js ├── main.8bb24261aa275d6a43db.js ├── package.json ├── polyfills-es5.739d51467cc1d8efbfae.js ├── polyfills.ef4ae634e106e395892c.js ├── runtime.061b6e0597d9fe17b937.js ├── scripts.82aad45f2fad02beee3c.js ├── styles.f503a9ab21b5d570c8af.css 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ├── assets │ ... ├── 6.2c6c97b8608a85a82adc.js ├── common.42c8477e0640407ae045.js ├── favicon.ico ├── index.html ├── main.8bb24261aa275d6a43db.js ├── polyfills-es5.739d51467cc1d8efbfae.js ├── polyfills.ef4ae634e106e395892c.js ├── runtime.061b6e0597d9fe17b937.js ├── scripts.82aad45f2fad02beee3c.js ├── styles.f503a9ab21b5d570c8af.css 1 2 3 4 5 ├── icon.ico 6 7 ├── index.js 8 9 ├── package.json 10 11 12 13 14 15

Slide 102

Slide 102 text

├── assets │ ... ├── 6.2c6c97b8608a85a82adc.js ├── common.42c8477e0640407ae045.js ├── favicon.ico ├── icon.ico ├── index.html ├── index.js ├── main.8bb24261aa275d6a43db.js ├── package.json ├── polyfills-es5.739d51467cc1d8efbfae.js ├── polyfills.ef4ae634e106e395892c.js ├── runtime.061b6e0597d9fe17b937.js ├── scripts.82aad45f2fad02beee3c.js ├── styles.f503a9ab21b5d570c8af.css 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ├── assets │ ... ├── 6.2c6c97b8608a85a82adc.js ├── common.42c8477e0640407ae045.js ├── favicon.ico ├── index.html ├── main.8bb24261aa275d6a43db.js ├── polyfills-es5.739d51467cc1d8efbfae.js ├── polyfills.ef4ae634e106e395892c.js ├── runtime.061b6e0597d9fe17b937.js ├── scripts.82aad45f2fad02beee3c.js ├── styles.f503a9ab21b5d570c8af.css 1 2 3 4 5 ├── icon.ico 6 7 ├── index.js 8 9 ├── package.json 10 11 12 13 14 15 ├── icon.ico ├── index.js ├── package.json ├── assets 1 │ ... 2 ├── 6.2c6c97b8608a85a82adc.js 3 ├── common.42c8477e0640407ae045.js 4 ├── favicon.ico 5 6 ├── index.html 7 8 ├── main.8bb24261aa275d6a43db.js 9 10 ├── polyfills-es5.739d51467cc1d8efbfae.js 11 ├── polyfills.ef4ae634e106e395892c.js 12 ├── runtime.061b6e0597d9fe17b937.js 13 ├── scripts.82aad45f2fad02beee3c.js 14 ├── styles.f503a9ab21b5d570c8af.css 15

Slide 103

Slide 103 text

No content

Slide 104

Slide 104 text

Communicatio

Slide 105

Slide 105 text

Communicatio IPC

Slide 106

Slide 106 text

mai proces const { ipcMain } = require('electron') ipcMain.on('asynchronous-message', (event, arg) => { console.log(arg) // prints "ping" event.reply('asynchronous-reply', 'pong') }) ipcMain.on('synchronous-message', (event, arg) => { console.log(arg) // prints "ping" event.returnValue = 'pong' }) 1 2 3 4 5 6 7 8 9 10 11

Slide 107

Slide 107 text

mai proces const { ipcMain } = require('electron') ipcMain.on('asynchronous-message', (event, arg) => { console.log(arg) // prints "ping" event.reply('asynchronous-reply', 'pong') }) ipcMain.on('synchronous-message', (event, arg) => { console.log(arg) // prints "ping" event.returnValue = 'pong' }) 1 2 3 4 5 6 7 8 9 10 11 const { ipcMain } = require('electron') 1 2 ipcMain.on('asynchronous-message', (event, arg) => { 3 console.log(arg) // prints "ping" 4 event.reply('asynchronous-reply', 'pong') 5 }) 6 7 ipcMain.on('synchronous-message', (event, arg) => { 8 console.log(arg) // prints "ping" 9 event.returnValue = 'pong' 10 }) 11

Slide 108

Slide 108 text

mai proces const { ipcMain } = require('electron') ipcMain.on('asynchronous-message', (event, arg) => { console.log(arg) // prints "ping" event.reply('asynchronous-reply', 'pong') }) ipcMain.on('synchronous-message', (event, arg) => { console.log(arg) // prints "ping" event.returnValue = 'pong' }) 1 2 3 4 5 6 7 8 9 10 11 const { ipcMain } = require('electron') 1 2 ipcMain.on('asynchronous-message', (event, arg) => { 3 console.log(arg) // prints "ping" 4 event.reply('asynchronous-reply', 'pong') 5 }) 6 7 ipcMain.on('synchronous-message', (event, arg) => { 8 console.log(arg) // prints "ping" 9 event.returnValue = 'pong' 10 }) 11 ipcMain.on('asynchronous-message', (event, arg) => { console.log(arg) // prints "ping" event.reply('asynchronous-reply', 'pong') }) const { ipcMain } = require('electron') 1 2 3 4 5 6 7 ipcMain.on('synchronous-message', (event, arg) => { 8 console.log(arg) // prints "ping" 9 event.returnValue = 'pong' 10 }) 11

Slide 109

Slide 109 text

mai proces const { ipcMain } = require('electron') ipcMain.on('asynchronous-message', (event, arg) => { console.log(arg) // prints "ping" event.reply('asynchronous-reply', 'pong') }) ipcMain.on('synchronous-message', (event, arg) => { console.log(arg) // prints "ping" event.returnValue = 'pong' }) 1 2 3 4 5 6 7 8 9 10 11 const { ipcMain } = require('electron') 1 2 ipcMain.on('asynchronous-message', (event, arg) => { 3 console.log(arg) // prints "ping" 4 event.reply('asynchronous-reply', 'pong') 5 }) 6 7 ipcMain.on('synchronous-message', (event, arg) => { 8 console.log(arg) // prints "ping" 9 event.returnValue = 'pong' 10 }) 11 ipcMain.on('asynchronous-message', (event, arg) => { console.log(arg) // prints "ping" event.reply('asynchronous-reply', 'pong') }) const { ipcMain } = require('electron') 1 2 3 4 5 6 7 ipcMain.on('synchronous-message', (event, arg) => { 8 console.log(arg) // prints "ping" 9 event.returnValue = 'pong' 10 }) 11 ipcMain.on('synchronous-message', (event, arg) => { console.log(arg) // prints "ping" event.returnValue = 'pong' }) const { ipcMain } = require('electron') 1 2 ipcMain.on('asynchronous-message', (event, arg) => { 3 console.log(arg) // prints "ping" 4 event.reply('asynchronous-reply', 'pong') 5 }) 6 7 8 9 10 11

Slide 110

Slide 110 text

renderer proces const { ipcRenderer } = require('electron'); // prints "pong" console.log(ipcRenderer.sendSync('synchronous-message', 'ping')) ipcRenderer.on('asynchronous-reply', (event, arg) => { console.log(arg) // prints "pong" }) ipcRenderer.send('asynchronous-message', 'ping') 1 2 3 4 5 6 7 8 9 10

Slide 111

Slide 111 text

renderer proces const { ipcRenderer } = require('electron'); // prints "pong" console.log(ipcRenderer.sendSync('synchronous-message', 'ping')) ipcRenderer.on('asynchronous-reply', (event, arg) => { console.log(arg) // prints "pong" }) ipcRenderer.send('asynchronous-message', 'ping') 1 2 3 4 5 6 7 8 9 10 const { ipcRenderer } = require('electron'); 1 2 // prints "pong" 3 console.log(ipcRenderer.sendSync('synchronous-message', 'ping')) 4 5 ipcRenderer.on('asynchronous-reply', (event, arg) => { 6 console.log(arg) // prints "pong" 7 }) 8 9 ipcRenderer.send('asynchronous-message', 'ping') 10

Slide 112

Slide 112 text

renderer proces const { ipcRenderer } = require('electron'); // prints "pong" console.log(ipcRenderer.sendSync('synchronous-message', 'ping')) ipcRenderer.on('asynchronous-reply', (event, arg) => { console.log(arg) // prints "pong" }) ipcRenderer.send('asynchronous-message', 'ping') 1 2 3 4 5 6 7 8 9 10 const { ipcRenderer } = require('electron'); 1 2 // prints "pong" 3 console.log(ipcRenderer.sendSync('synchronous-message', 'ping')) 4 5 ipcRenderer.on('asynchronous-reply', (event, arg) => { 6 console.log(arg) // prints "pong" 7 }) 8 9 ipcRenderer.send('asynchronous-message', 'ping') 10 // prints "pong" console.log(ipcRenderer.sendSync('synchronous-message', 'ping')) const { ipcRenderer } = require('electron'); 1 2 3 4 5 ipcRenderer.on('asynchronous-reply', (event, arg) => { 6 console.log(arg) // prints "pong" 7 }) 8 9 ipcRenderer.send('asynchronous-message', 'ping') 10

Slide 113

Slide 113 text

renderer proces const { ipcRenderer } = require('electron'); // prints "pong" console.log(ipcRenderer.sendSync('synchronous-message', 'ping')) ipcRenderer.on('asynchronous-reply', (event, arg) => { console.log(arg) // prints "pong" }) ipcRenderer.send('asynchronous-message', 'ping') 1 2 3 4 5 6 7 8 9 10 const { ipcRenderer } = require('electron'); 1 2 // prints "pong" 3 console.log(ipcRenderer.sendSync('synchronous-message', 'ping')) 4 5 ipcRenderer.on('asynchronous-reply', (event, arg) => { 6 console.log(arg) // prints "pong" 7 }) 8 9 ipcRenderer.send('asynchronous-message', 'ping') 10 // prints "pong" console.log(ipcRenderer.sendSync('synchronous-message', 'ping')) const { ipcRenderer } = require('electron'); 1 2 3 4 5 ipcRenderer.on('asynchronous-reply', (event, arg) => { 6 console.log(arg) // prints "pong" 7 }) 8 9 ipcRenderer.send('asynchronous-message', 'ping') 10 ipcRenderer.on('asynchronous-reply', (event, arg) => { console.log(arg) // prints "pong" }) ipcRenderer.send('asynchronous-message', 'ping') const { ipcRenderer } = require('electron'); 1 2 // prints "pong" 3 console.log(ipcRenderer.sendSync('synchronous-message', 'ping')) 4 5 6 7 8 9 10

Slide 114

Slide 114 text

mai proces var os = require('os'); var cpus = os.cpus(); 1 2 3

Slide 115

Slide 115 text

mai proces var os = require('os'); var cpus = os.cpus(); 1 2 3 var os = require('os'); 1 2 var cpus = os.cpus(); 3

Slide 116

Slide 116 text

mai proces var os = require('os'); var cpus = os.cpus(); 1 2 3 var os = require('os'); 1 2 var cpus = os.cpus(); 3 var cpus = os.cpus(); var os = require('os'); 1 2 3

Slide 117

Slide 117 text

mai proces let startSendCpuValues = () => { setInterval(() => { cpuValues.getCPUUsage(percentage => { if (mainWindow) { mainWindow.webContents.send( 'newCpuValue', (percentage * 100).toFixed(2) ); } }); }, 1000); }; 1 2 3 4 5 6 7 8 9 10 11 12

Slide 118

Slide 118 text

mai proces let startSendCpuValues = () => { setInterval(() => { cpuValues.getCPUUsage(percentage => { if (mainWindow) { mainWindow.webContents.send( 'newCpuValue', (percentage * 100).toFixed(2) ); } }); }, 1000); }; 1 2 3 4 5 6 7 8 9 10 11 12 let startSendCpuValues = () => { setInterval(() => { cpuValues.getCPUUsage(percentage => { if (mainWindow) { mainWindow.webContents.send( 'newCpuValue', (percentage * 100).toFixed(2) ); } }); }, 1000); }; 1 2 3 4 5 6 7 8 9 10 11 12

Slide 119

Slide 119 text

mai proces let startSendCpuValues = () => { setInterval(() => { cpuValues.getCPUUsage(percentage => { if (mainWindow) { mainWindow.webContents.send( 'newCpuValue', (percentage * 100).toFixed(2) ); } }); }, 1000); }; 1 2 3 4 5 6 7 8 9 10 11 12 let startSendCpuValues = () => { setInterval(() => { cpuValues.getCPUUsage(percentage => { if (mainWindow) { mainWindow.webContents.send( 'newCpuValue', (percentage * 100).toFixed(2) ); } }); }, 1000); }; 1 2 3 4 5 6 7 8 9 10 11 12 cpuValues.getCPUUsage(percentage => { }); let startSendCpuValues = () => { 1 setInterval(() => { 2 3 if (mainWindow) { 4 mainWindow.webContents.send( 5 'newCpuValue', 6 (percentage * 100).toFixed(2) 7 ); 8 } 9 10 }, 1000); 11 }; 12

Slide 120

Slide 120 text

mai proces let startSendCpuValues = () => { setInterval(() => { cpuValues.getCPUUsage(percentage => { if (mainWindow) { mainWindow.webContents.send( 'newCpuValue', (percentage * 100).toFixed(2) ); } }); }, 1000); }; 1 2 3 4 5 6 7 8 9 10 11 12 let startSendCpuValues = () => { setInterval(() => { cpuValues.getCPUUsage(percentage => { if (mainWindow) { mainWindow.webContents.send( 'newCpuValue', (percentage * 100).toFixed(2) ); } }); }, 1000); }; 1 2 3 4 5 6 7 8 9 10 11 12 cpuValues.getCPUUsage(percentage => { }); let startSendCpuValues = () => { 1 setInterval(() => { 2 3 if (mainWindow) { 4 mainWindow.webContents.send( 5 'newCpuValue', 6 (percentage * 100).toFixed(2) 7 ); 8 } 9 10 }, 1000); 11 }; 12 mainWindow.webContents.send( 'newCpuValue', (percentage * 100).toFixed(2) ); let startSendCpuValues = () => { 1 setInterval(() => { 2 cpuValues.getCPUUsage(percentage => { 3 if (mainWindow) { 4 5 6 7 8 } 9 }); 10 }, 1000); 11 }; 12

Slide 121

Slide 121 text

renderer proces @Injectable({ providedIn: 'root' }) export class CpuValueService { private onNewCpuValue = new Subject(); get newCpuValue(){ return this.onNewCpuValue.asObservable(); } constructor(private electronService: ElectronService) { if (environment.desktop) { this.registerCpuEvent(); } } private registerCpuEvent() { if (this.electronService.ipcRenderer) { this.electronService.ipcRenderer.on( 'newCpuValue', 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18

Slide 122

Slide 122 text

renderer proces @Injectable({ providedIn: 'root' }) export class CpuValueService { private onNewCpuValue = new Subject(); get newCpuValue(){ return this.onNewCpuValue.asObservable(); } constructor(private electronService: ElectronService) { if (environment.desktop) { this.registerCpuEvent(); } } private registerCpuEvent() { if (this.electronService.ipcRenderer) { this.electronService.ipcRenderer.on( 'newCpuValue', 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 constructor(private electronService: ElectronService) { if (environment.desktop) { this.registerCpuEvent(); } } @Injectable({ providedIn: root }) 1 export class CpuValueService { 2 private onNewCpuValue = new Subject(); 3 4 get newCpuValue(){ 5 return this.onNewCpuValue.asObservable(); 6 } 7 8 9 10 11 12 13 14 private registerCpuEvent() { 15 if (this.electronService.ipcRenderer) { 16 this.electronService.ipcRenderer.on( 17 'newCpuValue', 18 (event: any, data: any) => { 19 this.onNewCpuValue.next(data); 20 } 21

Slide 123

Slide 123 text

renderer proces @Injectable({ providedIn: 'root' }) export class CpuValueService { private onNewCpuValue = new Subject(); get newCpuValue(){ return this.onNewCpuValue.asObservable(); } constructor(private electronService: ElectronService) { if (environment.desktop) { this.registerCpuEvent(); } } private registerCpuEvent() { if (this.electronService.ipcRenderer) { this.electronService.ipcRenderer.on( 'newCpuValue', 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 constructor(private electronService: ElectronService) { if (environment.desktop) { this.registerCpuEvent(); } } @Injectable({ providedIn: 'root' }) 1 export class CpuValueService { 2 private onNewCpuValue = new Subject(); 3 4 get newCpuValue(){ 5 return this.onNewCpuValue.asObservable(); 6 } 7 8 9 10 11 12 13 14 private registerCpuEvent() { 15 if (this.electronService.ipcRenderer) { 16 this.electronService.ipcRenderer.on( 17 'newCpuValue', 18 private registerCpuEvent() { if (this.electronService.ipcRenderer) { this.electronService.ipcRenderer.on( 'newCpuValue', (event: any, data: any) => { this.onNewCpuValue.next(data); } ); } } } 7 8 constructor(private electronService: ElectronService) { 9 if (environment.desktop) { 10 this.registerCpuEvent(); 11 } 12 } 13 14 15 16 17 18 19 20 21 22 23 24 } 25

Slide 124

Slide 124 text

renderer proces @Injectable({ providedIn: 'root' }) export class CpuValueService { private onNewCpuValue = new Subject(); get newCpuValue(){ return this.onNewCpuValue.asObservable(); } constructor(private electronService: ElectronService) { if (environment.desktop) { this.registerCpuEvent(); } } private registerCpuEvent() { if (this.electronService.ipcRenderer) { this.electronService.ipcRenderer.on( 'newCpuValue', 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 constructor(private electronService: ElectronService) { if (environment.desktop) { this.registerCpuEvent(); } } @Injectable({ providedIn: 'root' }) 1 export class CpuValueService { 2 private onNewCpuValue = new Subject(); 3 4 get newCpuValue(){ 5 return this.onNewCpuValue.asObservable(); 6 } 7 8 9 10 11 12 13 14 private registerCpuEvent() { 15 if (this.electronService.ipcRenderer) { 16 this.electronService.ipcRenderer.on( 17 'newCpuValue', 18 private registerCpuEvent() { if (this.electronService.ipcRenderer) { this.electronService.ipcRenderer.on( 'newCpuValue', @Injectable({ providedIn: 'root' }) 1 export class CpuValueService { 2 private onNewCpuValue = new Subject(); 3 4 get newCpuValue(){ 5 return this.onNewCpuValue.asObservable(); 6 } 7 8 constructor(private electronService: ElectronService) { 9 if (environment.desktop) { 10 this.registerCpuEvent(); 11 } 12 } 13 14 15 16 17 18 private onNewCpuValue = new Subject(); get newCpuValue(){ return this.onNewCpuValue.asObservable(); } @Injectable({ providedIn: 'root' }) 1 export class CpuValueService { 2 3 4 5 6 7 8 constructor(private electronService: ElectronService) { 9 if (environment.desktop) { 10 this.registerCpuEvent(); 11 } 12 } 13 14 private registerCpuEvent() { 15 if (this.electronService.ipcRenderer) { 16 this.electronService.ipcRenderer.on( 17 'newCpuValue', 18

Slide 125

Slide 125 text

$ npm install electron-packager -g

Slide 126

Slide 126 text

$ electron-packager .temp/desktop

Slide 127

Slide 127 text

$ electron-packager .temp/desktop --platform=linux, win32

Slide 128

Slide 128 text

Automatic Updates Crash Reports Content Tracing Installation Packages

Slide 129

Slide 129 text

No content

Slide 130

Slide 130 text

Dem

Slide 131

Slide 131 text

What about variation points? " "

Slide 132

Slide 132 text

No content

Slide 133

Slide 133 text

Dependenc Injectio

Slide 134

Slide 134 text

@Injectable({ providedIn: 'root', }) export abstract class AbstractCameraService { abstract getPhoto(...): Observable; } 1 2 3 4 5 6

Slide 135

Slide 135 text

@Injectable({ providedIn: 'root', useFactory: cameraFactory, deps: [PlatformInformationService], }) export abstract class AbstractCameraService { abstract getPhoto(...): Observable; } 1 2 3 4 5 6 7 8

Slide 136

Slide 136 text

export function cameraFactory( platformInformationService: PlatformInformationService ): AbstractCameraService { return platformInformationService.isMobile ? new MobileCameraService() : new DesktopCameraService(); } @Injectable({ providedIn: 'root', useFactory: cameraFactory, deps: [PlatformInformationService], }) export abstract class AbstractCameraService { abstract getPhoto(...): Observable; } 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

Slide 137

Slide 137 text

import { AbstractCameraService, Photo } from '@workspace/features/camera'; @Component({ ... }) export class ProfileDetailsComponent { constructor( private cameraService: AbstractCameraService ) {} pictureClicked() { this.cameraService.getPhoto() .subscribe((result: Photo) => { // ... }); } } 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18

Slide 138

Slide 138 text

import { AbstractCameraService, Photo } from '@workspace/features/camera'; @Component({ ... }) export class ProfileDetailsComponent { constructor( private cameraService: AbstractCameraService ) {} pictureClicked() { this.cameraService.getPhoto() .subscribe((result: Photo) => { // ... }); } } 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 import { AbstractCameraService, Photo } from '@workspace/features/camera'; 1 2 3 4 @Component({ ... }) 5 export class ProfileDetailsComponent { 6 7 constructor( 8 private cameraService: AbstractCameraService 9 ) {} 10 11 pictureClicked() { 12 this.cameraService.getPhoto() 13 .subscribe((result: Photo) => { 14 // ... 15 }); 16 } 17 } 18

Slide 139

Slide 139 text

import { AbstractCameraService, Photo } from '@workspace/features/camera'; @Component({ ... }) export class ProfileDetailsComponent { constructor( private cameraService: AbstractCameraService ) {} pictureClicked() { this.cameraService.getPhoto() .subscribe((result: Photo) => { // ... }); } } 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 import { AbstractCameraService, Photo } from '@workspace/features/camera'; 1 2 3 4 @Component({ ... }) 5 export class ProfileDetailsComponent { 6 7 constructor( 8 private cameraService: AbstractCameraService 9 ) {} 10 11 pictureClicked() { 12 this.cameraService.getPhoto() 13 .subscribe((result: Photo) => { 14 // ... 15 }); 16 } 17 } 18 constructor( private cameraService: AbstractCameraService ) {} import { 1 AbstractCameraService, Photo 2 } from '@workspace/features/camera'; 3 4 @Component({ ... }) 5 export class ProfileDetailsComponent { 6 7 8 9 10 11 pictureClicked() { 12 this.cameraService.getPhoto() 13 .subscribe((result: Photo) => { 14 // ... 15 }); 16 } 17 } 18

Slide 140

Slide 140 text

import { AbstractCameraService, Photo } from '@workspace/features/camera'; @Component({ ... }) export class ProfileDetailsComponent { constructor( private cameraService: AbstractCameraService ) {} pictureClicked() { this.cameraService.getPhoto() .subscribe((result: Photo) => { // ... }); } } 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 import { AbstractCameraService, Photo } from '@workspace/features/camera'; 1 2 3 4 @Component({ ... }) 5 export class ProfileDetailsComponent { 6 7 constructor( 8 private cameraService: AbstractCameraService 9 ) {} 10 11 pictureClicked() { 12 this.cameraService.getPhoto() 13 .subscribe((result: Photo) => { 14 // ... 15 }); 16 } 17 } 18 constructor( private cameraService: AbstractCameraService ) {} import { 1 AbstractCameraService, Photo 2 } from '@workspace/features/camera'; 3 4 @Component({ ... }) 5 export class ProfileDetailsComponent { 6 7 8 9 10 11 pictureClicked() { 12 this.cameraService.getPhoto() 13 .subscribe((result: Photo) => { 14 // ... 15 }); 16 } 17 } 18 pictureClicked() { this.cameraService.getPhoto() .subscribe((result: Photo) => { // ... }); } import { 1 AbstractCameraService, Photo 2 } from '@workspace/features/camera'; 3 4 @Component({ ... }) 5 export class ProfileDetailsComponent { 6 7 constructor( 8 private cameraService: AbstractCameraService 9 ) {} 10 11 12 13 14 15 16 17 } 18

Slide 141

Slide 141 text

No content

Slide 142

Slide 142 text

Securit

Slide 143

Slide 143 text

Mobil Desktop Web

Slide 144

Slide 144 text

OAut 2 OIDC

Slide 145

Slide 145 text

https://bit.ly/3mMHyKY

Slide 146

Slide 146 text

Alternative

Slide 147

Slide 147 text

No content

Slide 148

Slide 148 text

Progressiv Web App

Slide 149

Slide 149 text

Realtim Cr Platfor App Angular, ASP.NET Cor & Signa R wit

Slide 150

Slide 150 text

an yo !

Slide 151

Slide 151 text

Fabian Gosebrink