DEV Community

Discussion on: When Should You Use A Web Framework?

Collapse
 
buphmin profile image
buphmin

Whether or not to use a framework more often than not comes with insight from experience.

For frontend frameworks (Vue, react, etc) I think using them helps when you have complicated business logic and dom manipulation rules. For instance if you have a rule saying if the X = 1 and Y = 3 or Y = 5 and the user does this then show this one widget then frameworks can help make building that out and maintainable much easier. Additional if you have a lot of reusable widgets the components you can make with a framework can save you time. However, there is a price to pay as always. There is more code to ship, and more knowledge someone needs to know to even start coding. Generally speaking the less business logic you have the useful a frontend framework is imo. I have never run into issues with performance with Vue, but using a framework does have overhead and should be considered. Most of the time good UX will prevent the overhead of the framework from being an issue.

For backend frameworks are a bit of a different beast. The backend overall is a lot more complicated and performance is an even larger issue. Here frameworks do two main things: save you time, and structure your code. Some frameworks achieve both, but at the cost of performance usually. I think a backend framework should be used when maintainability and time are the largest concerns. Having a consistent code structure can go a long way in sizable projects.

Hopefully that helps :)