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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Manfred Steyer
PRO
May 09, 2023
Programming
360
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
May 09, 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
Observability in Practice:Grafana 與 Edge Device SRE 的那些事
blueswen
0
160
技術記事、AIに書かせるか、自分で書くか? 〜それでも私が自分の手で書く理由〜 / #QiitaConference
jnchito
2
1.4k
例外の正しい扱い方 そのエラー try-catchして大丈夫?
jinwatanabe
0
210
TypeScript+Orvalで実現する型安全かつ堅牢でスケーラブルなマルチチャネル通知基盤 / TSKaigi Night talks ~after conference~
d0riven
0
330
運用エージェントは "作る" から "育てる" へ - 記憶と自己進化の3層設計パターン / self-evolving-agents-three-layer-agent-design
gawa
12
3.6k
AI駆動開発で崩れていくコードベースを立て直す
kyoko_nr_nr
1
450
3Dシーンの圧縮
fadis
1
740
LLM本来の能力を解き放つサンドボックス技術とAI民主化への適用
yukukotani
3
3.6k
Composerを使ったサプライチェーン攻撃の様子を眺めてみる #phpstudy
o0h
PRO
2
240
「AIで開発し、AIを届ける」をEvalでつなぐ 〜AIネイティブに始めるプロダクト開発の実践〜 / Connecting "Develop with AI, deliver AI" with Eval
rkaga
4
4.9k
ADKを使って簡単にAIエージェントを作ってみよう
k1mu21
0
260
[2026年度第1回ORセミナー] 計画最適化ベンチャーと競技プログラミング人材
terryu16
0
260
Featured
See All Featured
Thoughts on Productivity
jonyablonski
76
5.2k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.4k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
610
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
4k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
530
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
Done Done
chrislema
186
16k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.9k
AI: The stuff that nobody shows you
jnunemaker
PRO
8
710
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
150
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
200
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.9k
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 It looks like you want to use NgIfDirective and
MyComponent. Shall I import it for you?
@ManfredSteyer
@ManfredSteyer
@ManfredSteyer
@ManfredSteyer Small and Medium Apps: Folder per Feature
@ManfredSteyer Your Public APIs: Barrels // index.ts == Public API
export * from './flight-booking.routes';
@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