5
owithg
6y

Hi all my webdev friends! Question for you, tried google, got propaganda.

Why do front end devs use frameworks like angular or react? I was looking into it, and it looks like html/JavaScript can handle it all. Wouldn't removing them save load time and data overhead? Does it really boost productivity that much?

As a backend dev, it is completely possible I missed something haha.

Comments
  • 3
    I am also doing mostly backend and have recently moved into frontend more for Personal projects and i think Yes these frameworks are there for a reason alot of devs think there are a Billion js frameworks when there really are only 3 big ones, vue react and angular and it really does not mather which you choose. All these frameworks have a key concept built into them, components. Js on its own does not have components inbuilt, components are what makes you productiv since you can reuse and encapsulate so much of your code, and make it easy to deal with things js is bad at like, state managment, ui bindings.... For small projects you should not use a framework or just render a view with something like laravel blade but for Medium to large-header projects it is worth it, even if its just for maintainability. Since you mentiont the size of some frameworks, this is not as much of a Problem as you might think thanks to cdns and Browser caching..
  • 1
    DRY; Do Not Repeat yourself as above comment explained. Using framework give you plugins like components which you can easily reuse for all your projects/clients.

    jQuery is a library where the frameworks are well... framework. Let's say if you are writing a single page web app, using jQuery you either have to write lots of things on your own or use lots of other jQuery libraries. Framework already have basic features covered.

    There are already lots of discussion on Reddit and quora regarding this topic. Like the following
    https://quora.com/What-is-the-diffe...
  • 3
    90% of the webdevs use frameworks for no reason. They simply suck at their job, and stuck in a timebubble from 2009.

    The other 10% use them if it suits their needs, for example you want to build a big webapplication which can be broken down into smaller pieces. Instead of reinventing components databindings and templating, you would use something like react or vue. If you have a more complex scenario where a lot of statechange and bussinesslogic happens you would use angular. But if your applications is too specific and performance oriented you would write custom code for example when doing games.

    Hope this has given you some insight
  • 1
    Thank you three for answering, it helped me understand a bit more :)

    @Hammster that is sort of what I thought, thanks! :)

    @CurseMeSlowly my concern is that I am getting 1000 things extra, when I only need 1 or 2 things...

    @FetzenNET I get what you are saying, but I have a bit of a problem saying it can be cached... What if the user doesn't want to cache? Should we insist or write smaller code?
  • 2
    @owithg then go with vanilla 😁 my friend.
Add Comment