This is a bad idea. If you look at the list of advantages to doing this only 1 is user-centric (things would be reactive). The rest are all related to how it makes development easier. When you choose a developer-centric workflow your users will suffer. You only have to look at the numerous server to SPA conversions to see how consistently bad of a choice this tends to be; Reddit is a big and obvious example. They cou…
RFC: Adopt a modern JavaScript framework for use with MediaWiki
151–160 of 293 posts
Re: RFC: Adopt a modern JavaScript framework for use with MediaWiki
#152This thread reads to me like the engineers went into it already knowing they wanted Vue.js, and retroactively doing the necessary mental gymnastics to come up with a rationale. A better justification would have started with "these are our pain points, and this is our evaluation of how these options address our problems." Instead, it's full of weird things like this: >Better support for usage without Webpack/Babel/fro…
But given that, how do we move forward? We shouldn't be stuck in the past forever. We shouldn't probably even be stuck in 2013, when IE11 was released. If their site requires heavy client-side code, and if they want to build it in a fast and reliable way, they have almost no other choice but to think of frameworks.
Re: RFC: Adopt a modern JavaScript framework for use with MediaWiki
#153Earlier quoted context omitted.
> How does removing typescript help you? https://github.com/microsoft/TypeScript/issues Please count the number of open bugs JS tooling is already an enormous jenga tower as it is, with tooling breakages eating a double digit of developer time. Adding typescript on top of that would be the real madness. Typescript will not help us a dime with type checking for most of devs we hire are long past the stage when typing…
You're removing typescript because you think it's creating bugs... You realize you're probably creating bugs yourself by removing typescript manually, which is a thing.. typescript itself can do, by compiling down to JS? This is some prime dailywtf material.
Nothing was said about whether typescript code is more or less buggy, just that the typescript tooling had issue to work with other tooling.
Re: RFC: Adopt a modern JavaScript framework for use with MediaWiki
#154This thread reads to me like the engineers went into it already knowing they wanted Vue.js, and retroactively doing the necessary mental gymnastics to come up with a rationale. A better justification would have started with "these are our pain points, and this is our evaluation of how these options address our problems." Instead, it's full of weird things like this: >Better support for usage without Webpack/Babel/fro…
Personally, I work in React all day and I’m comfortable with it, but I could just as easily use another. There would be minor differences that may annoy to some degree, but it wouldn’t make a huge impact. They all do basically the same thing.
Re: RFC: Adopt a modern JavaScript framework for use with MediaWiki
#155Earlier quoted context omitted.
I'm not a myth. Some of us started JS programming over a decade ago, with no strong typing and IDE to hold our hand and tell us every time you make a mistake. The key is just discipline, good design patterns and a good linter. I see TypesScript as a VERY opinionated linter that affects how you think and write JS. JS is a dynamically typed language, which means you loose a lot of its power and flexability by shoe-horn…
Typescript is as strongly typed as you want it to be. You can easily work with dynamic types and it will fill in where it can.
If you actually use Typescript with a lot of dynamic/unsafe types, in practice you will very quickly end up with a lot of code littered with `any` casts, and those unsafe code blocks will end up (for lack of a better word) infecting the rest of your code and making the compile-time errors much less useful.
For whatever it's worth, my advice is in the instances where you decide Typescript is right for you, commit to it. For the most part, use interfaces, and use strict types that don't get recast a whole bunch.
You don't want Typescript to be guessing too much about your code, because some of those intuitions are fragile and can turn into bugs later if you assume Typescript just knows what you mean. I've had code that works until it gets refactored and Typescript stops being able to intuit what a type is. At that point, going back and retroactively trying to make things more explicit becomes a lot harder and a lot more error prone. The temptation there is to just shortcut the entire process and force Typescript to accept that a type is what you say it is -- and that can lead to very subtle bugs that are hard to track down.
The best Typescript code I've seen is code that embraces the rigidness. When I see a Typescript project with a lot of `any` casts, I start to get kind of nervous.
Re: RFC: Adopt a modern JavaScript framework for use with MediaWiki
#156Re: RFC: Adopt a modern JavaScript framework for use with MediaWiki
#157This thread reads to me like the engineers went into it already knowing they wanted Vue.js, and retroactively doing the necessary mental gymnastics to come up with a rationale. A better justification would have started with "these are our pain points, and this is our evaluation of how these options address our problems." Instead, it's full of weird things like this: >Better support for usage without Webpack/Babel/fro…
> A lot of new technology doesn't work in older browsers But given that, how do we move forward? We shouldn't be stuck in the past forever. We shouldn't probably even be stuck in 2013, when IE11 was released. If their site requires heavy client-side code, and if they want to build it in a fast and reliable way, they have almost no other choice but to think of frameworks.
Wikipedia is essentially a public utility now. It's not their responsibility to move technology forward by forcing their users to upgrade their machines. There's loads of other players that do that already.
> If their site requires heavy client-side code
It doesn't.
Re: RFC: Adopt a modern JavaScript framework for use with MediaWiki
#158> Requirements:
> The framework allows UI elements to be defined in a declarative way
> UI elements created within the framework are reactive (update automatically in response to changes in data or user input) by default
> The framework is open-source, widely used, and has a thriving community (and we anticipate this will continue to be the case for years to come)
> Flexibility: the framework supports the widest-possible range of use-cases (client-side as well as server-side rendering, progressive enhancement as well as full "SPA" usage, build step as well as no build-step etc.)
> The framework is heavily optimized for performance.
Only ONE of those has anything at all to do with the user.
Re: RFC: Adopt a modern JavaScript framework for use with MediaWiki
#159Earlier quoted context omitted.
It is standard HTML in the sense that it's valid HTML, which React JSX isn't, of course. But without the JS runtime it won't do anything, so in the end what's the advantage over React? You can add interactivity without going full SPA with React too after all
It's a subtle but huge difference. In React, using JSX means you can create components and mount them on top of the existing elements on the page. With Vue's HTML templates, the page itself can be the component and everything can become interactive. For example, you can easily output a HTML table from server-side code, then Vue can convert that into a interactive component while using the existing structure and data.…
I am not sure this analysis is entirely correct.
In case of server-side-rendered React pages, React takes the html that arrives from the server and makes it interactive ("hydrates" it, according to the common React community parlance), provided that that DOM generated from that HTML corresponds to the virtual DOM that React generates. It doesn't throw the original DOM away.
Re: RFC: Adopt a modern JavaScript framework for use with MediaWiki
#160Earlier quoted context omitted.
> A lot of new technology doesn't work in older browsers But given that, how do we move forward? We shouldn't be stuck in the past forever. We shouldn't probably even be stuck in 2013, when IE11 was released. If their site requires heavy client-side code, and if they want to build it in a fast and reliable way, they have almost no other choice but to think of frameworks.
> But given that, how do we move forward? We shouldn't be stuck in the past forever. Wikipedia is essentially a public utility now. It's not their responsibility to move technology forward by forcing their users to upgrade their machines. There's loads of other players that do that already. > If their site requires heavy client-side code It doesn't.
The beauty of the internet is that any website is free to decide as they see fit - if they don't want to support IE/Edge/etc then that is their choice.
No website is a 'public utility' bound by laws which dictate what browsers must be supported - that remains a free and open decision.
IE11 is a dead browser, and the sooner it breaks for good, the better.