Vue.js, My JavaScript framework of choice

in blog •  2 months ago

Let me start off by saying I love Vue. React and Angular are great, but Vue is beautiful, understandable, elegant, powerful, and easy to learn. This blog is not a knock on other javascript frameworks, this is just a blog on why Vue is my javascript framework of choice.

Why JavaScript?

Realizing that javascript front-end frameworks are where the world of web development is going, I decided to start transitioning away from php based frameworks and moving to javascript. At the time, Angular 1.x.x was all the craze and many people were starting to use React. Food for thought Steemit.com is built with React. I had heard of Vue from a co-worker of mine. After doing some research in my local job market I had my frameworks I was going to work on. Angular 2, React, Angular 1.x. I was not going to learn Vue as there were no jobs in my area looking for Vue developers.

What Makes Vue Great?

Vue is great because it's a combination between React and Angular 2+. It's modular like React, but has the ability to include everything like Angular 2+. Vue was created by one of the original developers of Angular 1 and didn't like the approach of Angular 2. For me Vue is great, their documentation is awesome. Like React you can use outside modules to integrate into Vue, and they actually make the recommendations for you within their docs. What has really turned me on to Vue was the child framework Nuxtjs which is universal Vue Apps. "What is a Universal Vue App" you ask? If you go to an Angular, React, or base Vue web app and view source, more than likely you'll see very little HTML, you might see an element that says "Loading" or something, but you wont see the code that's actually displaying what you're seeing in your browser. This is because with most javascript frameworks, content is loaded after all of the javascript loads. This is bad for Search Engine Optimization and the search engine want to see your content when the page loads. What the Universal Vue App does is renders the HTML for your Vue page so you're making the search engines happier. And the Nuxt CLI, makes it even more powerful because you can create routes (internal page links) with ZERO... That's right... ZERO additional coding. It's done "automagically". On top of all that, Vue combined with VuetifyJS, a material design component framework, makes developing apps ridiculously fast, easy, and fun.

Developing for Vue couldn't be more simpler, you use standard HTML5, incorporating handlebars or HTML attributes to retrieve your dynamic data. You can include filters, pipes, all sorts of data mutaters. You can control at what part of the component lifecycle code is executed in fine detail. I mean there's not much I can;t say about this framework. The beauty is, if you learn Vue, you don't have to learn too much more to learn React and Angular 2.x. It's an easy transition to one of those other frameworks. Never seen a Vue site before? Check out DLive which is also associated with Steemit on the blockchain. This site is built using Vue and it works and functions great.

Why Not Angular 2+?

Angular 2 was just being released so I decided to start learning that. My thinking was, get a jump on this new framework and I can be one of the first experts using it. What I really liked about it, is the framework included everything you needed start to finish, no extra module were required to build an app. It includes a router, and HTTP processor and everything, the down side to this, is if you're not using those built in module, the code is still there making your app bulky. After building a few apps for fun over the course of about a month, there were so many revisions to the core that the first app's coding was vastly different to the second app's coding, and both apps were pretty much doing the same thing. The first stable release of Angular 2 was September 14, 2016. Shortly following that, Angular 4 was released March 23, 2017. Just 6 short months after Angular 2's initial release, and guess what... Major coding overhaul. November 5, 2017, Angular 5 was released... only 8 months later. May 4, 2018 Angular 6 was released. So for me this kind of instability is unacceptable in a framework. I don't want to develop an app and its core has drastically changed every few months. I understand incremental updates such as Angular 2.1.2 but going from Angular 2 to angular 6 in a matter of about 18 months is a little too much for my taste. I'm not going to spend my time learning something just for everything to change after im finally comfortable with it.

What About React?

React seemed to be the framework where all of the jobs were looking at. React is great, unlike Angular 2+ which had everything included, React is modular which means include only the modules you need and keep your app lean. This is great, for someone who's been in the framework for a while and knows all the different modules that can be integrated. But, to that point, if you want to integrate React into an already existing page, you can and it's fairly easy, you can't do that with Angular 2+. So I started spending more time learning React my problem was, at the time, there was not enough documentation to say, "If you want to accomplish this, use this module, here's how it integrate with React". I was getting , "you should use this module, no use this module" and I would look at those modules, add them in read the integration documentation and get it working... yay. Here's the issue with this approach. I'm very forgetful, and it always reminds me of that scene in the "40 Year Old Virgin" where Steve Carell's character is in this sex information class for these teenagers and is asking questions to the group leader and he asks, "Is it true if you don't use it, you lose it?", well in the coding world this is very much the case. So for everything you want to do outside of core React stuff, you have to learn the different module and how it integrates with React.

Conclusion

Vue is an easier framework with better, more understandable documentation in my opinion. You can build full apps or add modules to already existing HTML code which makes Vue highly scalable. Unfortunately, in today's job market there is no demand, but I believe that's due to no major web entity adopting it as their main javascript framework like Alibaba did with React. But if you're looking at getting into these javascript frameworks, Vue is a great place to start because the way you build apps is not too much different than the way you would build apps in React and Angular.

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!