Hacker News new | past | comments | ask | show | jobs | submit login
Vue in 2016 (medium.com)
227 points by tsutomun on Dec 28, 2016 | hide | past | favorite | 76 comments

I would not be surprised if Vue becomes long term one of the major winning js libraries that is the goto library just like jQuery did.

I remember when jQuery came out and there were all sorts of existing make-js-dom-ajax-easy libraries already out with major entities backing them: Dojo toolkit (a ton of companies), Prototypejs (Rails), GWT (Google), YUI (Yahoo) and many more.... but jQuery backed by a single guy won.

Actually web components that are backed by all...browsers won ;-) HN doesn't see it yet though.

Webcomponents are not even close to winning (but I want to see that happen). As far as I know React is winning and vueJS is going strong. I have not seen much projects using web components.

They are implemented inside browsers - so they won - they are a standard. Do not confuse this with js framework popularity. They may or may not use components internally.

I think Vue plans to adopt web components when they are viable.

But isnt whole purpose of web components is not using a framework?

Nah - one doesn't rule out another - you still want to have binding/flux + some handy things that a library may provide on top of web components.

Isn't the whole purpose encapsulation?

Whether or not Evan sees this, I hope he knows I'm thankful for him and his work. Vue is the only front-end framework I will ever consider (up to this point).

For the most part, I think front-end frameworks are overused. Like, Uber's freight page — why the hell are they using React? My gut tells me some internal tooling bootstrapped setup, but something else tells me "because it's cool, and it's not cool not to use it."

The appeal just isn't there to me. Developers (and c-level execs) seem to care about how hot their stack is, rather than how practical their stack is. I guess my liberty comes from being self-employed, and being able to make my own decisions. I don't want another thing to have to learn/document/support/break in my pipeline. I just want everything to work as fast as I need it to work, when I need it to work.

I've managed just fine (as have many, many others) with just dropping in Turbolinks if I need "fast". HOWEVER, I will say that when the business requirements mentioned "get it close to real time" and "lots of moving parts on this [controller/page]", I ditched my janky-ass jQuery hackjob and went to Vue. And I'm really, really glad I did it.

Laracasts has a great (and free!) video series on getting started with Vue 2.0 if anyone is interested: https://laracasts.com/series/learn-vue-2-step-by-step

Something about Vue resonates with me. I won't bash any other frameworks, but for my purposes, Vue scratches the frontend itch.

> I won't bash any other frameworks

Doing mostly React myself, Vue has reminded me of times when I was doing PHP and the Rails was "next big thing", and you couldn't have discussion about technology on "neutral ground" without it being raided by aggressive RoR fanboy or few to explain to you how you are doing it all wrong without giving any arguments, but with a lot of snark.

