Live data from Hacker News

Our long term plan to make GitLab as fast as possible with Vue and Webpack

about.gitlab.com

221–230 of 304 posts

Re: Our long term plan to make GitLab as fast as possible with Vue and Webpack

#221

Earlier quoted context omitted.

Are there any specific reasons you can point to, rather then a blanket statement?

I'll take a stab, although I don't share the same absolute stance. I've run the gambit when it comes to types of front-end projects. The React community has more focus on scaling React for large teams and companies. This isn't to say Vue can't do any of this, but there is a clear focus in the React community. I need to do isomorphic rendering because of SEO, there is a lot of React documentation on that and very litt…

A bit OT but just FYI: I think you mean gamut, not gambit.

Re: Our long term plan to make GitLab as fast as possible with Vue and Webpack

#222
post #83

Earlier quoted context omitted.

Two-way binding I guess. Once we get used to one-way binding and immutable data structures, anything else feels indeterministic. (Note: Just guessing what the commenter might have written. I'm a long-term VueJS user)

This. I just had a look at Vue and everything looked fine so far, until they started with two-way-bindings. Two-way-binding failed already long before the web and SPAs. Many desktop GUI frameworks provided two-way-binding, but this concept constantly failed to deliver on its promises. Not sure why frameworks keep repeating this well-known anti-pattern. I'd prefer framworks like React or Riot any time over two-way-bin…

Vue.js 2 uses 1-way data binding by default

Re: Our long term plan to make GitLab as fast as possible with Vue and Webpack

#223

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. I also am strongly against string…

When a react component tree has more than 3 level height, react component's lifecycle callbacks start getting crazy unmanageable. Mounting, unmounting, rendering, props receiving, updating etc, these callbacks' calling orders open to bad rendering practice(e.g. unnecessary render, unexpected calls), that's why people avoid putting logics in there. It claims to be self-contained but parent-child communication breaks i…

I know what you mean with regard to event handlers being passed down to children and children of children and so on and the complexity that can bring. I haven't used redux, but I understand it as being an attempt to simplify that kind of problem.

I haven't written any higher order components myself, unless you consider parameterizing event handlers in props to be higher order.

Re: Our long term plan to make GitLab as fast as possible with Vue and Webpack

#224
post #141
post #77

Earlier quoted context omitted.

Then you should look at Polymer. It is just DOM nodes (custom elements_, you can however compose complex applications with it without any trouble. I feel its very straightforward way to build applications and most parts of it are handled by browser API's. It seems like a perfect middle ground between react/angular 2/vue - and you can still throw in redux or uniflow-polymer if you want.

The major problem with polymer is that it does not support npm. It seems polymer 2 will support yarn. but until then, it is a no go.

whats the problem with using bower (apart being "legacy"), it suddenly stopped working?

Not all packages are on npm, i use mix of npm and bower without issues. When the JS community comes up with better npm will people stop using packages on npm?

Re: Our long term plan to make GitLab as fast as possible with Vue and Webpack

#225
post #180
post #177

Earlier quoted context omitted.

I'm assuming in the web dev world "legacy codebase" is used very loosely here. In my company, "legacy codebase" is referring to C code from the 70s that is still ticking today.

That's right, in the web dev world "legacy codebase" is 3 or 4 years old, created by a previous team who all quit once they finished the rewrite of the previous "legacy codebase".

3 or 4 years? Seems generous. Lately it seems anything more than a year old is "legacy" or "technical debt" because the team is now using other frameworks or libraries.

Re: Our long term plan to make GitLab as fast as possible with Vue and Webpack

#226
post #192

Earlier quoted context omitted.

DOM.div() vs seems like a bad example. IMHO, when you get an element with tons of event handlers and conditional classes, or when you have a deep chain of ternaries that's where angled bracket syntax starts to become unwieldy. The className thing is a big deal too, in my opinion. Preact and Mithril do what you would expect, and perf doesn't suffer, so why can't React/JSX normalize it as well?

Ternary operators should never be nested, whether you're using JSX or not. If you have that many conditionals you should use variables and/or decompose the optional pieces into sub-components. Pretty much any time you have a tag that has a huge number of attributes, it's a smell that you need to decompose something. Variable assignment is the simplest answer, which takes advantage of the fact that null or undefined v…

    > Regarding class vs. className: class is a reserved word
    > in JS. It's not really a perf thing, it's the fact that
    > JSX was intended as a very simple transform. If JSX used
    > class instead of className, the transpiler would need to
    > be contextual since "class" would sometimes mean "css
    > class" and sometimes "JavaScript class".
I don't think React should have used `class` instead of `className`, but this isn't the reason.

    
compiles to

    React.createElement("foo", { className: "bar" });
It could have just as easily have been that

    
compiles to

    React.createElement("foo", { 'class': "bar" });
as far as JSX is concerned (or even without the quotes in an ES5 world).

Re: Our long term plan to make GitLab as fast as possible with Vue and Webpack

#227

Earlier quoted context omitted.

JSX frustrates me. When did we suddenly start thinking syntax was desirable again? When did the complexity of combining markup syntax and a programming language become a good idea? Why are we forcing this crazy complexity into every language and every IDE / code editor out there? I much prefer react with standard functions e.g. var element = DOM.p({id : "thing"}, DOM.div(), DOM.div()); You can use an API like this in…

Frankly, yes it does hurt readability. I used to have your mindset and you're making the assumption that what looks okay when creating one single element will look fine when nesting dozens (which react excels at). JSX is well defined and does not support any of HTML's looseness. It's predictable. It makes the code easier to follow. And if you don't want to use it, you don't have to. I see no issue.

The time I spent fixing logic and layout bugs on several build-a-dom projects has taught me this. For the same reason using CSS Selectors to crawl the DOM is superior. When it doesn't work, how hard is it to spot the bug? If you're working on the front end you need to look things up roughly the same way for style and behavior, and emit them roughly the way the browser will see them when it's time to look them up.

And yet I'm still in the anti JSX camp. I think it has something to do the gear switching that comes with opening up the mixing of data and logic but I can't articulate it farther than that,

Your brain can only juggle a handful of bits of data at a time. If you see someone doing something that looks like this doesn't apply to them, it's most likely because they've memorized the code. And to memorize code, that means it can't change much or very often. Which makes them dangerous. They have a bias toward maintaining the status quo, no matter how awful it is. Don't be that person.

Re: Our long term plan to make GitLab as fast as possible with Vue and Webpack

#228

Earlier quoted context omitted.

JSX frustrates me. When did we suddenly start thinking syntax was desirable again? When did the complexity of combining markup syntax and a programming language become a good idea? Why are we forcing this crazy complexity into every language and every IDE / code editor out there? I much prefer react with standard functions e.g. var element = DOM.p({id : "thing"}, DOM.div(), DOM.div()); You can use an API like this in…

Frankly, yes it does hurt readability. I used to have your mindset and you're making the assumption that what looks okay when creating one single element will look fine when nesting dozens (which react excels at). JSX is well defined and does not support any of HTML's looseness. It's predictable. It makes the code easier to follow. And if you don't want to use it, you don't have to. I see no issue.

[deleted]

Re: Our long term plan to make GitLab as fast as possible with Vue and Webpack

#229

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?

We have no plans to move to another Ruby implementation, primarily because Ruby itself is not yet a bottleneck for us.

Re: Our long term plan to make GitLab as fast as possible with Vue and Webpack

#230
post #220

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. I also am strongly against string…

In support of this argument - The HTML snippet embedded in `let titleView = " Hello "` can only be parsed as a string. This means no tooling support - no linting, no tags that autoclose, no code formatting. But if you have a distinct syntax for XML, the parser can clearly figure out what the strings are, and what the tags are. First class support for XML is, after using JSX, just so obvious in hindsight if you're bui…

Scala introduced first-class support for XML through a DSL a decade ago. I believe the feature has been phased out because it was useless. I've personally never found it useful either.
Post reply on HN