I'm a huge fan of Vue. I love it's simplicity and how it integrates with standard web technologies (HTML/CSS) instead of baking everything into Javascript.
We are using it to build Webase [1] and couldn't be happier with the technology choice.
I don't know much about JSX internals but to me it feels a lot closer to HTML than Vue templates do. It feels a lot more natural to create multiple elements by mapping a list than it is to use v-for
Not at all. Vue's templating (and angular's) is essentially extended HTML--you're writing HTML _as HTML_, using HTML's native practices (element attributes) to hook into the JS.
I disliked this when I first used Angular, but after adjusting to it I've found that it's highly respectful of HTML's design patterns, the opposite of a hack.
They're not really a hack since javascript does support custom attributes. Jsx is not supported out of the box by javascript and jsx extends the syntax, so what does actually feel more of a hack?
```const element = <h1>Hello, world!</h1>;``` How is this less of a hack compared to vue's attributes?
Same! What I found most surprising is how well it scales. My current project has 45,000 lines of code (well, they are single-file components, so code and markup) and I still find everything super easy to manage.
I originally started my current project in Angular, because that's what I had most experience with. Then some stakeholders asked if I could do it in Vue instead, and I rewrote it in a day. I was surprised at how easy it was.
Ugh what about our 5 yr old project written in angularjs by about 20 different devs - most of whom are no longer on the project - and is still getting new feature requests that get pushed through the development pipeline and no one has any time to figure out how to begin integrating Vue (regardless of the Vue expertise).
Yeah, my project was fairly new. That helps a lot. I could simply drop everything and rewrite from scratch. Templates were easy to translate from Angular to Vue.
But converting a large, old project is always going to be hard. You either need a way to mix two different frameworks, which is going to be messy, or do a complete rewrite, which is a massive amount of work.
Did this recently. We knew we wouldn't be able to rewrite everything, so we are writing new pages in Vue (and porting the old ones slowly). We add them to the angular router with a controller that creates a `new Vue` instance replacing the DOM element.
This let's us start using Vue today and slowly phase out AngularJS.
Dealt with something similar at my old company. If you have the option to go page by page, this may work for you. The original site was in ColdFusion, and we slowly reimplemented it in AngularJS (around 2014.) We used an NGINX whitelist that had all route permutations that needed to go to the AngularJS site send it to that container, and everything else went to the ColdFusion environment. Over time, the major components of the site was converted to Angular and the users were none the wiser (besides noticing that the average load time had decreased by THIRTEEN SECONDS, no I am not kidding.)
The same pattern at my current role has worked while migrating an AngularJS app to Vue.
I had a very similar experience. I got into a flow state while converting the project, which has never happened for me while working with an unfamiliar framework. It clicked in a way that Angular never did.
Does React feel the same way? I know people love it too, but I haven't had an excuse to try it yet.
They're pretty similar. I feel like the best comparison is when you write bad React code you can tell, but there isn't really "bad" Vue code in the same way since it's so malleable. That obviously is both good and bad.
To me React is the preferable framework, it's much more opinionated and finicky but also more clear and thoughtful once you start approaching problems the way it requires. Vue is a lot like React, but it's extremely flexible and beginner-friendly. It doesn't really require a novice developer or someone coming from something very different like Rails or Angular to change how they think beyond the component structure itself.
Two-way data binding seems much nicer and easier when you first come to Vue, but has so many hidden pitfalls and annoyances that one-way completely side-steps.
That being said, I _despise_ DSLs and they should be avoided at all costs. They seem like a waste of brainspace and extremely fragile. It's my single biggest knock against Vue.
JSX is a DSL with the ability to opt out into native JavaScript. So most complex JSX is a composition of JSX with JS driving the logical parts. Does Vue’s templating solution offer the same? (Genuine question, haven’t worked with Vue)
It does. You can do render functions similar to React (and optionally use JSX if you want to). It's not very common though except for library authors (especially if you need to do some clever stuff, regular vue templates can't handle all the corner cases that a raw render function can).
In my eperience, most people do use the templates, and especially in Vue 3, those templates are going to get compiled to extremely optimised render functions. But if you want or need to, you can also write your own render function directly, or indeed use JSX. Vue is remarkably flexible about that.
I think Vue can be best described as a fairly light-weight framework that takes the best aspects of Angular and React. You can do templates like Angular, or render functions like React. It's fast like React, does data binding like Angular. Vuex is very much like Redux. It lacks Angular's injectable services, though.
I was also pleased with how easy it was to rewrite a project with Vue. Of course, it was much more seemless since Vue is very similar to KnockoutJS which we were using at the time.
Knockout is significantly different from Vue. You have to supply values to its `data-bind` properties, and `data-bind` has its own syntax. I'd argue that semantically Vue's template syntax is similar to Angular's, not so much Knockou.
We inherited a mostly-complete AngularJS (Angular 1.x) project for a business jet cabin control interface. Meant to run on both user's personal phones/tablets and on devices attached to the interior of the plane, we found that the AngularJS system had very sluggish performance on some of the built-in on-board devices. And those are hard to get replaced, largely for avionics certification reasons.
We traced the sluggish behavior to the combination of AngularJS running on those particular devices, and prepared several prototypes with different frameworks. Ultimately VueJS gave us the best performance (just slightly better than React), so we went with that, rewriting the existing software and adding more promised features.
Our decision for VueJS was entirely grounded in performance within our overall system, but I have subsequently become a big fan of Vue. It's very enjoyable to work with. Glad to see them doing so well!
It looks like honeypot.io is doing a series of these documentaries on various projects, and I think it's a great move. Growth hacking has a bad name for underhanded tactics, but I'd love to see more companies "hack growth" by finding unique and underserved ways of creating value to their target audience that are completely orthogonal to what their business model is.
Just watching their video about GraphQL. I like it a lot. I wish there were more books and videos that stay technical. Most other material quickly starts skipping technical content. For example when you read the biography of Steve Jobs you barely get an idea of how he worked although that was probably the most important aspect of him.
I really like the folder structure and the way you just drop a file in and it works (tm). Like with VueX. Just create a file in /stores and you have a new namespaced vuex store. Or /plugins, or /modules. It just makes loading things and organization easier.
Plus, if everyone used Nuxt jumping into someone elses project enables you to locate shit way easier. From pages, components, stores, to configuration data in nuxt.config.json.
Just switched to single file components. Really liking the format! One file for the HTML / JS / CSS of a component. Pycharm mostly works correctly with it..
Seems full of anti-patterns? Have any examples? React is easily just as magical. I'm curious. I also don't see how React skills would be transferable to anything but React.
Not that i'd put php users and vue users in the same overlapping venn diagram. Global mixins is probably the biggest anti-pattern I see in vue. Vue also allows some stuff like accessing this.$parent and v-for and v-if loops on the same element like angular 1. Really just any of the bad parts of angular 1 that vue brought over and other frameworks including react and Angular v2 did away with.
Sure you can access this.$parent, and use a v-if on an element with a v-for, but if you read the docs, they tell you that you probably shouldn't be doing either of these things [1][2].
Is this generally the progression through the years?
Backend dev -> Angular -> Vue?
I primarily do frontend and I never found the Angular/Vue frameworks to compelling to learn. I like React more but don’t have to use it with every project. I’m curious if the Angular/Vue audience is of a certain type of engineer.
My path was FrontEnd -> AngularJS -> Vue ; Personally I liked angular for the same reason I think people liked jQuery back in the day; it just made a bunch of previously annoying things easy to do--lots of helper methods, custom components, etc.--which let me develop things faster. Also all those utils had good docs, all in one place! Besides dev speed, it also managed complexity better by allowing me to organise things (which was a challenge before es6). Vue is less of a kitchen sink library, but it still makes it easier for me to avoid dealing with some things I don't want spend time on--binding, components, etc., and it also let's me manage complexity better through organising things with components. There aren't many projects I'd start without it; it just feels so much faster to develop if I'm working on a UI heavy app.
I went through a phase of using pub sub with jquery + rivets + radio + underscore templates years ago. Two way data binding was a revelation for forms.
Then came vue which solved all of this in a clean way with a lot of other benefits to boot. I chose it over react because it can coexist relatively fine with old code, and with years worth of sites to maintain there's a fair amount of that.
Yes, I also found this documentary to be entertaining.
It’ll be interesting to see if Vue.js usage spikes.
vue is French for view. His original name was seed.js but it was taken so at the last minute he used Google Translate to find a different way to say view.
I've used Angular, React, and Vue in monolithic enterprise products throughout my career. Vue is by far my favorite and still my go-to for personal projects.
My main complaint is not with Vue itself, but with the lack of adoption as opposed to frameworks like React. I am having a hell of a time finding mid-to-senior level jobs - especially remote - working with Vue. When I do find them, it's usually some immature startup that doesn't provide basic benefits like medical coverage.
The Vue community needs to up their game on PR, so i'm very happy to see this documentary posted on HN! Kudos to the team for making such an amazing framework!
I would guess that one of the benefits of knowing React is the the relatively easy transition to React Native, which allows you to deploy to mobile platforms as well. That's why React is so popular in the industry.
Just finished a job search with Vue as the framework I have most experience in. Can confirm 95% of jobs seem to be React. Vue seems to be seen as a good option for moving away from sort of previous mess or something that backend/'full stack' devs can pick up quickly.
The senior jobs from my experience are there when the above goes awry without dedicated Vue (or even front end) knowledge.
I find the core team involvement of two of the biggest Chinese companies a bit worrying as somebody who tries not to support unacceptable totalitarian politics in that country, considering that it's not a secret how obedient the big companies have to be in order to even exist there. A pity because it's a great framework and community, I just can't ignore that aspect..
FB is just a mirror and amplificator of society including its bad parts, the outcome depends on each individuals education, self awareness and environment.
I try to avoid it because I know how shitty people can be, and because I know myself, not because people exploited it as a tool.
China is outcome focused and tries to surpress the bad sides of humanity with force, neglecting humanity by not accepting its bad parts. As shitty as FB may seem, it's not really comparable. From a humanist point of view, one model is clearly wrong, malicious or not.
- The Vue project has more than 20 core team members and hundreds of contributors from all over the world. There are currently TWO active core team members working for big companies in China.
- These two core team members make their contributions to Vue on their own will. The companies they work for do not dictate how they contribute to Vue, nor do these companies have any control over how the project evolves.
- These Chinese companies do have to comply with local government regulations to be able to operate in China. Does that make every business in China evil? You have to realize that the Chinese government !== everything China. People in China needs to live and work, that means they have to grow their economy and start businesses regardless of what kind of government they have to put up with. Equaling running a successful business in China to supporting totalitarian politics is like equaling being successful in America to supporting patriarchy and white supremacy.
Yet here we are: "Avoid the project because evil China." - quite a stretch, isn't it? By the same logic, projects directly owned and controlled by a company that has been the most significant contributor to political misinformation probably should be avoided at all cost too. Yet to you it seem to be no big deal. Just gotta love the double standards here.
> - These two core team members make their contributions to Vue on their own will. The companies they work for do not dictate how they contribute to Vue, nor do these companies have any control over how the project evolves.
I believe you.
>- These Chinese companies do have to comply with local government regulations to be able to operate in China. Does that make every business in China evil? You have to realize that the Chinese government !== everything China. People in China needs to live and work, that means they have to grow their economy and start businesses regardless of what kind of government they have to put up with. Equaling running a successful business in China to supporting totalitarian politics is like equaling being successful in America to supporting patriarchy and white supremacy.
The human aspect of the regulations are the problem, so it's not a good comparison because you can run a business in the US without supporting patriarchy and white supremacy. The system is able to change if people vote and consume differently.
This isn't possible in China (you can't run a business that's not aligned wit the gov) because you can only consume from aligned sources, therefore the only way things could change is backlash from abroad, from boycot.
It's a difficult situation for you and chinese people because nobody wants to get sucked into a conflict, but I hope that you understand my viewpoint too.
> I find the core team involvement of two of the biggest Chinese companies a bit worrying as somebody who tries not to support unacceptable totalitarian politics in that country, considering that it's not a secret how obedient the big companies have to be in order to even exist there. A pity because it's a great framework and community, I just can't ignore that aspect..
Like I've always said - Vue is great, but Evan's contributions to it are way too big. If he had to get sick or go MIA, the project would essentially halt.
I had just kind of learned Knockout around the time that I discovered Vue. It felt familiar and didn't have some of the problems I was running into with Knockout.
Learning Vue (and in general, JavaScript) is one of the best decisions I've ever made. I'm a person with a severe disability who can just barely move a mouse around and twitch a finger to click. But I found a job on a job board dedicated to Vue jobs. Now I'm able to work from home and make (to me) good money. Thanks Evan & friends!
82 comments
[ 3.7 ms ] story [ 171 ms ] threadhttps://news.ycombinator.com/item?id=22347911
Lots of commentary.
We are using it to build Webase [1] and couldn't be happier with the technology choice.
Can't wait to watch this documentary.
[1] https://www.webase.com
I disliked this when I first used Angular, but after adjusting to it I've found that it's highly respectful of HTML's design patterns, the opposite of a hack.
```const element = <h1>Hello, world!</h1>;``` How is this less of a hack compared to vue's attributes?
I was really surprised about how he came with the name "Vue".
The "Benevolent Dictator for life" model seems to work just fine!
I don't know Vue, and I don't know your setup, but what we opted for was:
1. Building a foundation in Vue/React.
2. Create an iframe component.
3. Load the angularjs app into the iframe.
4. Build a messaging system to notify the parent app of state changes.
5. Build a system to show/hide the angular app depending on the URL or view.
This method worked well for us.
But converting a large, old project is always going to be hard. You either need a way to mix two different frameworks, which is going to be messy, or do a complete rewrite, which is a massive amount of work.
This let's us start using Vue today and slowly phase out AngularJS.
The same pattern at my current role has worked while migrating an AngularJS app to Vue.
Does React feel the same way? I know people love it too, but I haven't had an excuse to try it yet.
Never tried Vue. Is it similar?
To me React is the preferable framework, it's much more opinionated and finicky but also more clear and thoughtful once you start approaching problems the way it requires. Vue is a lot like React, but it's extremely flexible and beginner-friendly. It doesn't really require a novice developer or someone coming from something very different like Rails or Angular to change how they think beyond the component structure itself.
Two-way data binding seems much nicer and easier when you first come to Vue, but has so many hidden pitfalls and annoyances that one-way completely side-steps.
That being said, I _despise_ DSLs and they should be avoided at all costs. They seem like a waste of brainspace and extremely fragile. It's my single biggest knock against Vue.
We traced the sluggish behavior to the combination of AngularJS running on those particular devices, and prepared several prototypes with different frameworks. Ultimately VueJS gave us the best performance (just slightly better than React), so we went with that, rewriting the existing software and adding more promised features.
Our decision for VueJS was entirely grounded in performance within our overall system, but I have subsequently become a big fan of Vue. It's very enjoyable to work with. Glad to see them doing so well!
it seems that vue is part of the class of good tools that balance good enough structure and user pleasure the right way
I usually say, if your customers don't care and cant tell then it's not an advantage.
Plus, if everyone used Nuxt jumping into someone elses project enables you to locate shit way easier. From pages, components, stores, to configuration data in nuxt.config.json.
a) It's a Microsoft product (maybe has some microsoft logos removed?
b) It doesn't replace Pycharm for Django development, so I would need to use 2 tools instead of 1.
Vue.js just seems full of anti patterns and magic, likely why so many devs who come from PHP like it.
If it works for you, then kudos, but if you are a dev who wants transferrable skills and to prepare for the future, learn react.
[1] - https://vuejs.org/v2/guide/components-edge-cases.html#Access... [2] - https://vuejs.org/v2/guide/list.html#v-for-with-v-if
Backend dev -> Angular -> Vue?
I primarily do frontend and I never found the Angular/Vue frameworks to compelling to learn. I like React more but don’t have to use it with every project. I’m curious if the Angular/Vue audience is of a certain type of engineer.
Then came vue which solved all of this in a clean way with a lot of other benefits to boot. I chose it over react because it can coexist relatively fine with old code, and with years worth of sites to maintain there's a fair amount of that.
So many random BS companies trying to sell content online and here there is a documentary I would definitely pay for and it is free.
It’ll be interesting to see if Vue.js usage spikes.
vue is French for view. His original name was seed.js but it was taken so at the last minute he used Google Translate to find a different way to say view.
My main complaint is not with Vue itself, but with the lack of adoption as opposed to frameworks like React. I am having a hell of a time finding mid-to-senior level jobs - especially remote - working with Vue. When I do find them, it's usually some immature startup that doesn't provide basic benefits like medical coverage.
The Vue community needs to up their game on PR, so i'm very happy to see this documentary posted on HN! Kudos to the team for making such an amazing framework!
The senior jobs from my experience are there when the above goes awry without dedicated Vue (or even front end) knowledge.
I expect neither is actually malicious.
I try to avoid it because I know how shitty people can be, and because I know myself, not because people exploited it as a tool.
China is outcome focused and tries to surpress the bad sides of humanity with force, neglecting humanity by not accepting its bad parts. As shitty as FB may seem, it's not really comparable. From a humanist point of view, one model is clearly wrong, malicious or not.
- The Vue project has more than 20 core team members and hundreds of contributors from all over the world. There are currently TWO active core team members working for big companies in China.
- These two core team members make their contributions to Vue on their own will. The companies they work for do not dictate how they contribute to Vue, nor do these companies have any control over how the project evolves.
- These Chinese companies do have to comply with local government regulations to be able to operate in China. Does that make every business in China evil? You have to realize that the Chinese government !== everything China. People in China needs to live and work, that means they have to grow their economy and start businesses regardless of what kind of government they have to put up with. Equaling running a successful business in China to supporting totalitarian politics is like equaling being successful in America to supporting patriarchy and white supremacy.
Yet here we are: "Avoid the project because evil China." - quite a stretch, isn't it? By the same logic, projects directly owned and controlled by a company that has been the most significant contributor to political misinformation probably should be avoided at all cost too. Yet to you it seem to be no big deal. Just gotta love the double standards here.
I believe you.
>- These Chinese companies do have to comply with local government regulations to be able to operate in China. Does that make every business in China evil? You have to realize that the Chinese government !== everything China. People in China needs to live and work, that means they have to grow their economy and start businesses regardless of what kind of government they have to put up with. Equaling running a successful business in China to supporting totalitarian politics is like equaling being successful in America to supporting patriarchy and white supremacy.
The human aspect of the regulations are the problem, so it's not a good comparison because you can run a business in the US without supporting patriarchy and white supremacy. The system is able to change if people vote and consume differently.
This isn't possible in China (you can't run a business that's not aligned wit the gov) because you can only consume from aligned sources, therefore the only way things could change is backlash from abroad, from boycot.
It's a difficult situation for you and chinese people because nobody wants to get sucked into a conflict, but I hope that you understand my viewpoint too.
So what would you use then?
Learning Vue (and in general, JavaScript) is one of the best decisions I've ever made. I'm a person with a severe disability who can just barely move a mouse around and twitch a finger to click. But I found a job on a job board dedicated to Vue jobs. Now I'm able to work from home and make (to me) good money. Thanks Evan & friends!