How to choose your development framework and libraries?
There are so many development frameworks in the market and we often get lost about how to choose the right one. There are three main dimensions to consider when evaluating any framework:
- The framework & libraries: what pros and cons do I get from the framework or library of choice?
- The team: how convenient is the framework for my existing and future team?
- The backbone: how reliable, available, and supporting are the creators of the framework?
These three dimensions are very important in choosing the right development framework for long-term success. These are optimal considerations and yet do not guarantee success in the future. For guaranteed success, you should choose the most suitable framework and yet always have a plan B.
The Framework
A core factor when choosing the development framework is its capabilities We For this section will look into completeness, performance, and extendibility of the framework.
Completeness
Frameworks come with a set of built-in features and the rest is left for community or your team to develop. When questioning completeness, we are looking to answer whether the framework gives us complete functionality to fulfill our requirements or we will need to develop extra features for solving common problems. Depending on the complexity of your app, we can choose to have a complete framework or a framework that eases extending the existing functionality.
Performance
In complex applications, we are interested in analyzing how the application performs and runs. Performance analysis is composed of two jobs:
- The frameworks and libraries used.
- The app you build using the framework.
When we evaluate the performance of the libraries and frameworks, we should consider their size, how they are loaded, run-time performance, and what optimization libraries are used. You should check the following before choosing the framework/library:
- Does the framework/library optimize runtime compilation of dependencies? for example, does it load static assets in advance or during runtime?
- Does the framework/library have unused dependencies or code?
- When is the code loaded? Is code that is not used in some pages of your app is still loaded?
- Improve the first load experience of your app by using server-side rendering (My previous article: https://medium.com/swlh/spa-mpa-or-a-hybrid-42fdf6b3415c has a deeper discussion on this)
When making a choice between frameworks, you will have to consider the nature of your application. For example, in consumer apps, it is critical that the consumer gets the first content of the app faster than enterprise apps.
Extendibility
It is common to start building a web application and then decide to extend it to mobile or desktop apps. If this is your plan, it is critical to consider from the start whether the framework allows you to extend your channels in the future. A bad framework choice would lead to tripling the efforts for each channel’s development separately or to re-build your app from scratch to fit extending your channels.
The Team
If you are planning to expand your development team, it is essential to consider choosing a framework that would make your life easy. The below are some aspects to analyze when choosing a framework:
Ease-of-Use & Learning Curve
It is important to evaluate how easy-to-use and easy-to-learn a framework is. Most frameworks have a Getting Started tutorial, which can give you an idea of how easy it is to start using the framework. Your goal is to choose the most suitable framework with minimal investment in the getting started and the development experience as your app gets more complex. This is very important as developers might jump into your projects and a complex experience would be costly. In addition, considering the developer skills needed to start working on the framework is important for easily expanding your team. Is the framework built in an existing or an easy-to-learn language? This gives you a higher chance of finding good resources for your projects. To summarize, here are some considerations before choosing a framework:
- How complex are the Getting Started tutorials
- Clarity of the APIs
- Documentation
- The architecture of the framework
- Data-management
Available Tools
When choosing a framework, we want to make sure that it offers a complete set of tools to speed up the development. For example: ask the following questions:
- Does the framework come with built-in templating languages?
- Are there IDE and code editors include support, plugins, and community extensions as built-in features for the developers?
- Are there tools to scaffold new apps, features, or services with all dependencies and project structure?
- Are there automated tools for managing apps and running a local server for development and debugging?
- Are there tools to easily build unit, functional, or integration tests? Does the framework come with a test suite?
- Is it easy to bundle your code for deployment using pre-built tools?
The Backbone
Having chosen a framework with excellent capabilities and fast learning curve that makes your team very comfortable, does not guarantee the long-term success of your app. Frameworks are developed, maintained, and supported by others. We should be very careful that if others fall or decide to change the direction of their business, we might also fall with them! We might waste a lot of time recovering and doing work that was handled by others. Therefore, we should choose a framework that has a strong backbone that is less likely to break.
Maturity (History, Popularity, and Community)
We use frameworks to save time and boost productivity. However, immature frameworks can bring your productivity and time down by having your developers fix incompleteness, bugs, incompatible upgrades, or the framework direction can change. We can infer the maturity of a framework from multiple factors, such as:
- History: why and when the framework was created? History gives a picture of how the library started and how it will continue in the future.
- Popularity: A popular framework that is used in real-life production applications is an indicator that the library has successfully met the needs of other organizations.
- Community & Ecosystem: it is possible to have a popular framework with a small community or a shrinking ecosystem of plugins and libraries that extend core functionality. This can indicate that the framework is not seeing much innovation or development.
Some activities you can do for evaluating the maturity, popularity, and community of a framework such as:
- Stackshare: https://stackshare.io/
- Libscore: http://libscore.com/
- npm downloads: http://www.npmtrends.com/. This is an example of comparing react vs angular downloads in the past month.
- GitHub stars
- StackOverflow tagged questions
- Check open job positions
- If APIs are available, you can check the “not implemented yet” functions to get an idea of the future plans of the framework.
- Check the existing bugs database: https://github.com/vuejs/vue/issues
Core Team Size
The core team size is an indicator that the team would be available for supporting and helping the community. Not every framework publishes information about the team. For example, Vuejs has a team page and they have a small team size as opposed to angular or react. Check it out: https://vuejs.org/v2/guide/team.html
Support
When your app is in production, you want it to be stable in the long run. This is a major reason to ensure that the libraries and frameworks that you use have LTS (Long-Term Support). For example, a framework that would change its APIs can break your app. Therefore, when you rely on a large framework or library, you are less risking your app to break and saving your resources from developing that functionality. Another example is that the framework should be able to support fixing security vulnerabilities if reported.
Corporate Support
Some frameworks have corporate support by their parent companies or separate affiliates. It is important to know if the framework is sponsored or supported by other parties. With no corporate support, if the library is abandoned by its creators, you will be left with no internal maintenance, migrations, or updates. You will have to do this yourself! This still does not guarantee you that the main supporters will not abandon their frameworks as well. For example, Google & Facebook have decided to abandon some of their projects.
Enterprise Licensing
Last but not least, considering the license under which the framework is maintained is also a critical point. Enterprises leveraging open source for their products should do be careful to use software with licenses that do not violate source distribution. An example of a license is the MIT License, which can be used within any proprietary software you create.
To Summarize
There are tons of frameworks and libraries out there and we often get very confused about which one to choose. A bad selection of the development frameworks can put you into the risk of losing your resources and exerting a lot of effort to fix your initial choice! It is very critical to spend enough time to evaluate options to make the right choice.
A really well written article. I think it pretty much covers everything about choosing the frameworks or libraries in general.
I think community support, development flexibility, our requirement and the intention of the framework will have a vital role when we selecting a new framework. It should be checked the team, future everything, but the four have more importance.. Four to five years back, react native was started its initial version with less community support, it was not that much easy to accept the framework as a newbie.. But intentionally, it was built for web developers. Now industry is already adopted the framework with good community support.. When it comes to flutter, the flexibility made it to the top. It also started with Comparatively less community support and with a good intention to place a single code base to all the platforms. Good to hear that industry is adopting this too.. As you said, our requirements should be in matter.. If we are planning to build a gaming or 3D application flutter will not be a choice..