Challenges of angular in production (Tasos Bekos) - GreeceJS #17
greecejs
796 views
27 slides
Feb 22, 2017
Slide 1 of 27
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
About This Presentation
Modern web applications have constantly growing requirements and their API and complexity grows exponentially. In this session we'll look at a practical example of how to optimize solutions, like bundling, tree shaking, ahead of time compilation, lazy loading, etc. Also, we will get a glim...
Modern web applications have constantly growing requirements and their API and complexity grows exponentially. In this session we'll look at a practical example of how to optimize solutions, like bundling, tree shaking, ahead of time compilation, lazy loading, etc. Also, we will get a glimpse of what it takes to switch a complex product to a modern stack, with Angular in its heart, and how the company's commitment is making it possible.
Size: 3.52 MB
Language: en
Added: Feb 22, 2017
Slides: 27 pages
Slide Content
Challenges of Angular in production Tasos Bekos Frontend Architect @ ZuluTrade
Scalability Redux ( ngrx /store) Explicit update DevTools plugin Vertical separation of concerns Modules Typescript / Templates Horizontal separation of concerns Components Services API layer (Facade to backend services) Store layer (Reducers)
Pure UI Components ( onPush ) Container UI components ( async pipe) Services Store API services (Facade) Reducer Stream of immutable state slices Action State Backend response Function calls Parameters High level action/data flow @Output @Input
Performance Startup Download time Parse and compile time Runtime Javascript / CSS calculations
Reduce size Do not overuse libraries You don't (may not) need Lodash Make use of native Replicate small stuff Reward good behaviour Polyfill.io Don’t overuse components Can we achieve the same result with HTML/CSS ? Typescript helpers -- importHelpers with -- noEmitHelpers
import { Observable } from ‘ rxjs /Rx' ; import { find } from ‘ lodash ' ; import { Observable } from ‘ rxjs /Observable' ; import find from ‘ lodash-es /find' ; // Just use ES6 find!! Modular libraries
Optimize code & delivery Precompilation Ahead of Time compilation optimize- js Treeshaking Webpack 2 Closure CDN publicPath : `https://mycdn.com/`