4 tips for choosing a framework
Tags: beginners
Published: 2022-11-01 14:48:25

### Introduction

When I had the idea to write this article, I came across an important question that I believe is the question of most people directly involved with systems development.

What is the difference between a framework and a library?

To help answer this question, I tried to understand the basic concept behind each of these words and the result can be read below.

:warning: If I have written something that is not consistent with reality, please comment so that I can make the necessary corrections.

---

### Framework

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lspm0ns62dgnjzo9glxi.jpg)

A framework is a set of classes that will serve as a basis for the development of an application, specifying the programming language and which path to follow to solve project problems.

A framework can also be compared to the foundation of a building.

An example of a framework: is NextJS.

---

### Library

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/38aj0xij1o85r05lqq91.jpg)

A library, on the other hand, aims to solve specific problems within an application. It is not part of your project lifecycle and does not need to be written in the same language as your application.

An example library: is ReactJS.

---

### Learning curve

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ybg27p4f7aojf8sz6w6v.jpg)

As important as the framework itself, the learning curve will dictate the project's implementation speed.

Larger teams can significantly reduce the learning curve of frameworks because they can specialize in different aspects, increasing development speed.

In smaller teams, usually (but not the rule) the language selected is the most known among team members. In these cases, the choice ends up being limited to the language version.

**Tip**: _Seek the alignment between your team's experience with the learning curve demanded by the chosen framework. This action guarantees the speed of project development_.

---

### Project

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ekt5katl578rpouwvga2.jpg)

Imagine for a moment that you need to develop an application to control a family's budget. The application will be very simple, with fields to enter values ​​(real numbers), dates and descriptions.

To develop the project in question you quickly study two PHP frameworks well-known in the development community: **Laravel** and **CodeIgniter**.

These two frameworks are very similar, serving MVC architecture very well. There is a great facility for connections to several databases and "up" a Rest API can be considered a very simple task in both frameworks.

Just as a comparison, a new project created with CodeIgniter takes up about 22MB of disk space, while Laravel goes a little over 60MB.

Although CodeIgniter is smaller, there will be a greater effort on the part of the team because many solutions will need to be built from scratch, unlike Laravel.

**Tip**: _Try to estimate how far the project can grow, avoiding replacing the framework in the middle of the development process_.

---

### Language

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kq3m0347ezzjeolwm2ru.jpg)

Using the same example of the familiar budget control application, I mentioned two PHP frameworks but never mentioned if it would be a web, desktop or mobile project.

The choice of language will be based on the need presented by the client.

If the budget control application is for individual use, installed on the desktop for example, one of the most appropriate languages ​​would be C#.

**Tip**: _Choose a familiar language with long-term support (LTS) reducing the risk of technology being abandoned mid-project_.

---

### Hype 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/n22xvncftqveb68kvlck.jpg)

Hype means fashion and being "fashionable" means being up-to-date, and keeping up with everything new.

New technologies appear all the time with different proposals and breaking paradigms. But to evolve they will need adepts and enthusiasts willing to invest time in reporting bugs and suggesting new features.

**Tip**: _Even if new technologies are promising, be careful_. Remember Silverlight?

---

### Conclusion

This article was thought to be a reflection point when choosing a framework or a library.

The people directly involved with the project and the client must make the final decision.

See you soon. :sunglasses: