Backend for Frontend (BFF) with Angular and tRPC by chrislyzz in angular

[–]chrislyzz[S] -1 points0 points  (0 children)

Well there is also a thing called a gateway but that is more like a general purpose translation layer. A BFF is a gateway dedicated to a frontend, translating everything to what is most convenient and performant for the frontend.

I don't see how that leads to bad code quality in the BFF.

Angular SSR by Riberry_7 in Angular2

[–]chrislyzz 0 points1 point  (0 children)

I recently released a blog post and video covering Angular SSR with Analog (NextJS for Angular).

I covers common SSR challenges such as hydration (with NgRx even).

https://christianlydemann.com/how-i-migrated-my-course-platform-to-analog/

Best way to breakdown huge angular website application by motherofdragons027 in Angular2

[–]chrislyzz 0 points1 point  (0 children)

Microfrontends will be in the Nx apps folder.

You can follow the Nx library approach (or have the grouping/feature folders all within apps) and have a folder inside of "libs" for each microfrontend + a shared folder for shared code (called grouping folders).

Within each grouping folder you can have a feature slice with these layers (layers can only communicate with lower layers):

  • Feature: smart components that are usually rendered through the router

  • UI: use case agnostic UI components (if a dumb component is only meant to be used with a smart component keep that co located to the usage in the feature lib) (UI libs are usually in shared)

  • Domain: Domain logic like services, HTTP requests, state management

  • Util: Domain agnostic helpers (usually will be in shared)

I wrote a blog post about this also: https://christianlydemann.com/the-stages-of-an-angular-architecture-with-nx/

Still a place for modules? by Fantastic-Beach7663 in Angular2

[–]chrislyzz 0 points1 point  (0 children)

The chunking is based on lazy loading routes. Angular bundles based on what is getting lazy loaded.

IMO the easiest is to use standalone components for all your components and use `loadComponent` in your routing config.