We have been catching up regarding frameworks which are available out there in the market, and a question came up: How do our developers choose from immersed in that huge variety? To clear out our doubts, we interviewed Juan Manuel Álvarez Giménez, Pablo Hiyano and Maximiliamo Céspedes. This is the outcome!
What are frameworks and libraries? (For those lagging behind)
A library is a group a tools that attack a specific problem, a framework, conversely, is a group of tools or libraries which attack an issue of bigger dimensions. Both are outer layers to a language that allow us to work in a more comfortable way with a friendlier language and more accessible tools.
Let us see an example:
React is a UI library, while Angular is a framework. What is the difference?
- React does not have any tool, no command, nothing to manage a server query. You have to do it yourself, you have to use a library that is specifically for that.
- Angular has tools that allow us to manage those server queries. With frameworks you have far more tools, it is a bigger spectrum that works to solve problems. Not always does someone use all the solutions provided.
Pablo – All frameworks have certain domains that attack –if you want to make a web page, you will probably have to worry about managing the path, because of making queries to a server or managing animations for example – the framework has all those domains which are already known for providing a comprehensive solution such as Angular, or making specific libraries just like libraries oriented to components such as React.
We then understood that frameworks cut down working time, and consequently, margins of error. They also feature other benefits such as previous testing by other users, which have already found and reported old errors. They normally take into account many more cases of usage than the ones a developer could project.
Now, how can we choose the best framework?
Maxi – With a framework or library, there is a promise of something new, a paradigm, a way of working that makes a developer happier. The technological tendencies also rule. It is difficult to know what makes a framework more successful than others. You may have two frameworks that might solve the same problem, but you will always end up deciding based on your project: its time, mantainability and extensibility. That is to say, frameworks are always compared in relation to a project or a specific problem you have to overcome.
Pablo – Very often, with frameworks or libraries, you see who implements them. If I tell you it is the library used by Facebook, that has a backup.
So, what criteria or factors do you have to bear in mind?
- If the code is free, check whether it is available to be investigated. How many bugs there are, how many people are working on that. Why is it important to ask ourselves all these questions? Because if the framework is open source, and there are few bugs or all of them fixed, and lots of people working on it; that may make it attractive for programmers and may solve lots of issues very common to all of us. Many of those data are visible on platforms such as GitHub.
- The community support is very important when hiring people to keep up a project. If a developer leaves a project, and there is a big community of programmers, it is easier to find new members.
- Suggestions on Twitter may help as reference such as Jake Archibald (@jaffathecake), Eric Elliot (@_ericelliott) or Dan Abramov (@dan_abramov). They usually write articles on magazines such as Frontend, or on their blogs. Big companies are also reference, positively or negatively. That was the case of Ruby on Rails, when Twitter said it dropped out because Ruby was slow, and then they had to clarify: “do not take us wrong, Ruby is an excellent language but we are processing a billion tweets a second and this language cannot simply handle this”. An average application is far from a mere 5% of what Tweeter is about and Ruby is not slow for an average application by any means, although people are starting to give it up just because of bad publicity.
- The answer and the support: Can I call you at 2am and say “this is not working” or “I do not know how to go about this”, and will you help me out? Do you have good documentation? Generally, open-source technology have this issues better resolved. It is very likely that you will use a paid framework only for very specific cases. “The most successful case is Linux. You have a helluvan operating system, for free. A huge community. Should an issue come up, in two or three days it’ll be solved” (Pablo Hiyano)
- The technology learning curve: whether the programming paradigm changes or not in a mathematical or conceptual way. “There are people willing to leave their comfort zone and people who are not” (Juan Manuel Álvarez Giménez).
- Speed at programming. “Sometimes you need to lower the abstraction level. When you choose a framework, as you raise the abstraction level and simplify the syntax, you are introducing an intermediary in that work delegation and that takes up resources. Consequently, many times when you need to optimize resources, you have to face the music, remove that framework and work at a lower level. It is definitely going to be harder, but it will yield better results as well.” (Pablo Hiyano). For instance: JQuery is fast but if I want to make it faster, I would leave JQuery and work with JS1.
- The framework size. There are frameworks and libraries which are attached to companies which are among the biggest on the planet as regards data, internet traffic or money: Facebook, Amazon and Google. The decision can be bad but they have all the drive to make tons of changes.
Later on, the conversation went in-depth regarding the biggest fight of the last years: React vs. Angular, but that is a different story we will deal with on our next article. Stay tuned!