Consultingwerk Blog

Angular or Vue?

by Radu Nicoara | Oct 02, 2018




Recently, our product manager came to me and asked: Radu, if we could rewrite our web and mobile frontends from scratch and you could forget about all the legacy, would your recommendation be to use Angular again, or do you think Vue.js would be a better option?

 

With so many web development frameworks available out there these days, it is quite common when starting a new project to be overwhelmed by one deceivingly simple question: Which one should I use?

In this article we’ll try to answer that question by having a look at two of the most popular frameworks out there, Angular (versions 2+; we will not be covering Angular.js in this article) and Vue.js.

First, a brief introduction to the two frameworks:

Angular was released in 2016. It is a complete rewrite of Angular.js and aims to solve many issues – mainly performance related – that Angular.js had. Angular is built using TypeScript (a superset of JavaScript) which features static typing, interfaces, classes and so forth. Angular also aims to enable developers to build modular, easily testable and maintainable projects. The framework itself is developed and maintained by a team at Google.

Vue.js was first released in 2014, being developed and maintained by a small team. The Core package is aimed specifically at the application’s view layer and does not offer support for much else, however it allows for integrating other libraries and tools that can accomplish the tasks required by complex single-page applications.

Criteria

Comparing web development frameworks is not a trivial task. There are many aspects that one needs to consider, and there is no one-size-fits-all answer. In this article, we’ll be covering the aspects that were most important to us while developing the SmartComponent Library, both web and mobile versions.

SPA Capabilities

At the risk of sounding biased, I’m going to go ahead and say that Angular is the clear winner here. Its primary focus are single-page applications. It provides routing and forms support straight out of the box. The CLI tool can easily perform optimizations required for fast load times automatically (bundling, Ahead of Time compilation, etc.). Angular is also highly modular by design, making separation of concerns quite easy to implement by leveraging services, components, directives and modules.

While developing complex single-page applications is also possible with Vue.js, it does not offer the same out-of-the-box support that Angular does. To even begin such a project, one needs to first spend time on installing the various packages that will be needed: routing, form validation, state management and so forth. Extra packages need to be installed for build optimizations as well (although there is a CLI tool than can scaffold projects that make use of some of these tools).

Code Maintainability

Another aspect that was important to us was code maintainability. We were looking to write code that could be easily and intuitively structured, was easy to test and that would allow for easy implementation of new features. Both frameworks offer the ability to split code into individual components. While this was a good start, we also required our code to be easily testable, which required even further code separation. We wanted our components to only handle UI logic, while code that handled anything else would have to be separated. Angular provides a great solution for this through the concept of services and its dependency injection system. Simply write a service that handles, for example, fetching and maintaining data from a backend, then inject it into your component via the constructor. This makes unit testing quite easy, as you can test services without having to also render components in a browser. Another aspect that made us favor Angular in this department was that it is built using TypeScript. TypeScript is like JavaScript, but better. It offers static typing, interfaces, classes, the whole shebang. The Angular CLI then takes care of compiling that code into JavaScript. Development is a lot easier if you are not constantly looking for method signatures and return types.

Reusability of Code

Since we are developing and maintaining both web and mobile (using NativeScript) flavors of the SmartComponent Library, code reusability was also a must for us. Reusing Vue.js code between the two is quite difficult because your Vue components cannot include code that touches the UI. This is because NativeScript does not rely on DOM manipulation. With Angular and its platform-agnostic nature, this is not an issue. With the concept of services, one can easily isolate code that performs UI operations within so-called “dumb” components. Dumb components only display data provided by a service, and maybe perform a few UI operations. All other code can be written as services. Since there is no code that touches the UI in services and/or other classes, one can easily reuse this code in a NativeScript app without any further changes.


The Verdict

So, which framework to choose? For us, the answer was a no-brainer, with Angular being the obvious choice to fit our needs because of its modular nature, out-of-the-box support for routing and forms, TypeScript, services and the very useful Angular CLI tool. Two years ago, we believed that it was the right choice for us. Now, having gained a lot of valuable experience with it on our journey, we believe that this is even more true.

However, with web development frameworks there is no single one-size-fits-all answer. You should carefully compare your options based on the criteria that matters to you and choose the framework that best fits your needs.

Vue.js is a great tool for building quick prototypes. It also does an OK job in small SPAs. However, with our tools we are targeting large, complex business applications where scalability is a must, and that’s where Angular really shines. That’s why, for us, it was and is the perfect fit.

56 comments

Leave a comment
  1. roy | Mar 21, 2019
  2. Accountants Haywards Heath | Mar 20, 2019
    Wonderful illustrated information. I thank you about that. No doubt it will be very useful for my future projects. Would like to see some other posts on the same subject!Accountants Haywards Heath
  3. alexa | Mar 19, 2019
  4. nathan | Mar 18, 2019
  5. Accountants Tunbridge Wells | Mar 17, 2019
    This is very useful post for me. This will absolutely going to help me in my project.Accountants Tunbridge Wells
  6. Chicken Recipes | Mar 17, 2019
    There will be Roast Chicken Recipes in the wedding or guest appetite. Many regret that their Cook chicken roast is not so delicious. The delicious chicken roast is possible only if you want.
  7. Accountants Hove | Mar 17, 2019
    I just got to this amazing site not long ago. I was actually captured with the piece of resources you have got here. Big thumbs up for making such wonderful blog page!Accountants Hove
  8. Accountants Hove | Mar 17, 2019
    Great Information sharing .. I am very happy to read this article .. thanks for giving us go through info.Fantastic nice. I appreciate this post.Accountants Hove
  9. Accountants Horley | Mar 16, 2019
    This is also a very good post which I really enjoyed reading. It is not every day that I have the possibility to see something like this..Accountants Horley
  10. hobs | Mar 15, 2019
  11. Benjamin | Mar 15, 2019
    I would like to say that this blog really convinced me to do it! Thanks, very good post. huidtherapie rotterdam
  12. sam | Mar 14, 2019
  13. 918kiss | Mar 13, 2019
    wow... what a great blog, this writter who wrote this article it's realy a great blogger, this article so inspiring me to be a better person918kiss
  14. Accountants Crawley | Mar 13, 2019
    Very good points you wrote here..Great stuff...I think you've made some truly interesting points.Keep up the good work.Accountants Crawley
  15. jonson | Mar 12, 2019
  16. kayla | Mar 11, 2019
  17. nehaa | Mar 11, 2019
    Thanks for this great post, i find it very interesting and very well thought out and put together. I look forward to reading your work in the future.cheapmoversvancouverbc.ca
  18. up board 12th result 2019 | Mar 09, 2019
    After the announcement of the Intermediate exam results students will be able to check them from the official website by providing the necessary details.up board 12th result 2019
  19. darent | Mar 08, 2019
  20. fmovies | Mar 08, 2019
    I really like your take on the issue. I now have a clear idea on what this matter is all about..fmovies
  21. grace | Mar 08, 2019
  22. wps office activation code | Mar 07, 2019
    This is a great inspiring article.I am pretty much pleased with your good work.You put really very helpful information...wps office activation code
  23. genzo | Mar 06, 2019
  24. law essay help | Mar 05, 2019
    I have been searching to find a comfort or effective procedure to complete this process and I think this is the most suitable way to do it effectively.law essay help
  25. nehaa | Mar 04, 2019
    Your work is very good and I appreciate you and hopping for some more informative posts. Thank you for sharing great information to us.location voiture agadir nobti
  26. GLORY | Mar 04, 2019
  27. platformcore | Mar 03, 2019
    Thank you because you have been willing to share information with us. we will always appreciate all you have done here because I know you are very concerned with our.platformcore
  28. obed | Mar 01, 2019
  29. rahat fateh ali khan songs | Feb 27, 2019
    Great Article it its really informative and innovative keep us posted with new updates. its was really valuable. thanks a lot.rahat fateh ali khan songs
  30. Erotische massage | Feb 27, 2019
    Wonderful illustrated information. I thank you about that. No doubt it will be very useful for my future projects. Would like to see some other posts on the same subject!Erotische massage
  31. Warmtepompen | Feb 27, 2019
    A good blog always comes-up with new and exciting information and while reading I have feel that this blog is really have all those quality that qualify a blog to be a one.Warmtepompen
  32. Zonnepanelen | Feb 25, 2019
    I see the greatest contents on your blog and I extremely love reading them.Zonnepanelen
  33. badrun | Feb 25, 2019
  34. Se Tuts | Feb 24, 2019
    Well, you should learn Android Studio Tutorial and Java from Java Tutorial. w3 schools java is also best source for learning Java. You can hire Web Developer to avoid Cloud Computing issues.
  35. فني ستلايت في الكويت | Feb 24, 2019
    Your blog provided us with valuable information to work with. Each & every tips of your post are awesome. Thanks a lot for sharing. Keep blogging,فني ستلايت في الكويت
  36. ZON | Feb 23, 2019
  37. gerung | Feb 22, 2019
  38. seo tools group buy | Feb 21, 2019
    Hi, I log on to your new stuff like every week. Your humoristic style is witty, keep it upseo tools group buy
  39. roky | Feb 20, 2019
    Male enhancement pillsMale enhancement pillsMale enhancement pillsMale enhancement pillsMale enhancement pillsMale enhancement pillsMale enhancement pillsMale enhancement pillsMale enhancement pillsMale enhancement pillsBest Male enhancement pillsBest Male enhancement pillsBest Male enhancement pillsBest Male enhancement pillsBest Male enhancement pillsBest Male enhancement pillsBest Male enhancement pillsBest Male enhancement pillsBest Male enhancement pillsBest Male enhancement pillsBest Male enhancement pillsBest Male enhancement pillsBest Male enhancement pillsBest Male enhancement pillsBest Male enhancement pillsBest Male enhancement pillsNatural Male enhancement pillsNatural Male enhancement pillsNatural Male enhancement pillsNatural Male enhancement pillsNatural Male enhancement pillsNatural Male enhancement pillsNatural Male enhancement pillsNatural Male enhancement pillsNatural Male enhancement pillsNatural Male enhancement pillsNatural Male enhancement pillsNatural Male enhancement pillsNatural Male enhancement pillsNatural Male enhancement pillssexual enhancement pillssexual enhancement pillssexual enhancement pillssexual enhancement pillssexual enhancement pillssexual enhancement pillssexual enhancement pillssexual enhancement pillssexual enhancement pillssexual enhancement pillssexual enhancement pillsMale enhancement pills BestMale enhancement pills BestMale enhancement pills BestMale enhancement pills BestMale enhancement pills BestMale enhancement pills BestMale enhancement pills BestMale enhancement pills BestMale enhancement pills BestMale enhancement pills BestMale enhancement pills BestMale enhancement pills BestMale enhancement pills BestBathmate HydromaxBathmate HydromaxBathmate HydromaxBathmate HydromaxBathmate HydromaxBathmate HydromaxBathmate HydromaxBathmate HydromaxHydromax PumpHydromax PumpHydromax PumpHydromax PumpHydromax PumpHydromax PumpHydromax PumpHydromax PumpBathmateBathmateBathmateBathmateBathmateBathmatebathmatebathmatebathmatebathmatebathmatebathmatebathmatebathmatebathmatePenis EnlargementPenis EnlargementPenis EnlargementPenis EnlargementPenis EnlargementPenis EnlargementPenis EnlargementPenis EnlargementPenis EnlargementPenis Enlargement
  40. buy assignment UK | Feb 19, 2019
    This is very educational content and written well for a change. It's nice to see that some people still understand how to write a quality post!buy assignment UK
  41. James Jasper | Feb 19, 2019
    This is James Jasper from the UK. He is an expert writer in the domain of coursework writing and working for  British Coursework Writing Help UK. All UK students are getting high-grade coursework papers at the lowest price and achieving success. His aim is to satisfy student paper writing requirement and supplies it to them before the deadline. 
  42. Accountants Forest Row | Feb 18, 2019
    Great post i must say and thanks for the information. Education is definitely a sticky subject. However, is still among the leading topics of our time. I appreciate your post and look forward to more.Accountants Forest Row
  43. Steve Dalton | Feb 18, 2019
    I really thank you for the valuable info on this great subject and look forward to more great posts. Thanks a lot for enjoying this UK Essay Writers Wanted beauty article with me. I am appreciating it very much! Looking forward to another great article. 
  44. unique gifts dubai | Feb 16, 2019
    Admiring the time and effort you put into your blog and detailed information you offer!..unique gifts dubai
  45. tobyywarner | Feb 14, 2019
    Great site and a great topic as well I really get amazed to read this. It’s really good. I like viewing web sites which comprehend the price of delivering the excellent useful resource free of charge.how to write a dissertation
  46. group buy seo tools | Feb 12, 2019
    What a really awesome post this is. Truly, one of the best posts I've ever witnessed to see in my whole life. Wow, just keep it up.group buy seo tools
  47. VIP Desert Safari Dubai | Feb 11, 2019
    I would like to thank you for the efforts you have made in writing this article. I am hoping the same best work from you in the future as well. In fact your creative writing abilities has inspired me to start my own Blog Engine blog now. Really the blogging is spreading its wings rapidly. Your write up is a fine example of it.VIP Desert Safari Dubai
  48. professional essay writing services | Feb 08, 2019
    I have to search sites with relevant information on given topic and provide them to teacher our opinion and the article.professional essay writing services
  49. filme online | Feb 07, 2019
    Thank you so much for ding the impressive job here, everyone will surely like your post.filme online
  50. Alison | Feb 06, 2019

    Hello! I enjoy your time and effort you add engrossed.  I really love all the contents you have posted. Please keep on posting.

    chaga pilz tee kaufen

    Leave a comment