Hacker News new | ask | show | jobs
by throwawaysbdi 3389 days ago
Angular feels like Google's GWT (Google Web Toolkit) re imagined in JavaScript.

It's not bad by any means but the layer of abstraction is too thick for my taste. Like GWT or Rails, Angular makes easy stuff trivial but you start chafing against the framework if you're doing things angular was not designed to do.

TLDR: It's going to suck working on ng2 apps 15 years from now.

I'm weary of building things in it because, IMO, the biggest downside of all encompassing frameworks that gives you lots of abstraction is that they age really badly.

I've been burned over the years by a bunch of these. What you run into is applications that can't be gracefully updated. When you're entire app is tied to a jumbo framework and it gets outdated or abandoned you pretty much have to throw the app away and start over.

In the big corporate environments that angular seems aimed at you can count on applications hanging around for 15-20 years. I would much rather maintain something modular that I can slowly swap out as needed than a monolith. Something built with a react clone and 5-10 standalone libraries is going to be a lot easier to update than a 20 year old version of angular some day

1 comments

Can you give an example of something that won't "suck" to work on 15 years from now?

Every legacy product I've stepped into sucks to work on, that's why people are often hating legacy code refactoring.

Everything old sucks, but there's fixable and unfixable suckage.

IMO stuff like old PHP sites are fixable suckage. Usually minimal layers of abstraction and no crazy hooks affecting the vanilla behavior of the browser and HTTP. If they used libraries, it's usually for small stuff and they can be replaced without rewriting swaths of code. I can generally add new widgets to existing pages without fucking with what's there.

Webforms is a good example of unfixable suckage. The abstraction away from how the page and HTTP works is so thick that it's impossible to refactor slowly. Like angular, webforms takes over the page lifecycle. Client side code and MVC patterns just don't work nicely with it. I can't add anything to webforms pages outside of webforms because all these page reloads happen at unpredictable times and I can't stop them without breaking everything.

Every time I work on a webforms site with user complaints the most reasonable solution is to scrap it and start over. At least with other old shit that doesn't try to reinvent the wheel I can cordon off the really bad stuff and refactor

I think that a lot of the 'unfixable suckage' comes to exist by people not wanting to rewrite boilerplate code to achieve a seemingly simple task, so they import someone else's boilerplate (angular) and use it to achieve their ends quickly. The fact that multiple boilerplates don't all work well or that one doesn't work in every case is hardly surprising.

I'd be curious if the time tradeoff in the "Rewrite the whole goddamn app" bucket is smaller than the one in the "Churn out boilerplate code and maintain it yourself" bucket.