DEV Community

Lisa Armstrong
Lisa Armstrong

Posted on

VueJS: The Golidilocks of JS Frameworks?

There's a number of Javascript frameworks out there and like many developers I recently had to figure out which one worked best for me and my client's needs.

Frameworks, NPM, MVS, Typescript, ES6, JQuery is so passe! A lot has changed over the last couple of years and that's a good thing. But, which tool to use?

Most of my work is web applications, CRUD projects using look ups, responding to input and showing data in tables that can be searched and exported. I use LAMP on the server and the standard HTML, CSS and JavaScript for front end.

My plan was to use the framework on a project, learning curves are ok, but delivering results is vital!

So, I entered the Javascript house of the 3 frameworks and had a look around.

REACT

At first I looked at React. It seems all the cool kids where using it, so there must be something to it. At the very least it's a good skill set to have.

However, there is a real learning curve with React. It also seems very component focused where HTML, CSS and code is stored in the same file.

I know, I know, that's the point of it. I also know that sooner or later there will be changes and it's much easier to send a designer into an HTML file than a JavaScript code block.

Sorry React, too hot.

ANGULAR

I had used AngularJS in another project and liked it. It was as advertised, an improved JavaScript. You could plunk it into any HTML file and go. Through the magic of data binding and vanilla JavaScript, I could make that DOM sing!

Alas, AngularJS's days are numbered. No more new releases, support ends in 2021. The message is clear, this is a dead-end for future development.

Angular 2 is an option, more robust than JS. I tried it, but it felt a lot like React with its complexity. I know they're not the same, this is a generalization, but it was still a major shift in a direction I didn't want to go.

Angular was too cold.

VUE

Vue was the new kid on the block and was inspired by AngularJS -- ok, that got my attention! So, I got out my coding spoon and had a taste.

What I like about Vue is it's easy to use for small things. Populating a drop-down box with a data feed? No problem. Need a data table? Piece of cake. Adding search capabilities to that table? Filters are your friends. All of the rendered code is easily readable in good old fashioned HTML. The JavaScript is tucked away in another file and not difficult to follow.

I found my work with AngularJS helped a lot with learning Vue, since many concepts are the same. I also found Vue isn't as component oriented as React and Angular. That made working in Vue more of a step up from JavaScript or jQuery. By taking a step -- not a leap -- I was able to get my hands around it quickly and really make it work!

Vue does use components which is great for the DRY (Do not Repeat Yourself) principle. It makes sense to build one component for code used in multiple screens. When writing HTML for your Vue component, you can keep it in the script file, or you can separate it out into another file. It's your choice -- and I like that.

Because Vue is small and easy to insert anywhere, it's a good choice for upgrading existing projects gradually. For example, an older app using jQuery can handle Vue coding. It's easy to insert it, you don't have to refactor everything, but you will see improvements because of Vue's data binding etc. That's an easy sell to a client as opposed to a full re-write.

So, Vue is great now, but will it be here in 5 years or in the digital dustbin with AngularJS? There's no way of knowing for sure. Right now, it's growing in popularity but things change. However, because most of the code is in JavaScript (in theory), you should be able to move your Vue algorithms to another platform if needed.

To Sum Up

  • Vue's learning curve is fairly flat.
    If you're comfortable with JavaScript, it's the next step up. It also has good documentation and support.

  • Vue is flexible.
    Whether you're adding a little functionality or creating a large project, Vue is designed to handle it.

  • Vue has a future, and if it doesn't, you still have your code.

Vue is just right.

CONCLUSION

The opinions stated above are just that -- opinions -- based on my experience and point of view. I approached each framework with an open mind and still have that openness to them. Dogma be damned, I just want something I can use that will do the job. Right now, Vue 'sparks joy' for me. If you're looking for a framework, have a look at it and see what it does for you.

Top comments (8)

Collapse
 
michaelbrooks profile image
Michael Brooks

Nice writeup and I definitely agree. I've used and still use React, but Vue was a lot easier to get started with, and it can do a lot of complicated things without getting too awry.

Also, I believe Vue is here to stay due to Laravel supporting the JS framework heavily. Laravel is a huge PHP framework which has been around for a while now and they bundle Vue by default.

Collapse
 
chrisrhymes profile image
C.S. Rhymes

I really like vue single file components where you can put the template, script and styles in one file. It just seems like a really nice way to make a reusable component. I also really like the way you can use components inside components, you just need to think about handling the state.

Collapse
 
anwar_nairi profile image
Anwar

You will love Vuex. It just feels so right. No more, no less, just what you needs. The Flux design pattern is a bit tricky to catch, but it solves so many problems you (will?) have with SPAs.

Collapse
 
terkwood profile image
Felix Terkhorn

This article was my first exposure to Vue. Well-written. Thanks!

Collapse
 
andrewbrown profile image
Andrew Brown 🇨🇦

I find it sad I never see MithrilJS in a javascript-framework lineup.

Collapse
 
thecodingstoic profile image
theCodingStoic

Interesting. I wonder if the name was inspired by The Hobbit/LOTR

Collapse
 
andrewbrown profile image
Andrew Brown 🇨🇦

Yes, I believe it was

Thread Thread
 
thecodingstoic profile image
theCodingStoic

Which makes it even cooler, imo.