4 ms·
IMHO Angular is a bad idea because you're doing rendering in the client side. Maybe your building an HTML5 image editor or something that requires client render
by sanbor 10y ago
IMHO Angular is a bad idea because you're doing rendering in the client side. Maybe your building an HTML5 image editor or something that requires client rendering. But most CRUD apps doesn't really need client side rendering. There is also a hype of SPA (single page apps) which is usually harder to implement than server-rendered apps. It is harder because you have to avoid the browser refreshing the page and keeping the state in the browser AND syncing with the server. If you do server side rendering you don't have to sync client and server with JS.
Many people said that it was ok to render the view using JS in the client, but often they start having performance issues. Not just the performance, but introducing changes in Angular apps wasn't easy for me because there are lots of things going on. I don't have a lot of experience in Angular but the few code that I hacked it was hard to introduce changes because it's hard to follow the flow of changes in the code.
React may be good if you really want to have an SPA and you can afford it. But the complexity introduced by it may not be worth it in many projects where they'd be fine with just HTML/JS/CSS and server rendering.
- Nekorosu 10y agoActually both Angular and React have it's place. I have to say here I absolutely hate Angular but it's a very good tool for Java developers in need of building some simple CRUD admin interface. Familiar concepts/vocabulary help a lot.
- pas 10y agoWhat do you mean doing rendering on the client side? The browser does the rendering anyway. Or do you mean assembling the HTML to be rendered? Single Page Apps are very good. GMail is possible because you don't have to reload the whole page and the images every time you click. It's the "autocomplete" on steroids turned to 11. And it's much easier to implement, because you have state on the client side, and you can implement a simple REST API, which is much easier than maintaining sessions on the backend and implementing a thousand /?q=<method> endpoints. (And can be consumed easily by other clients.) And these frontend frameworks solve the "browser refreshing" thing for you. Introducing changes to Angular 1 apps was a bit hard, yes. But compared to the previous jQuery hell, I think the structure that the evil Angular cult forced on people was worth it. And TypeScript and ES6 modules are finally making those things pleasant.