Live data from Hacker News

Vue.js 2.1 Released

github.com

51–60 of 126 posts

Re: Vue.js 2.1 Released

#51
post #28

I am sorry if this sounds too ignorant, are frameworks like Vue.js (I actually read the guide and understood some wonderful things about its philosophy since I am actually developing backend mainly) or React, etc.. reasonable to use in websites in general (instead of jquery or taking some tasks from it) or they actually only reasonable for mobile web applications and SPAs? What about the SEO and search engine renderi…

What I like about Vue is that it makes it is very easy to use it as a component of a larger website or non-SPA application. You can use it where you would otherwise use jQuery in order to build widgets or interactive components. It makes it very easy to drop it into a page without a lot of ceremony (no flavor of the month build tools or exotic precompilers are required to get started).

Re: Vue.js 2.1 Released

#52
post #44
post #40

Earlier quoted context omitted.

> Its such a simple transformation and adheres to javascript standard behavior. JSX doesn't add anything new, it just adds a way to do something old. I don't understand your point, to be honest. A lot of language features are just syntactic sugar for lower-level language functionality. ES6 getter/setters are just syntactic sugar for Object.defineProperty. Does this mean that ES6 and ES5 are the "same"? No, of course…

It's literally as complex as transpiling ES6 to ES5. And although JSX is not in the ECMA-262 spec, it does have a spec, so there's that.

Transpiling is complexity. You don't have to transpile if you just use web technologies (JavaScript, HTML, CSS).

Re: Vue.js 2.1 Released

#53
post #35
post #28

I am sorry if this sounds too ignorant, are frameworks like Vue.js (I actually read the guide and understood some wonderful things about its philosophy since I am actually developing backend mainly) or React, etc.. reasonable to use in websites in general (instead of jquery or taking some tasks from it) or they actually only reasonable for mobile web applications and SPAs? What about the SEO and search engine renderi…

From personal experience for general web-sites like blogs, etc. it's better to do them old way, you don't need to worry much about seo, caching, precompilation, etc. But business apps huge community-like ones, and big shops benefit a lot from frameworks like that. But you should always base your decision on cost of implementation, support, etc.

React in particular, however, was specifically made to handle the state of just parts of the UI on Facebook (like notifications). You could build out a static site but let React handle something more complicated and it'll work just as fine, if not better.

It just so happens that the extensibility around React led to stuff like redux and react-router that's perfect for SPA's, but at its core it's just a View layer that could live alongside a traditional site.

Re: Vue.js 2.1 Released

#54
post #2

Is this looking a lot like Angular 1.x to anyone else? I've heard it's actually more similar to React but I'm not seeing it... ?

here's an link[0] to a comparison with react, angular 1 and others. [0] - https://vuejs.org/v2/guide/comparison.html

I loved how they did that! They actually invited the other experts to review and feedback on their declarations to ensure their work was honest and had integrity. Never seen that before. Have you?

Also I wished it was clear if this doc was updated with Vjs2 or if it's 1.x or what. That's not clear anymore and they need to sort that out or the integrity is lost.. by accident, but still lost.

Re: Vue.js 2.1 Released

#55
post #28

I am sorry if this sounds too ignorant, are frameworks like Vue.js (I actually read the guide and understood some wonderful things about its philosophy since I am actually developing backend mainly) or React, etc.. reasonable to use in websites in general (instead of jquery or taking some tasks from it) or they actually only reasonable for mobile web applications and SPAs? What about the SEO and search engine renderi…

In the past I've used https://prerender.io/ with a Backbone + Marionette website. You configure your .htaccess (or similar) to direct web crawler's to prerender.io's cached representation of your website. Works great and completely side-steps the issue of SEO for dynamic websites.

Re: Vue.js 2.1 Released

#56
post #28

I am sorry if this sounds too ignorant, are frameworks like Vue.js (I actually read the guide and understood some wonderful things about its philosophy since I am actually developing backend mainly) or React, etc.. reasonable to use in websites in general (instead of jquery or taking some tasks from it) or they actually only reasonable for mobile web applications and SPAs? What about the SEO and search engine renderi…

Not in websites per-se, but even the simplest contact/enquiry web form/wizard with some validation/interaction is a breeze to program in Vue.js compared to jQuery.

We have multiple internal enterprise applications where both jQuery and Vue.js are available. More often than not, when there's a pull request, even for the simplest UI interaction, it can be refactored to few lines in Vue.js from the jQuery event and DOM mess. We plan to move away from jQuery in a year or so, and no new jQuery plugins are allowed.

Vue.js has also allowed us to iterate much faster on complex UI than it would be possible with jQuery.

For bigger apps, you can add components, and for even bigger - add Vuex. Vue.js (same as React) really is the new jQuery.

Re: Vue.js 2.1 Released

#57
post #52
post #44

Earlier quoted context omitted.

It's literally as complex as transpiling ES6 to ES5. And although JSX is not in the ECMA-262 spec, it does have a spec, so there's that.

Transpiling is complexity. You don't have to transpile if you just use web technologies (JavaScript, HTML, CSS).

Of course it is, but saying it's "a ton of complexity" to use JSX, while not saying the same for transpiling current and future ECMA-262 syntax into what browsers support right now is disingenuous.

Re: Vue.js 2.1 Released

#58
post #12

Earlier quoted context omitted.

here's an link[0] to a comparison with react, angular 1 and others. [0] - https://vuejs.org/v2/guide/comparison.html

Hm, doesn't seem that much of a win for React users. The performance is compareable, but they went for templates instead of the "it's just JS"-philosophy of React. Reminds me of "the fear of turing complete templates"[0] Also, they mention their bindings are similar to MobX. I had the feeling MobX was a step back in the React eco-system, if I think about what Facebook wanted to achieve with Flux. But yes, overall it…

If you like JSX, please stick with React.

Re: Vue.js 2.1 Released

#59
post #2

Is this looking a lot like Angular 1.x to anyone else? I've heard it's actually more similar to React but I'm not seeing it... ?

It's like Angular in that they use a similar templating language, and it's like React in that they're using a component-based declarative DOM API.

If you like the awesome simplicity of Vue, but prefer a more familiar mustache-style templating language with your virtual DOM, try ractive.js from The Guardian.

http://www.ractivejs.org/

Re: Vue.js 2.1 Released

#60

I'm looking to move a few projects from Angular 1. What do developers think of migrating to Angular 2 vs Vue for this? I've played with Angular 2 but can't shake the feeling that it's overly complex.

Angular 2, not worth it. We made our decision to migrate an old Angular 1 app to Vue.js. Best decision ever.
Post reply on HN