DEV Community

Discussion on: Explain the Frontend Webdev Ecosystem to Me

Collapse
 
brihaspati profile image
Brihaspati Bharani • Edited

Here is the problem in front end that I have seen in last 5-6 years, especially in React ecosystem. I am saying this after writing good amount of code in these libraries/frameworks. This is not a biased opinion, but an honest observation.

In my opinion all the front end libraries/frameworks, its all pretty much same in terms of concepts like routing, state management, type safety etc.
Angular 2+ was well written especially for large applications in mind. What Angular did few years ago is what React/Vue is doing in last one year or so.

Type safety: Let's take static typing for example, Everyone wants type safety now(both in React and Vue) which Angular had built in. Again in React, there is Flow/Typescript

State Management: when it comes to state management, React ecosystem is not good to be honest. There is so much discussion around Flux/Redux, thunks, sagas, observables and lot many other middlewares. It's not so intimidating when someone starts to write React code with small components, but then when it starts to grow big, it's very likely that they will feel frustrated. Angular and Vue is much better when it comes to state management, reason being Angular has observables built in and there is only ngrx store to learn. Although there is a fair bit of learning curve in the beginning, once it's crossed, one doesn't need to worry about 10 other libraries/middlewares to make a decision. Vuejs has vuex which is quite simple and easy to work with and its by far the most easy thing to work with in my opinion.

Routing : This is pretty much same except that in React one can do dynamic routing easily. Its not very complicated when it comes to React which is a bit of a relief when compared to everything else.

Functional programming : React tries/trying to move towards functional programming more these days with the advent of hooks etc which angular doesn't by default having components as classes. But except the components, it doesn't stop the developers from writing more functional code for application logic.

Build size : Angular was bad when it comes to build size, but with Angular 8, it should be little better. Vue/React are better when it comes to build size. But when we start adding lot of third party libraries, it adds lot of burden on the developers to go into the minute details of JS and start working on code splitting, tree shaking etc. This definitely makes one a better JS developer, no doubt in that. But at the same time, the time spent in doing that is not worth in all cases.

In my opinion, writing React code is good especially in a smaller projects. But when we need more batteries, things can get very dirty soon. Also there is so much of new apis, new ways of doing things all the time. This definitely needs lot of time investment. Writing Vuejs was the best among three major frameworks to be honest considering its simplicity. But if its moving towards the way of React, I would say it would be bad. Lastly Angular is not all bad. It's definitely suitable for enterprise/large applications when the team working on it is big.

In the end, if we are spending lot of time deciding flux/redux, class/hooks, thunks, sagas, flow/typescript, its definitely eating fair amount of time one could rather invest in writing application logic or adding more features to the product. It's not always necessarily revolve around developer experience, organisations need to benefit.