Web development has gone a long way. I started self-learning web development during my own time back in my Freshmen year of high school, and that was back in 2012 I believe.
Fast forward to today, SPA frameworks are becoming more and more popular. You probably have heard of them before: React.js, Vue.js, etc.
What is SPA? What is a Single Page Application?
An SPA (single page application) is a frontend framework based on the Javascript scripting language. They are webapp(s) that loads a single HTML page and dynamically updates its contents as the visitor to your website interacts with your website's elements.
One of the many benefits that single page applications have, is that it allows the programmer to easily re-use code as components, which support the concept of keeping your code as DRY as possible.
NOTE - DRY means "don't repeat yourself". This concept is based on the fact that you shouldn't have to re-type the same lines of code for repeated functionality. Just make it once, and then include it into your website or program in another location when that functionality is needed again.
However, there are cons associated with a single page application. Some of these include the fact that they are client side rendered, meaning that everything happens in the browser. If you want to rank high on search engines, like Google, you won't appear high up there. There are solutions to this which enables server side rendering, which defeats the performance benefits of a SPA, but there are other benefits that outweigh this con. Single page applications might not be for everyone, but it is definitely a great framework to learn.
Which SPA Should I Learn?
It's almost impossible to get hired as a web developer nowadays without knowing at least one of these single page application frameworks. Lots of new businesses and existing businesses have transitioned to this architecture for their website.
The most popular one out there at the point of creating this post for job-oriented purposes, is React.js. React.js is popular because it is backed and maintained by Facebook.
There are alternatives out there. If you are learning SPAs for the sake of having a higher chance of being hired, go with React.js (unless you really want to work for a specific set of companies, find out which SPAs they use - if any - and learn that instead.)
Me, personally, I decided to go with Vue.js.
Why I Decided To Learn Vue.js Instead Of React.js?
At the time, I consciously knew that React.js will give me a better chance of getting hired. However, I don't like to jump into the bandwagon just because society says it's great. What's great for society, might not great for certain specific needs.
For me, what I wanted to do was the following:
- Quickly learn and use a Single Page Application
- I wanted to redesign and redevelop my website as quickly as possible using a SPA
- I wanted something that is lightweight and has great performance benenfits.
Now, with this in mind, sure, I could've chosen React.js, but what I found out was Vue.js had a lower learning curve, and that it was much more lightweight when compared to React.js. Sure, you can argue that Vue.js is NOT managed by a huge corporation like Facebook, but it was created by someone who once worked at Google. In addition, there are companies out there who started using Vue.js over React.js.
Again, I'm not choosing Vue.js just because it's created by someone who once worked at Google, but rather, for its lightweight performance, and the fact that it has a easier learning curve to it.
I haven't used it for more than a year yet, but all I can say is that it definitely is easier to learn. I will consider creating a more in-depth review of the framework later on as I get more and more familiar with the framework.
Conclusion
So, should you learn SPAs? Yes. Which one should you learn? It depends on your intentions. If you are like me, who wants to quickly get a SPA up and running for a project as well as to get familiar with their environments, go with Vue.js. If you want to be more "hire-able", go with React.js. At the end of the day, they're both similar in the core concept that they are both SPAs. They're similar in many ways, but unique from each other in their own ways.
Let me know in the comments below which one you decided to go with, and why! I let you know, so I believe it's fair that we share our reasons to each other in a educated and professional manner. :) I would love to hear what you have to say.