Downvoted because of the way its presented, but quite a few techs lately become popular mostly because of overly aggressive PR than actual technical merits (even though those things ARE good, don't get me wrong).

Not criticizing the quality of those tools when I say the following, but techs like Vue, TypeScript, MobX (for a while, I didn't see it happen lately), etc seem to have gained popularity mostly because you could not say anything without them being mentioned. Then people who are unfamiliar with the field get the impression those things are super mainstream and go try it. Sure, they need to be good to stick, but...

And in some cases of TS, that was happening long before it was good (back when the type system sucked, ES6 support was abysmal, etc). Then it got a huge following, and then it got good. That type of behavior make communities pretty toxic.

Of course, we're all only humans, and marketing is often more important than quality.

> Downvoted because of the way its presented

Could you please elaborate?

Sorry, -I- didn't downvote it. When i posted it, it was -being- downvoted because people didn't like the way it was worded. I agreed with it.

The really interesting thing to me here is the funding model -- he's making $10k/month on Patreon right now (which is great!!). Most of that comes from 11 $500/month sponsorships.

That's much more than I've seen from most other people raising money on Patreon

He is beating well funded teams of Facebook and Google alone! $500 is a very small price to pay if you are company and using Vue in production.

I may be naive here. I hope Github/Gitlab would implement a similar feature to their platform with a option to pay the developer. I don't mind donate $500 a month to a good OSS because a good developer costs at least 20 times that amount, but it would be nice if the expense is accountable.

I was recently looking at Vue and was blown away by the quality of the official docs. They're both very comprehensive and readable.

Quite apart from many other projects that have a hello world / tutorial and autogenerated API docs and think that's enough.

The docs are what got me to give it a try and I use it now for any page that has complex/reactive interactions.

Java (even with Thymeleaf templates), PHP, Node, and just straight HTML. Because of the many different ways you can integrate it into your project you don't have to start out with the intention of making the entire front end with Vue, and you don't have to build a huge SPA. You can simply integrate it view by view if you want, which was magical when I was slowly updating the front end of a crusty old WebApp built a long time ago.

Holy shit they're even responsive and don't look like someone stuck in the 00's designed them. Honestly kind of blown away right now

evan you is a designer, and it shows in everything from the docs to the API to the implementation of the transition system in vue. his consideration of what others would call little things is why this project won me over.

I'm curious why a designer has a special way of making an API?

Fantasic work Evan You! Vue is exactly what I've missed in the js world. I cant explain it well, but I never could stand Angular or React. Look forward to using Vue alot in 2017

Will vue be the new hotness in javascript land? Will it replace react as the next best thing? Kind of funny the author devotes a paragraph to this question too. But still wondering!

I know both frameworks differ, but I see/read that more and more developers start with vue whereas those kind of posts half a year ago would have been with react instead.

I sort of liked react, as far as I find doing javascript enjoyable. The whole thing making it complicated at first is that flux/redux thing.

I think "complicated at first" is an understatement when it comes to flux/redux - I've been using it for a year and it's still a pain, even though I love what it can do.

I just stumbled onto Vue after disenchantment with the morbid obesity and tooling diarrhoea of Angular 2--itself a research project born of an increasing sense that Angular 1, bureaucratic enough in its own right, is being aggressively deprecated by these sociopaths. That's something that unfortunately has implications for all of us, including those who would just as well keep using Angular 1.x contentedly.

Vue is amazing! Everything that's good about Angular 1 but without the embellished boilerplate. One is free to use Vue in any way one wishes, from script tag include to complex Webpack get-ups. It has a surprisingly large ecosystem of third party UI components, including a great, no-nonsense state router. But fundamentally, one is free to architect one's app as one wishes without having to spend two years learning a bunch of meta-boilerplate and build-tools-for-build-tools just to get going.

And it lets one write plain old ES6, a luxury in this age of TypeScript fascism by psychopathic ex-JBoss villains. I love it! This is the perfect MVWW compromise I've been after, as a non web developer by trade!

Thank you, Evan! Amazing work, and great documentation! Thank you, thank you! I just became a $50/mo Patreon supporter. If I ever get wealthier, I'll increase it. And I haven't even used Vue for any production work yet. But that's how much I love it! I haven't loved something this way in probably a decade and a half. Almost every hipster.js novelty that comes across HN, big and small, makes me groan. This is the first thing of its kind about which I haven't felt that way.

This is going to be a highly successful venture. I know it. Godspeed!

> And it lets one write plain old ES6, a luxury in this age of TypeScript fascism by psychopathic ex-JBoss villains.

This opinion is one of the many things that are wrong with the JavaScript ecosystem today. Static typing as provided by TypeScript is a safety net, not "fascism".

Yes, but they completely undermine the appeal of JavaScript for getting things done quickly and easily for the JS-competent. If I wanted to write my JavaScript as bureaucratically as one writes Java or C#, I'd just use those languages.

Also, Angular 2 claims to be TS vs. ES6 agnostic, but practically, all documentation and resources are TS-orientated. That's more what I meant by fascism.

As far as the language premiums offered by TS: if I otherwise had to write ES5, I could see the value. With all the improvements offered by ES6—sure, type safety is not among them, but alas—I don't see any reason to use TS.

> getting things done quickly and easily

Sure, fast turnaround is good. Being able to maintain and refactor what you made a year later is even better. I'm currently refactoring an app that has ~30k sloc TypeScript, and doing it without types would be a lot worse.

However, my app is not built in Angular, so my experience here may be quite different.

I'll buy that. I'll also buy that the discipline of TS—like Java—is useful on large enterprise projects and/or on large teams, especially if the aim is to limit the amount of damage that can be done by ordinary J2EE H1Bs at Accenture.

But that's no reason to force its use as a precondition of using a notionally JS framework.

It's sort of sad that TS inspires comparisons to the bureaucratic, manifestly typed languages like the perennial Hacker News bashees C# and Java and not the graceful type inference of some functional languages. These languages being the face of strong static typing betray the ability of types to make a programming language both safer and more expressive.

because it is closer to java or C# than it is to the more advanced functional languages.

Yeah, it has structural typing, some type inference and pinky swearing type guards. It is better in those regards. But you still don't get very far without annotations. C# had inference for anonymous objects and return values too, and TypeScript is only a little further ahead on that one.

Though the main problem with TS is how it actually gets used. You certainly CAN do java-like garbage with it, and god do people do. If you're not stuck with people doing that, it's not half bad.

It's just sort of a shame that TS is winning out over Flow. I remain convinced that the latter is better.

yup. Flow has a couple of annoying bugs (situations where the type checker ignores errors without warning you), and tooling and IDE integration is horrible. Plus windows support is still slow and buggy.

Flow is my favorite too, i much prefer its type system, but its no surprise its "losing".

I think it's a red herring. TS's typing isn't the only thing that is true about it, and is not the salient issue here. Were TS merely to force types upon me, I think I'd have few grievances with it.

Yes, yes, I know—it's (2.x) a superset of ES6. But just you try writing Angular 2 code in such "ES6". No, you have to play ball with generics and the full gamut of Java features.

Generics are a pretty integral part of the type system, not a "Java feature". And TS has other good features besides types, e.g. transpiling to ES5, async/await, TSX, decorators. What does pure ES6 offer instead?

I am avoiding Angular entirely (I'm not a fan of the "and the kitchen sink" approach it promotes), so I can't comment if they're taking TS too far.

I guess I don't understand why generics are "Java features?"

> ordinary J2EE H1Bs at Accenture

you probably don't see that phrase in their marketing materials.

I don't see any reason not to use TypeScript as all of the type safety is totally optional depending on how you configure. So you can write freely but start adding types for critical pieces of code when it becomes worthwhile.

And because someone doesn't like TypeScript doesn't mean they are "one of the many things wrong with the JavaScript ecosystem today".


I blanched at all that too, but decided it was probably intended satirically.

> In truth the boot is probably on the other foot.

Please don't stoop to personal attack, even in response to a bad comment. It just makes the thread worse.

I dunno, maybe it was intended satirically.

s/Angular/Angular 2/

And I'm happy to take alternate suggestions for what to call the Angular 2 "user experience".

I don't disagree with your opinion, but calling them sociopaths, psychopaths, and villains is a bit strong.

Agreed. It's always very sad to see people who are utterly unwilling to imagine another person's perspective. A project like Angular might have made decisions you disagree with, but that doesn't mean the author is a sociopath. It just means you disagree with their perspective, which is not a fault of either person.

I would normally agree with both of you, but Angular 2 really is sociopathy. It's a wicked nightmare that could only be born of J2EE-type misanthropy. I don't choose that editorial posture lightly. Have you attempted to use Angular 2?

I'd rather impale myself on Spring and Hibernate2. 10,000 lines of malignant Maven and Ant XML tumour seem like a cakewalk by comparison.

FWIW, I enjoyed your hyperbole and I really think you weren't overstating things by that much. Angular 2 is a fundamental disaster in so many ways. The folks designing it have really jumped the shark and have made building webapps a lesson in masochism and self-flagellation.

Somewhat of a tangent, but does anyone have any experiences to share for functional JSX + Vue 2?

Yeah, I'd love to use Vue, but I'm not a fan of the Angular-style 'templating'. If I could easily use JSX, that'd be awesome!

I don't know what you mean by "angular style templates". Vue most commonly used single file components, and I've never seen those in angular

Sorry, I meant stuff like <v-if="condition">.

Another very happy customer. After doing React and Angular 2 for a while I'm very happy with Vue. And it would be really nice to see Weex reach production maturity someday (regarding docs as well). Thanks, Evan!

agreed! it would seem ready for production given the alibaba association but docs and official support for vue (weex is based on but not actually vue) seem like the blockers for other orgs to adopt it. evan has stated in some HN thread (can't seem to find it now) that an "official vue" version of weex is coming very soon, though.

In the article it states that that stage is complete already.

As far as I can tell, Vue doesn't actually do much differently than the hundreds of Javascript view libraries that have come before it, like Backbone views. It seems just to be gaining popularity as a "react"-ionary pendulum swing from React boilerplate. I don't have anything against Vue but I don't see specific benefits over other similar libraries.

I'm intrigued by Vue. I am also traumatized by the almost complete lack to continuity from Angular 1 → 2. Does anyone know if API stability is a value of Vue's? I don't want to learn something if it will all be different in 6 months.

the 1->2 transition was handled with grace -- very helpful warning messages and even a migration tool. all breaking changes seemed necessary and it wasn't hard to pick up at all. only real pain point is googling an error message to find a discussion about a different version than the one you're using etc.

There were breaking changes between v.1 and v.2. That being said, API stability is definitely a priority.

> There were breaking changes between v.1 and v.2. That being said, API stability is definitely a priority.

"Breaking changes" is a euphemism. These are 2 completely different frameworks that only share a name, nothing more. Both versions share 0 API.

I think GP was talking about Vue, and you were talking about Angular? The shift in Vue from 1->2 isn't that massive.

Speaking about Vue. There's definitely shared API. The breaking changes were very well documented and there was a tool which would analyze a project and recommend upgrade path.

How much type safety do you get using Vue with TypeScript compared to Angular 2 or React? For example, if you use a variable with the wrong name or wrong type in a template, can you set Vue up to give you a compile time error?

There is no way to get typing in the template currently that I am aware of. There are various libraries that help with Typescript integration like https://github.com/itsFrank/vue-typescript, but you cannot currently write Typescript as the language in a single page component (again that I am aware of). I'm definitely hoping this is coming this year.

You can use JSX instead of string templates. This way you can get type safety.

Do you know of any examples of this?

JSX is in the docs: https://vuejs.org/v2/guide/render-function.html#JSX

I don't have any concrete example of Vue.js + JSX + TypeScript but I know it's a bit tricky, see this thread: https://forum.vuejs.org/t/vue-2-0-and-tsx/308/8

> vuejs.org page views: 21,424,759

With an ad strategy, he would make a good money, at least double his current earning. I'd think about it.

The website has ads via Carbon Ads. I like how Carbon Ads are not as intrusive as other ad firms. No animation or autoplay video with sound.

Is anyone using Vue with Rails? Is it easy to set up?

Yea it works on anything, almost like loading a jquery library

Where is gone the Ordonnée legend?


Nasty swipes like this will get your account banned on HN, so please edit them out of your comments here.

We detached this subthread from https://news.ycombinator.com/item?id=13273641 and marked it off-topic.

If you need to write in a new language to use it (JSX)...it's either a framework or something much more than a framework...

Vue is nice until you realize that you're supposed to use something like vuex. The simplicity is then lost and I feel I may just as well use React+Redux.

Uhm.. Your reasoning doesnt make sense. You dont have to use vuex, and if you do, its not really that hard. And for sure React+Redux wont make your life more simple if thats what you are after

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact