Live data from Hacker News

How we do Vue at GitLab: one year later

about.gitlab.com

61–70 of 208 posts

Re: How we do Vue at GitLab: one year later

#61

React made me feel stupid, Vue made me feel smart. So I use Vue. I came at it as a long-time jQuery dev with Angular 1 experience.

In general it's best to push your comfort boundaries. It's called learning. I'm not saying React is better than Vue (I honestly think they are very similar). Just that picking a technology based on whether it challenges you or not is probably not the best strategy.

I strongly disagree. Parent poster specifically states 'as a long time jquery dev...', so their objectives almost certainly do not aline with those of a student. Indeed, "picking a technology based on whether it challenges you or not..." Has almost no value at all for a prudent, real-world dev making real world software.

Re: How we do Vue at GitLab: one year later

#62
post #3

> We discovered that VueX makes our lives easier. If you are writing a medium to large feature, use VueX. If it's a tiny feature, you might get away without it. I feel like this is Vue starting to get the React treatment. React was (and still is!) a very simple library until people realized they needed to do fancy things to make complex applications manageable. Redux came out, everyone fell in love with it, and React…

It avoids it by design. Most of my vue project only uses vue. Not even webpack. Just the static vue file. I don't even have that many components because view doesn't force that on me.

It's good enough and fast enough as it is for most medium side projects.

And the awesome thing is that you can scale it up for this one big project you need it for.

Re: How we do Vue at GitLab: one year later

#63
post #12
post #3

> We discovered that VueX makes our lives easier. If you are writing a medium to large feature, use VueX. If it's a tiny feature, you might get away without it. I feel like this is Vue starting to get the React treatment. React was (and still is!) a very simple library until people realized they needed to do fancy things to make complex applications manageable. Redux came out, everyone fell in love with it, and React…

Funny thing is, Vue wihtout extras is more complex than React without extras.

Nope. Nope. Nope.

Trainer here. I train in React and in Vue.

My students do 3 times the work with raw vue than in raw react. Every one of them. All the time.

It's not even on the same map.

Re: How we do Vue at GitLab: one year later

#64

I would strongly disagree that it is ok to use jQuery with Vue. I mean sure, it's ok in that most of the time it isn't going to hurt or break anything, at least if you are just using it to query elements from the DOM. However, I would argue that is not ok in that it should never be necessary and it's use would be a code smell to me and indicate that the code in question is likely not using Vue properly. I suspect it…

Vue and jquery works ok together.

First, you can gradualy migrate from jquery dom to vue. As both are very light, having both is not bloated.

Plus, you need something to do ajax anyway, and if your site uses it, why add axios as well?

Actually I'd say that vue is probably the best tech if you want to progressively improve a legacy jquery heavy website instead of doing a complete rewrite.

Re: How we do Vue at GitLab: one year later

#65
post #5
post #3

> We discovered that VueX makes our lives easier. If you are writing a medium to large feature, use VueX. If it's a tiny feature, you might get away without it. I feel like this is Vue starting to get the React treatment. React was (and still is!) a very simple library until people realized they needed to do fancy things to make complex applications manageable. Redux came out, everyone fell in love with it, and React…

When did new react developers start learning redux? From my experience that just isn't true.

If you are working with React in a professional setting, Redux is practically the default choice for state management. If you are building something in a professional setting with React, there's a pretty good chance it's complex enough that it needs a state management library like Redux to do well.

Almost everyone I know learning React in a professional capacity ends up having to learn Redux at much the same time, my experience is very much the opposite.

Re: How we do Vue at GitLab: one year later

#66
post #61

Earlier quoted context omitted.

In general it's best to push your comfort boundaries. It's called learning. I'm not saying React is better than Vue (I honestly think they are very similar). Just that picking a technology based on whether it challenges you or not is probably not the best strategy.

I strongly disagree. Parent poster specifically states 'as a long time jquery dev...', so their objectives almost certainly do not aline with those of a student. Indeed, "picking a technology based on whether it challenges you or not..." Has almost no value at all for a prudent, real-world dev making real world software.

The problem is experience in jQuery and even Angular 1 are not relevant to the issue of why React (or even Vue for some) may be perceived as difficult. They use a very different model.

Emacs was very difficult for me when I first started learning it. It was much more difficult than using a simple text editor (and this was with 10 years of programming experience)! Yet I persevered and you know what? After giving it some time and learning it properly I found myself vastly more productive with the tool.

Some things don't lend themselves well to immediate gratification. If the OP provided even a hint as to why React was more difficult for him I'm guessing it's not something with React but rather that he was using two completely different state management solutions.

Re: How we do Vue at GitLab: one year later

#67
post #3

> We discovered that VueX makes our lives easier. If you are writing a medium to large feature, use VueX. If it's a tiny feature, you might get away without it. I feel like this is Vue starting to get the React treatment. React was (and still is!) a very simple library until people realized they needed to do fancy things to make complex applications manageable. Redux came out, everyone fell in love with it, and React…

I think one reason for that steep learning curve might be that many aspects of React, namely component lifecycles and state management within components, are abstracted away or simply moot once you start managing state with Redux. Also, while the two libraries work great together (I consider Redux indispensable for new React apps), they aren’t really similar as far as library design and patterns are concerned. Finally, there is something to be said about the mental overhead added by Redux middleware. If you’re dispatching async actions, you’re probably using Redux Thunk. If your app has forms, you might be using Redux Form (I honestly avoid it because its own abstractions and Field components end up getting in my way). Ultimately, the process of learning how to use all of these tools in tandem can feel somewhat disjointed, especially when you’re also integrating them with other parts of the web stack, modern and in some cases legacy.

I’ve never used Vue but I’m also curious to see how it and VueX fares in this regard.

Re: How we do Vue at GitLab: one year later

#68

I would strongly disagree that it is ok to use jQuery with Vue. I mean sure, it's ok in that most of the time it isn't going to hurt or break anything, at least if you are just using it to query elements from the DOM. However, I would argue that is not ok in that it should never be necessary and it's use would be a code smell to me and indicate that the code in question is likely not using Vue properly. I suspect it…

AFAIK, their old codebase was full of jQuery and they are replacing some parts with Vue, hence they use both. They might not have used jQuery at all if they were starting from scratch.

Perhaps not, but there is no reason to use jQuery within the Vue components. Doing so now means that it is basically there to stay. That may be acceptable, but it is definitely unnecessary.

Re: How we do Vue at GitLab: one year later

#69
post #3

> We discovered that VueX makes our lives easier. If you are writing a medium to large feature, use VueX. If it's a tiny feature, you might get away without it. I feel like this is Vue starting to get the React treatment. React was (and still is!) a very simple library until people realized they needed to do fancy things to make complex applications manageable. Redux came out, everyone fell in love with it, and React…

> Redux came out, everyone fell in love with it

Not me.

Re: How we do Vue at GitLab: one year later

#70

I would strongly disagree that it is ok to use jQuery with Vue. I mean sure, it's ok in that most of the time it isn't going to hurt or break anything, at least if you are just using it to query elements from the DOM. However, I would argue that is not ok in that it should never be necessary and it's use would be a code smell to me and indicate that the code in question is likely not using Vue properly. I suspect it…

Vue and jquery works ok together. First, you can gradualy migrate from jquery dom to vue. As both are very light, having both is not bloated. Plus, you need something to do ajax anyway, and if your site uses it, why add axios as well? Actually I'd say that vue is probably the best tech if you want to progressively improve a legacy jquery heavy website instead of doing a complete rewrite.

Looks like I misread. They ultimately reached the conclusion that using jQuery was not ok. Good for them.

I would argue as well that AJAX requests don't belong inside Vue components. They belong in services and those services should ideally be behind the Vuex store, but there is nothing wrong with not using Vuex.

If we were just talking about using jQuery for AJAX given that you already were using it, then sure that's fine, use it instead of adding something else like axios. From the article what was being proposed was using it to query the DOM. There is no use case for that with Vue.

Post reply on HN