Section 14 of 17

Side by side

Contents
featurefacadestateI/OAngularComponentstandaloneWorkOrdersFacadesignalsNgRx StoreeffectsHttpClientinterceptorsNext.jsComponent'use client'useWorkOrders()valuesQuery + Zustandserver · clientfetchRSC prefetchNuxtSFCscript setupuseWorkOrders()refsPinia storesetup store$fetchuseAsyncData@fleetline/maintenance/model · framework:agnostic

The same use case in three frameworks, file by file:

Library Angular React / Next.js Vue / Nuxt
model work-order.ts the same file the same file
data-access state createFeature + createEntityAdapter TanStack Query (server) + Zustand (client) Pinia setup store
data-access effects functional createEffect queryFn and useMutation async store actions + useAsyncData
concurrency switchMap / mergeMap query key + signal AbortController
HTTP service @Service() + HttpClient module over createApiClient composable with $fetch.create
data-access facade WorkOrdersFacade (signals) useWorkOrders() (values) useWorkOrders() (refs)
state scope provideWorkOrders() on the route <WorkOrdersProvider> in the shell layout provideWorkOrders() in the shell layout
ui input() / output() props / callbacks defineProps / defineEmits
ui styles styleUrl, emulated encapsulation CSS Modules <style scoped>
feature standalone component, OnPush by default server container + client component single-file component
shell Routes with providers and canActivate server layout with providers layout + route middleware
app route loadChildren page.tsx pages/*.vue
facade fake in tests provider in TestBed vi.mock of the module vi.mock of the module
boundaries @nx/enforce-module-boundaries the same rule the same rule, with vue-eslint-parser

What stays identical in all three: the folder of every file, the tags, the lint rule, the model library, the members of the facade (in React without open(), because the query opens itself), the component styles and the tests of the model library. What a developer switching between Fleetline's apps has to relearn is only the framework itself.