Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Lightweight Architectures: With Angular's Lates...
Search
Manfred Steyer
PRO
April 26, 2023
Programming
470
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Lightweight Architectures: With Angular's Latest Innovations
Manfred Steyer
PRO
April 26, 2023
More Decks by Manfred Steyer
See All by Manfred Steyer
Generative UI & AI-Assistants for Your Angular Solutions
manfredsteyer
PRO
1
180
Generative UI & AI-Assistants for Your Angular Solutions
manfredsteyer
PRO
0
110
Nostalgia Meets Technology: Super Mario with TypeScript
manfredsteyer
PRO
0
180
Signal Forms: Details & Live Coding @enterJS 2026 in Mannheim
manfredsteyer
PRO
0
230
Strategic Design in the Frontend: Moduliths & Micro Frontends @DDDEurope
manfredsteyer
PRO
0
160
Agentic UI
manfredsteyer
PRO
0
230
Signal Forms: Beyond the Basics @ngBaguette 2026 in Paris
manfredsteyer
PRO
0
290
Agentic UI beyond Chats Architecture Patterns & Open Standards @ngMunich 05/2026
manfredsteyer
PRO
0
240
Agentic AI in the Frontend: Architectures with Open Standards @iJS London 2026
manfredsteyer
PRO
0
170
Other Decks in Programming
See All in Programming
ビデオ通話が繋がる0.2秒で何が起きているのか
supurazako
2
150
20260623_Loop Engineeringで自分の分身の問い合わせBotを作る
ryugen04
0
220
【やさしく解説 設計編・中級 #6】良いアーキテクチャとは ~ 一本の登り道の、行き先 ~
panda728
PRO
0
160
act1-costs.pdf
sumedhbala
0
230
LLMによるContent Moderationの本番運用の裏側と品質担保への挑戦
suikabar
3
850
自作OSでスライド発表する
uyuki234
1
3.8k
yield再入門 #phpcon
o0h
PRO
0
350
吝嗇家のためのAI活用 / AI development for miser - ChatGPT + Issue Driven Development
tooppoo
0
190
音楽のための関数型プログラミング言語mimiumにおける多段階計算の活用
tomoyanonymous
1
330
OSINT for SRE: 学術論文とポストモーテムから探る システム障害の共通パターン / SRE NEXT 2026
tomoyk
1
3.7k
型も通る、synthも通る、それでも危ない 〜AIのCDKの権限とコストを機械で検証する〜 / It Passes Type Checks, It Passes Synth Checks, but It’s Still Risky — Automatically Verifying Permissions and Costs in AI’s CDK —
seike460
PRO
1
280
AIエージェントで 変わるAndroid開発環境
takahirom
2
650
Featured
See All Featured
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.3k
How GitHub (no longer) Works
holman
316
150k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
2k
KATA
mclloyd
PRO
35
15k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
590
How to build a perfect <img>
jonoalderson
1
5.8k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.5k
ラッコキーワード サービス紹介資料
rakko
1
3.9M
GraphQLとの向き合い方2022年版
quramy
50
15k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
6k
Speed Design
sergeychernyshev
33
1.9k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.4k
Transcript
@ManfredSteyer Lightweight Architectures With Angular's Latest Innovations ManfredSteyer
@ManfredSteyer
@ManfredSteyer
@ManfredSteyer
@ManfredSteyer
@ManfredSteyer
@ManfredSteyer Manfred Steyer
@ManfredSteyer
@ManfredSteyer NgModules + EcmaScript Modules import { NgModule } from
'@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { AppComponent } from './app.component'; […] @NgModule({ imports: [BrowserModule, OtherModule], declarations: [AppComponent, OtherComponent, OtherDirective], providers: [], bootstrap: [AppComponent], }) export class AppModule {} TypeScript Modules Angular Modules
@ManfredSteyer @Component({ standalone: true, imports: [ […], FlightCardComponent, CityPipe, CityValidator,
], selector: 'flight-search', templateUrl: '…' }) export class FlightSearchComponent { […] }
@ManfredSteyer @Component({ standalone: true, imports: [ […], FlightCardComponent, CityPipe, CityValidator,
], selector: 'flight-search', templateUrl: '…' }) export class FlightSearchComponent { […] }
@ManfredSteyer
@ManfredSteyer
@ManfredSteyer
@ManfredSteyer Small and Medium Apps: Folder per Feature
@ManfredSteyer Medium and Large Apps: Folder per Domain
@ManfredSteyer Restricting Access b/w Domains, etc. on a library basis
@ManfredSteyer Restricting Access b/w Domains, etc. on a folder basis
Credits to: Rainer Hahnekamp, AngularArchitects @softarc/eslint-plugin-sheriff
@ManfredSteyer
@ManfredSteyer
@ManfredSteyer
@ManfredSteyer
@ManfredSteyer → @Component({ standalone: true, selector: 'app-root', imports: [ […]
TicketsModule, ], templateUrl: '…' }) export class AppComponent { }
@ManfredSteyer → @Component({ standalone: true, selector: 'app-root', imports: [ […]
TicketsModule, ], templateUrl: '…' }) export class AppComponent { }
@ManfredSteyer → @NgModule({ imports: [ FlightCardComponent, ], declarations: [ MyTicketsComponent
], }) export class TicketsModule { }
@ManfredSteyer → @NgModule({ imports: [ FlightCardComponent, ], declarations: [ MyTicketsComponent
], }) export class TicketsModule { }
@ManfredSteyer bootstrapApplication(AppComponent, { providers: [ MyGlobalService, importProvidersFrom(MyModule), ] });
@ManfredSteyer bootstrapApplication(AppComponent, { providers: [ MyGlobalService, importProvidersFrom(MyModule), ] });
@ManfredSteyer
@ManfredSteyer ng g @angular/core:standalone
@ManfredSteyer
@ManfredSteyer bootstrapApplication(AppComponent, { providers: [ […] ] });
@ManfredSteyer bootstrapApplication(AppComponent, { providers: [ importProvidersFrom(HttpClientModule), importProvidersFrom(RouterModule.forRoot(APP_ROUTES)), ] });
@ManfredSteyer bootstrapApplication(AppComponent, { providers: [ provideHttpClient(), provideRouter(APP_ROUTES), ] });
@ManfredSteyer bootstrapApplication(AppComponent, { providers: [ provideHttpClient( withInterceptors([authInterceptor]), ), provideRouter(APP_ROUTES, withPreloading(PreloadAllModules),
withDebugTracing(), ), ] });
@ManfredSteyer bootstrapApplication(AppComponent, { providers: [ provideLogger(loggerConfig), ] });
@ManfredSteyer bootstrapApplication(AppComponent, { providers: [ provideLogger(loggerConfig, withColor({ debug: 3 })
), ] });
@ManfredSteyer
@ManfredSteyer bootstrapApplication(AppComponent, { providers: [ provideLogger(loggerConfig, withColor({ debug: 3 })
), ] });
@ManfredSteyer export function provideLogger(config: LoggerConfig): Provider[] { […] }
@ManfredSteyer export function provideLogger(config: LoggerConfig): Provider[] { return [ LoggerService,
{ provide: LoggerConfig, useValue: config }, { provide: LogFormatter, useValue: config.formatter }, ]; }
@ManfredSteyer export function provideLogger(config: LoggerConfig): Provider[] { return [ LoggerService,
{ provide: LoggerConfig, useValue: config }, { provide: LogFormatter, useValue: config.formatter }, ]; }
@ManfredSteyer export function provideLogger(config: LoggerConfig): EnvironmentProviders { return makeEnvironmentProviders([ LoggerService,
{ provide: LoggerConfig, useValue: config }, { provide: LogFormatter, useValue: config.formatter }, ]); }
@ManfredSteyer export function provideLogger( config: LoggerConfig, ...featues: LoggerFeature[] ): EnvironmentProviders
{ return makeEnvironmentProviders([ LoggerService, […], features?.map(f => f.providers) ]); }
@ManfredSteyer
@ManfredSteyer export const APP_ROUTES: Routes = [ […] { path:
'flight-booking', canActivate: [() => inject(AuthService).isAuthenticated()], component: FlightBookingComponent }, ]
@ManfredSteyer export const APP_ROUTES: Routes = [ […] { path:
'flight-booking', canActivate: [() => inject(AuthService).isAuthenticated()], component: FlightBookingComponent }, ]
@ManfredSteyer export const APP_ROUTES: Routes = [ […] { path:
'flight-booking', canActivate: [() => inject(AuthService).isAuthenticated()], resolve: { flights: () => inject(FlightService).findAll() }, component: FlightBookingComponent }, ]
@ManfredSteyer export const authInterceptor: HttpInterceptorFn = (req, next) => {
[…] }
@ManfredSteyer export const authInterceptor: HttpInterceptorFn = (req, next) => {
if (req.url.startsWith('https://[…]/')) { const headers = req.headers.set('Authorization', 'Bearer 12345'); req = req.clone({headers}); } […] }
@ManfredSteyer export const authInterceptor: HttpInterceptorFn = (req, next) => {
if (req.url.startsWith('https://[…]/')) { const headers = req.headers.set('Authorization', 'Bearer 12345'); req = req.clone({headers}); } return next(req); }
@ManfredSteyer bootstrapApplication(AppComponent, { providers: [ provideHttpClient( withInterceptors([authInterceptor]), ), ] });
@ManfredSteyer bootstrapApplication(AppComponent, { providers: [ provideLogger({ level: LogLevel.DEBUG, appenders: [DefaultLogAppender],
formatter: (level, cat, msg) => [level, cat, msg].join(';'), }), ] });
@ManfredSteyer Free eBook (brand new) ANGULARarchitects.io/standalone Standalone Components Download here:
@ManfredSteyer
@ManfredSteyer Zone.js: Monkey Patching After Event Handler: Inform Angular CD
Checks Components all components (default) or selected ones (OnPush)
@ManfredSteyer Zone.js: Magic Zone.js: ~100K Cannot patch async/await coarse grained
CD e.g. Components are always checked as a whole, even if only a tiny fraction changed
@ManfredSteyer Signals!
@ManfredSteyer Signals!
@ManfredSteyer Signal as Producer 4711 Consumer read set notify 4712
@ManfredSteyer flights: Flight[] = []; const flights = await this.flightService.findAsPromise(from,
to); this.flights = flights; <div *ngFor="let f of flights"> <flight-card [item]="f" /> </div>
@ManfredSteyer flights = signal<Flight[]>([]); const flights = await this.flightService.findAsPromise(from, to);
this.flights.set(flights); <div *ngFor="let f of flights()"> <flight-card [item]="f" /> </div>
@ManfredSteyer Fine-grained and Zone-less CD Convertible to Observables and vice
versa! No need to unsubscribe! No need to update code!
@ManfredSteyer
@ManfredSteyer Modern Angular: Lightweight Architectures Standalone Components and APIs Functional
Services Upcoming: Signals
@ManfredSteyer
@ManfredSteyer d Slides & Examples Remote Company Workshops and Consulting
http://angulararchitects.io