8 min read
A world beyond frameworks?We are moving towards a framework-centric mindset
During my professional career, I’ve had the opportunity to work in mobile, frontend, and backend. And I've always seen a common pattern: nothing is permanent. I’ve lived the rise and fall of programming languages, frameworks, cloud paradigms, and code editors.
Additionally, in the last five years, I've observed a transformation in the industry; it's becoming framework-centric. Companies are hiring based on your knowledge of frameworks and libraries. Every job offer is quoted as an Angular developer or React developer with Nextjs.
Before continuing, I want to clarify what I mean by framework:
"It provides a standard way to build and deploy applications and is a universal, reusable software environment that provides particular functionality as part of a larger software platform to facilitate the development of software applications, products and solutions" - Wikipedia
and by library:
"A collection of implementations of behavior, written in terms of a language, that has a well-defined interface by which the behavior is invoked" - Wikipedia
This situation made me think a lot, and I ended up with three questions:
- Do we need frameworks?
- Is a framework safe in the long run?
- Is it possible to transfer knowledge between frameworks?
I've been researching and trying to solve these three questions for a long time, and before you continue reading, I must admit that a yes/no answer is complicated. Technology evolves quickly, and every other week something disrupted appears. So, I’d like to present my findings and make you think a bit.
Do we need frameworks?
Frameworks and libraries appear for a reason; either they try to fill a gap or simplify an existing process. And this is very important because, over time, the underlying technology evolves and those tools can become obsolete.
“But I don’t think that’s the real issue here. A well built, performant website can be created with any framework or type of technology in existence. It may be harder with some than others, but it can be done.” - Putting devs before users: how frameworks destroyed web performance. CM30
I want to analyze a few examples of libraries and tools that appeared to fill those gaps, but nowadays, they’re part of the standards.
|Lack||Community alternative||Standard (first draft)|
|CSS Grid||Bootstrap - 2011||CSS Grid - 2015|
|CSS Variables||SASS - 2006||CSS Custom Properties - 2012|
|Private fields||Typescript - 2012||Private fields - 2017|
|.at()||Lodash 1.0.0 - 2013||.at() method on all the built-in indexables - 2020|
There are many examples like the previous ones. I’ve just picked some to illustrate that over time when the ideas are proven valid and widely used. They eventually become part of the standards. And having this in mind is extremely important because not all the ideas become part of the standard and the ones that do end up replacing the source.
What can we do?
There’s no easy solution for this. Sometimes a framework or library could be beneficial when the time to market is crucial. But keeping an eye on the standard's evolution could be helpful to understand when something has become part of them, and there’s no longer a need for a third-party solution. Some interesting resources are:
- Web Hypertext Application Technology Working Group
- CSS Working Group
- Making the Web Accessible
You can go to this website to check when a browser supports a feature.
Is a framework safe in the long run?
Developers building side projects and potential startups need to be wise in time and resource management. So, when starting a new product, you usually need speed, and frameworks can provide that in the early stages, especially when you aren’t sure about the direction of your project. But not all the projects out there meet these criteria; large corporations, the baking industry, and especially the government have other requirements. They're usually looking to build a long-term scalable system while minimizing maintainability (updates, breaking changes, etc.)
“Some may argue that Single Page Apps “feel more modern.” We feel that a modern web application is designed based on user needs, highly accessible, and easy to maintain — whether or not it’s a Single Page App.” - Why simplicity? Choosing a web architecture. Kendrick Daniel, Eleni Chappen, Alex Soble, Andrew Dunkman
“Frameworks go out of business and new frameworks appear. You have to learn the new frameworks again. It takes a lot of effort, energy and resources. You just spent all that time earlier learning the old framework and now it's out of business. All the skills you accumulated are now useless.” - Frameworks don't make any sense. Peter
The purpose of this comparison is to see the evolution of interest over time. I’m trying to illustrate that there are trendings and 10-year-ish cycles. This data doesn’t reflect the usage; we should look at other resources like npm downloads, GitHub starts, and open PRs on a project to see the maintainability and usage over time.
Having said that, I’m going to look at some data extracted from Google Trends and start with frameworks from 2000 to 2011. I’ve just taken a few examples of famous ones at that time; other well-known frameworks were Backbone.js and Knockout.js.
I’m adding Angular 2+ here because, in 2016, Google designed Angular as a ground-up rewrite of AngularJS.
From this chart, we can infer that when a new framework is strong enough to get interested, others lose it over time. That happened when Angular.js appeared, Ext JS declined, and again when Angular replaced Angular.js.
In this second one, I’ve included JQuery and modern frameworks.
Again, we can identify the same pattern here; in the short run, once React gained popularity, Angular declined. That’s precisely the same thing that happened with Ext JS vs. Angular.js and Angular vs. Angular.js. At some point, a framework seems to replace in popularity a previous one.
With JQuery, the cycle was a bit longer but is declining in favor of the modern frameworks, and that could happen again. Is React a short-term trend or a long one?
What can we do?
Reaching this point, it seems clear that no existing frameworks can guarantee their existence forever. Also, depending on the project you’re working on, the needs could be slightly different. So you might need to learn a few frameworks during your career.
- Be open-minded and willing to learn something new
- Be up to date with the new trends and the evolution of frameworks:
- Listen to podcasts (like Syntax.fm, Chats with Kent C. Dodds)
- Attending meetups and conferences (check conferences or use meetup)
- Follow people and blogs on social media (like Smash Magazine, CSS Tricks)
- Be aware of the latest surveys (like State of JS, State of CSS, StackOverflow Developer Survey)
- Look for job offers to understand what companies are looking for
Is it possible to transfer knowledge between frameworks?
As I said before, nowadays, the industry is hiring based on your framework knowledge. Sometimes they even value your skills using specific libraries (tables, HTTP requests, state management).
“These coders might know how to create a React App or an Angular App but no idea how to fix the other persons code.” - Top 10 Reasons we should stop using frameworks. John Coonrod
“Technology come and go, but it has a lot in common. Set priorities right. Invest 80% of your learning time in fundamentals. Leave 20% for frameworks, libraries and tools.” - STOP LEARNING FRAMEWORKS. Eduards Sizovs
Exploring transfer knowledge
I’d like to give you a real example of what I meant by learning the fundamentals, exploring the relationship between Angular and React concepts:
|Class Component||Functional components||Object Oriented programming and Functional programming paradigms|
|Component and Services||Components and hooks||MVC, MVP, MVVM|
|Rxjs, Akita, NGRX||useReducer, Redux, Mobx, Recoil||Observer pattern, Reactive programming and Flux|
|HttpClient||Fetch, Axios, React Query||Event Loop, Concurrency, Rest APIs|
|AgGrid||Ag Grid, React table||Adapter Pattern, Delegation Pattern|
Wait! Retake a look; if you understand the underlying concepts and ideas behind something, you’ll find those basic concepts applied everywhere.
Some concepts will stay there forever, surpassing trendy frameworks or programming language.
What can we do?
This conversation from Robert C. Martin (aka Uncle Bob) and Allen Holub explore ideas of how to be a better programmer and it is worth watching it as a starting point:
Additionally, you could:
- Explore SOLID principles
- Learn design patterns
- Study the different ways od rendering on the Web
While during this research, I noticed how important it is to have solid fundamentals and basic knowledge. Cultivating that expertise pays dividends.
I’ve been doing that for years, but until I put all these ideas together, I wasn’t aware of how important it is to understand the basics and the underlying technology and patterns.
I’m far from being an expert on these topics, and I will continue learning and adding more knowledge that could help me understand the new frameworks and libraries that are yet to come.
But let me recap what we can do to try to be safe when the current frameworks and libraries would replace with new ones:
- Follow standards evolution
- Be up to date with recent trends
- Be willing to learn new stuff
- Learn patterns and algorithms