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
Signal Forms: Details & Live Coding @enterJS 2026 in Mannheim
manfredsteyer
PRO
0
97
Strategic Design in the Frontend: Moduliths & Micro Frontends @DDDEurope
manfredsteyer
PRO
0
93
Agentic UI
manfredsteyer
PRO
0
140
Signal Forms: Beyond the Basics @ngBaguette 2026 in Paris
manfredsteyer
PRO
0
240
Agentic UI beyond Chats Architecture Patterns & Open Standards @ngMunich 05/2026
manfredsteyer
PRO
0
220
Agentic AI in the Frontend: Architectures with Open Standards @iJS London 2026
manfredsteyer
PRO
0
150
Agentic AI & UI: Arcitecture, HITL, Emerging Standards
manfredsteyer
PRO
0
180
Agentic UI Requires Standards: AG-UI, A2UI, and MCP Apps Work Together @Angular London
manfredsteyer
PRO
1
97
Signal Forms: Beyond the Basics @ngBelgrade 2026
manfredsteyer
PRO
0
220
Other Decks in Programming
See All in Programming
Datadog × OpenTelemetry 入門と実践のあいだ
kn_to_maxpno
1
150
Lessons from Spec-Driven Development
simas
PRO
0
170
ADKを使って簡単にAIエージェントを作ってみよう
k1mu21
0
260
生成AI時代にこそ効くGo | Why Go Works in the Age of Generative AI
mom0tomo
8
3.2k
TSKaigi Night Talks 2026_TypeScriptでサプライチェーンの整合性を型に閉じ込める
geekplus_tech
0
340
TAKTでAI駆動開発の品質を設計する
j5ik2o
6
1.2k
Claspは野良GASの夢をみるか
takter00
0
180
net-httpのHTTP/2対応について
naruse
0
470
[2026年度第1回ORセミナー] 計画最適化ベンチャーと競技プログラミング人材
terryu16
0
260
CSC307 Lecture 17
javiergs
PRO
0
320
Observability in Practice:Grafana 與 Edge Device SRE 的那些事
blueswen
0
160
「エンジニアインターン、どうやって取った?」準備のリアルを語るLT会 Progate BAR
akiomatic
0
130
Featured
See All Featured
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
420
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.7k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
140
The Cult of Friendly URLs
andyhume
79
6.9k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.4k
WCS-LA-2024
lcolladotor
0
630
Producing Creativity
orderedlist
PRO
348
40k
First, design no harm
axbom
PRO
2
1.2k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
380
Context Engineering - Making Every Token Count
addyosmani
9
960
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
250
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
22k
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