One of the biggest reasons I favor React is that it's much easier to add a templating language to a programming language (i.e. JSX) than the other way around. Every construct for making decisions based on your data, traversing your data, etc. is more cumbersome and harder to validate in handlebars or whatever identical looking templating language the community came up with this week.<p>I also am strongly against string references to model properties in your template. Again, it's much better to use tools that provide some static validation of what you're doing.<p>Give me React with TypeScript to help me make sure I'm passing around what I said I'm expecting to receive at each point as features are changed and added, and I'll be in business.<p>Honestly, I use React in spite of my opinion of Facebook.
You want to make your site fast?<p>Generate the markup on the server and send it down to the client! It's post-modern web development. Back to black.<p>You don't need 100 KB of code to spit down a table of data or show someone a directory listing of their github project. You don't even need an SPA, bunny.<p>And for goodness sake, when you do need to do anything in javascript, you can use document.createElement and document.createDocumentFragment. These are perfect 1:1 browser APIs that allow you to do everything you've ever wanted, there's no magic, they call directly into the browser engine to give you what you need.<p>If you want to increase performance, start first by measuring everything. Time to first byte. Time to DOMContentLoaded. The page onload event. window.performance timings; do real user monitoring, not TODO app benchmarks on the latest framework flavor of the week.<p>The entire web community needs a healthy dose of pragmatism. But it's okay, it gives me extra work. I really enjoy doing freelance performance work and telling everyone which code/library/framework is to blame for performance issues and rewriting everything so simply. Show people what works and you'll find they shut up real quick.
I really think for most cases you only need a view library instead of a heavy application framework. There are only a few cases there something as heavy as Angular or Ember is justified and in many scenarios a thinner view layer like Vue, React, Inferno etc is much better suited. Most of the web is simple enough to not need fancy http features or complex routing support. Everyone rushed to Angular without considering if they needed such a heavy library. How Angular even runs on mobile is anyone's guess.
I'd only heard of Vue as a name before this, but I followed the link to the documentation, which looks fantastic:<p><pre><code> <div id="app">
{{ message }}
</div>
var app = new Vue({
el: '#app',
data: {
message: 'Hello Vue!'
}
})
</code></pre>
> Hello Vue!<p>> <i>This looks pretty similar to just rendering a string template, but Vue has done a lot of work under the hood. The data and the DOM are now linked, and everything is now reactive. How do we know? Just open your browser’s JavaScript console (right now, on this page) and set app.message to a different value.</i><p>I guess that didn't take any extra work to setup, since it's a fair assumption the Vue docs are rendered with Vue (!) - but a really easy yet nicely motivating introduction.<p>Obviously this isn't <i>too</i> tricky with 'vanilla' JS, but there's certainly more ceremony involved, and I'm sure the templates can be more complex such that the JS/Vue contrast would be much greater.
Sadly I think the problem of GitLab's sloweness is not the UI framework :(
We are 3-5 users on gitlab ce and use 3GB of memory + 4 CPU cores (vCPUs from XEN) and it still feels slow. Even big Java Applikations use less memory, for that amount of users.
Vue.js is just a better option for every-day development in smaller and mid-sized teams, it gives more freedom working with arbitrary html, which is huge, it also gives easy start - you don't need compiler to use Vue across your legacy codebase. React is a good thing if you are a hard-core fulltime frontend dev in a big team, I guess. That's why potential of Vue.js popularity is ~25-30% of jQuery worldwide usage while React will probably might get 5-10% at most - that's just my impression after using both React and Vue. <a href="http://pixeljets.com/blog/why-we-chose-vuejs-over-react" rel="nofollow">http://pixeljets.com/blog/why-we-chose-vuejs-over-react</a>
Something went terribly wrong in our field ....<p>"On GitLab, our pages would load an average of 20kb on each page load versus the full JavaScript file size of 800kb+."<p>What exatly takes 800kb? I don't see a 3d animation/game on
every gitlab page...<p>IMHO the solution to all this craziness is just generate small mostly-static page quickly and do not have 200 onLoad() functions.
Can someone explain why someone would choose Vue over React (or one of the clones)? When I looked at the docs for Vue it reminded me of my Backbone days.
It's good to see vue.js getting some love. I believe it would be the preferred Web framework these days if it had backing from FB like React does. Too many people fall into the trap of believing a tech is the best just because some big Corp sponsors it. I fell for Angular once for the same reason.
> For example, the profile page could be potentially very light, and there would be no reason for that if someone is linked directly to the profile page; it should load every single piece of Javascript in our project.<p>There are plenty of ways to do that with single Page apps; it's not a great argument against all single page apps, just poorly designed ones.
There's an entire cottage industry of 3 to 5-year old series Bish startups porting Backbone // jQuery apps over to more modern frameworks. We are moving ours over to React at Plangrid (mostly done), Gusto is mostly done with their migration as well. Would be interesting to figure out how many startups are in this category.
Sorry to be negative but GitLab's performance is embarassing :/ It is so slow and it's not clear why. Is this because of rails? Just seems very poorly engineered.
I'm not aware of the performance bottlenecks with GitLab, but are there any plans to speed up the backend as well, such as moving to a faster Ruby implementation?
I'm happy to see Vue in a project that I recognize.<p>To all the people arguing about JSX: Vue 2 supports it.
<a href="http://vuejs.org/v2/guide/syntax.html#ad" rel="nofollow">http://vuejs.org/v2/guide/syntax.html#ad</a>
In webpack.config.js<p>> if (IS_PRODUCTION) {
> config.devtool = 'source-map';<p>Ouch! This will make for a huge bundle. See <a href="https://webpack.github.io/docs/configuration.html#devtool" rel="nofollow">https://webpack.github.io/docs/configuration.html#devtool</a><p>Merge request here: <a href="https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/9028" rel="nofollow">https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/9028</a>
sounds like he never gave vue a try because thats also how i felt before trying vuejs.<p>but once you go vue, you will be very happy you did. i see a lot of ex-react devs who tell similar stories, myself.<p>with the sudden rise of vue and just how fast vue is gaining traction, given the trends and lifecycle of frameworks, i wouldnt be surprised if vue over takes react as de facto of frontend frameworks soon. it really makes development much pleasant and faster.
VueJS is a lightweight version of Angular but has the same pitfalls when its comes to being isomorphic.<p>React is an engineers overkill solution. JSX is bluck.<p>I use mithril.
The escalating abuse of the word "awesome" is like the overuse of dynamic compression in music. When every expression is fever-pitched, there's little room for interesting expression.<p>I also notice that the most shameless abuse of "awesome" seems to come from public-facing software developers, e.g. community managers and the like. It's become some kind of advertisement for a bland, safe, comfortable community where nothing is risked, and competition is frowned upon.<p>All right, I may have gone a little too wide with that, but AUGH, we need to try way harder to increase our expressive range if we're going to be writing articles that aren't exhausting to read.
We at <a href="http://www.reportdash.com" rel="nofollow">http://www.reportdash.com</a> uses Backbone + Backbone Layout Manager + Jade<p>Every time I see a post like this , I feel sad for being less cool. I try to learn a bit of the mentioned cool framework. Then I realise, how awesome my current set up is.
Vue really has the best of both worlds. You can use it like old-style angular or take the component approach. You can just include the 71kb minified script and take off or you can use a build system with components - Take a look at Vue-cli: <a href="https://github.com/vuejs/vue-cli" rel="nofollow">https://github.com/vuejs/vue-cli</a>