7 ms·
As someone who went through the complete frontend hype-trains (jquery, backbone, angular, ember, react, all in production): Vue.js 2.0 with single file componen
by anonyfox 10y ago
As someone who went through the complete frontend hype-trains (jquery, backbone, angular, ember, react, all in production): Vue.js 2.0 with single file components is exactly what everyone looks for desperately.
- performance: faster than react now
- learning curve: a few hours from scratch
- getting started: cli-tool for initial scaffold & configuration
- components: simple .vue files with a <template/>, <script/> and <style/>. Super easy to get going, no need for JSX
- "official" packages for routing, ajax and state management. No wasting of days for choosing every tiny package for days
- vuex 2.0 is one of the cleanest flux implementation i've seen in the last year
... and much more. Give it a try with the full webpack template of the cli tool!
- iotscale 10y agoI started reading through the docs and found it very similar to Knockout.js. Is here anyone who used both to tell the advantages of Vue? FYI, I'm thinking about dropping Knockout because some performance problems I'm having with a very specific use-case.
- aloisdg 10y agoWe are using Knockout in my current work. I am using vue in my spare time. They feel indeed very similar.
- LaurentVB 10y agoExactly my thought when I tried Vue.js: on the surface, it's knockout with some react-inspired additions that make it faster. I loved being able to pick up Vue.js and make something that just worked in 30 minutes.
- SparkyMcUnicorn 10y agohttps://vuejs.org/guide/comparison.html#Knockout https://vuejs.org/guide/comparison.html#Knockout I've used Knockout before and it's really slow. I also find Vue to be less complex overall in comparison to Knockout.
- disease 10y agoReact with MobX, Vue and Knockout all seem very similar. I am wondering if TypeScript is a first class citizen in either MobX or Vue - in my experience seeing TypeScript everywhere in Angular 2 has been one of that platform's biggest wins.
- dabernathy89 10y agoWhen I first started looking at Vue last year this was my initial thought too. Overall, I think Vue has more to offer, has a cleaner syntax, and is more enjoyable. Some specific things I like: - With Vue, you don't have to specify which pieces of your data are 'observable'. The entire data object for each component is reactive. - Vue's getters/setters mean you can interact with your data really easily, no need to invoke properties as methods - Directives are more readable. Knockout makes you cram everything into the `data-bind` attribute, whereas Vue splits these out into individual attributes( @click, :class, v-if, etc)
- holon 10y agoI've used both Knockout and Vue for frontends that needed to render reasonably large amounts of disparate elements with near real-time updates, so I think I can answer this. Knockout is nice but feels closer to jQuery in that it requires a lot more discipline on the behalf of the developer to organise and maintain code. Things like ObservableArrays means dealing with another layer of abstraction; the wonderful thing with Vue is that it's just native JS objects all the way down. It also has a better structured child/parent component model with event flow, not to mention being much faster for rendering. I would also recommend Vue over Knockout.
- k__ 10y agoIsn't Vue.js hype too? I mean if I look at the GitHub stars it seems pretty hyped to me. (It's between Angular/React and Ember)
- corobo 10y agoIt's definitely hype. I'm honestly surprised nobody seems to be complaining about it breaking their noscript, accessibility, SEO, etc.
- k__ 10y agoI read a writing about how SEO isn't an issue with SPAs. (can't find it at the moment) As far as I know, all major search engines are evaluating JavaScript client-side and index the resulting html, only a chinese one had problems with SPAs. There was even a site from Google, where you could enter a URL and see how Google sees the page.
- SparkyMcUnicorn 10y agoAlso, with Vue 2.0 we have the option of SSR.
- andrewingram 10y agoIt's still an issue. Let me show you an example. Here's a website that's an SPA https://preactjs.com https://preactjs.com I don't have an exact page count, but I was able to find 15 pages from browsing around. Here's how many pages various search engines have indexed using the query "site:preactjs.com" Google: 17 Bing: 6 Yahoo: 6 Baidu: 1 One of the Google results is an error page, but it presumably can't be de-indexed automatically due to there not yet being a way of declaring a 404-equivalent in SPAs. I've also read (I can't recall where) that Google has a latency of a few days when it comes to indexing SPAs compared to server-rendered apps. This may not be a problem for you, but it's worth knowing about.
- k__ 10y agoInteresting, thanks. I think Jason Miller, the Preact developer, re-tweetet the article about SEO & SPAs a few days ago. But, because of progressive enhancement, I would using SSR on my next project anyways.
- BaconJuice 10y agoany good resources that goes in depth with features and best practices you can share with us? vue2 specifically?
- BaconJuice 10y agoany good resources that goes in depth with features and best practices you can share with us? vue2 specifically?
- threatofrain 10y agoIf VueJS 2 supports JSX, does that mean Vue and stateless React are now largely interchangeable with minimal re-write?
- stephenhuey 10y agoI went digging through tons of frameworks for a new company project early this year and chose Aurelia. Vue was a pretty good possibility in my mind, but Aurelia gives me a little more bang for the buck. I also think it's much easier to get going with Aurelia than React or Angular. Since then Aurelia has released a new CLI tool and some other significant updates. It's already fast and the code is predominantly straight JS and web standards so it seems easy to pick up again after not looking at it for a while.
- intothemild 10y agoI've written a express renderer library so you can use vue component files without webpack. Just using res.render() https://github.com/danmademe/express-vue https://github.com/danmademe/express-vue