Angular, old-school

Currently I’m up to the brim in a legacy Angular project. It’s not for the faint of the heart. Angular 11 that seems ancient by current metrics and a backend mix of TypeScript and JavaScript with a disfunctional dev/hmr setup has me inching my way towards understanding this behemoth of a business SPA with recurring setbacks. It’s not a slog, but it isn’t just quite a piece of cake either.

Recognisably this application was worked on in a bit of a rush with a developer who didn’t have any experience with the Jamstack and its more advanced development setups such as hot module reloading and automatic TypeScript compiling.

What’s interesting to realize is that Angulars popularity with the enterprise crowd seems to be reflected in the fact that Angular apps actually do look very much like a Java Enterprise client in their basic structure. The frontend of this project even has a client-side message bus (no joke).

It’s fascinating to look into code that already was in active use and now needs updates, upgrades and extensions for different business requirements. It’s also interesting to observe how much the enterprise devs are caught up in normalizing every single bit in the entire stack, bloating the code repo to hundreds of directories, models and database attributes.

All of this undocumented, of course. 😑

There is no two ways about it: As soon as I have wrangled this thing to the ground I’m dumping and reloading entire JSON literals into the DB for every new type I add. No way in hell am I going to normalize every single attribute like some early 90ies mainframe dev with an SQL fetisch. The DB already has 80+ tables, at least 40 of which appear to be total overkill and bound into relational trails that are way to long, cumbersome, bloated and completely unnecessary.

That’s what happens when you let 90ies academics design a database, I guess. 😎

Oh, and btw., if you’re planning to start a fresh Angular project, please, for the love of all that’s true and dear, use the new stuff. You’ll be doing yourself a favor.


Beitrag veröffentlicht

in

,

von