Live data from Hacker News

Vue.js 1.0.0

vuejs.org

31–40 of 89 posts

Re: Vue.js 1.0.0

#31

Earlier quoted context omitted.

It has: https://facebook.github.io/jsx/

Emphasis on "implemented" haha. At least this makes it more open since someone can come in and make their own implementation. As it currently stands I don't think you can use Facebook's implementation to transform JSX to a framework-agnostic object.

You can use babel. Look at the custom example here: http://babeljs.io/docs/advanced/transformers/other/react/

Re: Vue.js 1.0.0

#33
post #10
post #2

Author here - thanks for the submission, I was actually planning to do it tomorrow :) Anyway, for those of you who are not familiar with Vue, here's a blog post explaining why it's worth taking a look at: http://blog.evanyou.me/2015/10/25/vuejs-re-introduction/

> More importantly, there’s no need to worry about calling $apply in a timeout, or calling setState(), or listening to store events Calling `setState` is not a big deal and neither is dealing with stores. It's very simple and you keep your state separate from your HTML. At this point I probably can't do web development without JSX and not be miserable. The days of separate templates are hopefully forever behind me. N…

I disagree, I've never used jsx and I can still build web apps. There are plenty of templating languages to choose from, my choice is Jade. I actually have never touched React because I've never had so much DOM manipulation to make use of it. If anything I can smoothly update my DOM with marionette/backbone and a little css animation.

Re: Vue.js 1.0.0

#34

I'd love to see a comparison of Vue.js with Aurelia ( http://aurelia.io/ ). In my mind, Vue.js and Aurelia are the two front-runners for the next "right-weight" framework (whereas React is the lightweight champion, and Angular 2 likely to be the heavyweight winner by default).

Vue's got a much longer track record, correct? Aurelia was only recently spawned (at least it feels like yesterday), and they still do not have a production release out. Also, I would crown knockout the light-weight champion (both in function, and concept), and ember the heavy-weight champion

Rivets[1] is an even lighter light-weight champion.

[1] http://rivetsjs.com/

Re: Vue.js 1.0.0

#35

I'd love to see a comparison of Vue.js with Aurelia ( http://aurelia.io/ ). In my mind, Vue.js and Aurelia are the two front-runners for the next "right-weight" framework (whereas React is the lightweight champion, and Angular 2 likely to be the heavyweight winner by default).

Vue's got a much longer track record, correct? Aurelia was only recently spawned (at least it feels like yesterday), and they still do not have a production release out. Also, I would crown knockout the light-weight champion (both in function, and concept), and ember the heavy-weight champion

You're right, Vue's been around longer, but Aurelia's release appears to be just around the corner and they have a team behind it, so I'd call it even. I'm mostly interested a comparison of the technical approaches since I think it's too early as yet to properly assess their communities.

Re: Vue.js 1.0.0

#36

I've always heard good things about Vue from its users. I have to compare all Javascript frameworks to React, because to me React feels like the first framework that got it "right." The API of React is surprisingly thin. Looking at Vue templates, the syntax seems quite alien, halfway between Django and Angular: And the API seems to needlessly separate HTML and Javascript, with some strange (to a newcomer) API calls:…

If I read the documentation correctly, you can also pass it a string to be used as template. If the string starts with a '#' it will act as a querySelector.

http://vuejs.org/api/#template

Re: Vue.js 1.0.0

#37
I like it. In fact I like it more than React, which I am not using (still a happy Backbone user).

A thought that I share, from the guide:

"API-wise, one issue with React (or JSX) is that the render function often involves a lot of logic, and ends up looking more like a piece of program (which in fact it is) rather than a visual representation of the interface. For some developers this is a bonus, but for designer/developer hybrids like me, having a template makes it much easier to think visually about the design and CSS. JSX mixed with JavaScript logic breaks that visual model I need to map the code to the design. In contrast, Vue.js pays the cost of a lightweight data-binding DSL so that we have a visually scannable template and with logic encapsulated into directives and filters."

What do you think?

Re: Vue.js 1.0.0

#38

I've always heard good things about Vue from its users. I have to compare all Javascript frameworks to React, because to me React feels like the first framework that got it "right." The API of React is surprisingly thin. Looking at Vue templates, the syntax seems quite alien, halfway between Django and Angular: And the API seems to needlessly separate HTML and Javascript, with some strange (to a newcomer) API calls:…

I've written large apps in both; interestingly, I've built the same app twice as well: once in Vue.js and once in React. I'm also in the process of building another very large front-end in Vue.js at the moment.

The big thing is that while I personally adore React, it does require ceremony to get stock-standard behaviour. We recently onboarded a new developer (a friend of mine), and teaching him React + Flux (Alt.js) was infinitely more difficult than teaching him Vue.js -- the "thicker" API (which is still an order of magnitude thinner than Angular or Ember) means you don't need to either reach out to other libraries to achieve tasks that you otherwise would need to in React.

Now, that's not a bad thing on React's side; it's a view-layer, not much more. That's okay, and a good thing! For building components rapidly in a regular "client -> designer -> cut-up -> development" workflow, Vue.js is streets ahead of React in terms of code required. But for building very large applications, React's smaller API means that you can guarantee behaviour, and things are consistent.

Basically, they are both brilliant libraries. I highly recommend both. React and Vue.js are similar in a lot of ways: they're both tiny little view layers that are component focused and have modern, ecosystem aware build tooling. They differ in that Vue.js is "classical" (though not really, it's far nicer than the older systems) MVVM which has been proven time and time again to be a good architectural choice, whereas React.js takes a more functional (as in programming) approach to the problem -- though I'd argue not far enough down the functional side, which is why I've been enjoying Cycle.js so much!

unless you get bitten by event pooling...

Re: Vue.js 1.0.0

#39
post #11

how is this compared to mithril? https://lhorie.github.io/mithril/ , trying to find a front-end js framework/library these days for an embedded product (use browser to configure it), angular seems a bit heavy for me, have not learned react yet.

That's a neat idea What OS and browser will it run?

Mithril runs in IE8+, currently, though that will be changing in the future.

Re: Vue.js 1.0.0

#40
post #10

Earlier quoted context omitted.

> More importantly, there’s no need to worry about calling $apply in a timeout, or calling setState(), or listening to store events Calling `setState` is not a big deal and neither is dealing with stores. It's very simple and you keep your state separate from your HTML. At this point I probably can't do web development without JSX and not be miserable. The days of separate templates are hopefully forever behind me. N…

See http://vuejs.org/guide/application.html#Single_File_Componen... . While it is certainly not JSX, Evan has written a Webpack loader, Browserify transform, and even a Sublime syntax highlighter to let you write JS, CSS, and HTML for a component in a single file. I personally like this approach as it lets me mix and match my favorite languages (Coffeescript, SASS, etc), and it makes plugging Vue into existing code a…

Just yesterday I was looking for a solution to mix HTML, *Script and CSS preprocessors in one single file. So happy I found this project! There's hope.
Post reply on HN