Live data from Hacker News

RFC: Adopt a modern JavaScript framework for use with MediaWiki

phabricator.wikimedia.org

221–230 of 293 posts

Re: RFC: Adopt a modern JavaScript framework for use with MediaWiki

#221

What does this mean for Wikimedia? Will they extend file uploaders and such with some fancier animations and code or will Wikimedia turn into another one of these God-awful Javascript applications running an HTML renderer inside the browser's HTML renderer? Don't get me wrong, Javascript web applications have their place, but Wikimedia is a website and not a web application. Will Vue and React work on 2G cell phones…

> but Wikimedia is a website and not a web application Check out the /edit mode for any page. It's already a non-trivial JS app.

The edit view that most power users use is definitely not an spa.

There are multiple "editors" in use on wikipedia et al. Visual editor and mobile edior are more SPA-ish, however the old fashioned full of code, editor is still very popular among users.

Disclaimer: work for wikimedia, but not on stuff related to this. My opinions are my own.

Re: RFC: Adopt a modern JavaScript framework for use with MediaWiki

#222
post #217

Earlier quoted context omitted.

This is IMO one of the killer features of vue. Sure, you can plug react components in a progressive way, but you still have to move the HTML into the JS file. And you certainly won't ship the babel behemoth to the client so, no JSX. With Vue, you have a friendly migration path, with a style close to angular 1, if you need. It's also awesome for prototyping or making quick and dirty projects. Evan, every time I use Vu…

> The API is full of little details that show you care (I smile every time I see you can do '.prevent" - "oh right, they though of that!"). I tend to have the opposite reaction. I want a framework with a small API I can keep cached in my head. I don't want to worry about finding the magic switches to get it working the way I want.

Unfortunately, javascript web frameworks build on top of the javascript APIs browsers expose.

If you're starting from a set of APIs that are too complex for someone to keep in their head, it's hard to end up with a much simpler API.

Especially since people do use a large portion of the web's APIs.

For example, "prevent", the thing in the parent comment, is needed if you use javascript to submit your forms, but isn't needed if you have a form that is expected to be submit by the normal browser mechanism.

Webframeworks rarely are prescriptive to the point where they can default in one direction or the other on that point.. and thus we end up with another option.

That repeats many times over and we end up with a large API surface.

Re: RFC: Adopt a modern JavaScript framework for use with MediaWiki

#224
post #217

Earlier quoted context omitted.

This is IMO one of the killer features of vue. Sure, you can plug react components in a progressive way, but you still have to move the HTML into the JS file. And you certainly won't ship the babel behemoth to the client so, no JSX. With Vue, you have a friendly migration path, with a style close to angular 1, if you need. It's also awesome for prototyping or making quick and dirty projects. Evan, every time I use Vu…

> The API is full of little details that show you care (I smile every time I see you can do '.prevent" - "oh right, they though of that!"). I tend to have the opposite reaction. I want a framework with a small API I can keep cached in my head. I don't want to worry about finding the magic switches to get it working the way I want.

I see that a lot in the JS world, "libraries over frameworks" and all that.

The result is that when you go from project to project, people solve the same problems, again and again, in a different way. And create their own custom abstractions, badly tested and documented.

Eventually, the API you could "keep cached in your head" lead to a system you MUST keep in your head because it's very hard to follow how things work and you need to remember it all to be productive. Debugging, extending and onboarding suffers.

Another consequence is that there is still no Django/RoR equivalent in JS. Building any medium size app is a total waste of time, doing the same boiler plate over and over for problems solved 10 years ago.

Everybody has a boilerplate one of course. Nothing is standardized, so the ecosystem is not reusable. Any pluggable library must carefully chosen, then be manually integrated in your own Frankenstein creature, not to mention you end up with a TON of dependencies.

Vue doesn't have a big API. I learned the entire of vue in an afternoon.

It took me 2 weeks to understand react, and much more to actually write decent code with it. Practically, react is very unproductive without something like create-react-app because you have to take so many decisions about it for every new project. Simple things like placing a setInterval()/clearInterval() at the right place, or conditionally settings classes on stuff is not straightforward, anything more complicated must be meticulously though.

Because of this, when I give a training in react and one in Vue, the people from the vue training will immediately be 3 times more productive: their projects move faster, it rarely hit a read block later. I also get way, way less questions in the vue training.

Let's not confuse "barebone API" and "easy API". It's not the same.

Re: RFC: Adopt a modern JavaScript framework for use with MediaWiki

#226
post #187

Team lead of Vue.js here. Clarifying a few points being raised in this thread: - This does not mean Wikipedia is becoming an SPA. One of the reasons they picked Vue is because Vue can be used to progressively enhance a statically rendered page (just like jQuery, but with a declarative development paradigm), and it allows you to do so without a build step (while keeping the going-full-build-step option open). - Wikime…

As long as there is no accepted non-vue replacement for the server side rendering technology, one has to assume that WP will replace php based rendering with Vue templates on a large scale, even for the static content. However, Vue templates require usage of node.js. I couldn't find any standalone serverside vue template parser/renderer written in something like C++, Rust or Go. So if they adopt Vue, they'd still be…

[deleted]

Re: RFC: Adopt a modern JavaScript framework for use with MediaWiki

#227

Earlier quoted context omitted.

> but Wikimedia is a website and not a web application Check out the /edit mode for any page. It's already a non-trivial JS app.

The edit view that most power users use is definitely not an spa. There are multiple "editors" in use on wikipedia et al. Visual editor and mobile edior are more SPA-ish, however the old fashioned full of code, editor is still very popular among users. Disclaimer: work for wikimedia, but not on stuff related to this. My opinions are my own.

The texarea is also currently the default, at least on English edition.

Re: RFC: Adopt a modern JavaScript framework for use with MediaWiki

#228

Hi HN – I'm one of the authors of this proposal. I'd like to clarify a few points here: * Wikipedia is not becoming an SPA * Wikipedia is not dropping support for non-js users * This proposal is not about changing our current browser-support matrix[1] (which includes IE11 as a first-class target; Vue.js ecosystem still supports IE 11) * This proposal is about changing the way we develop enhanced, JS-only features acr…

For context about OOUI and OOjs: https://www.mediawiki.org/wiki/OOUI/Using_OOUI_in_MediaWiki, https://www.mediawiki.org/wiki/OOjs

A deeper dive presentation into the move into OOUI (which started meaningfully plotting and happening ca. 2013) from storing state in DOM elements, and challenges implementing it: https://www.youtube.com/watch?v=T_CUN2o4faw

Re: RFC: Adopt a modern JavaScript framework for use with MediaWiki

#229
post #29

Earlier 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…

Sounds like you need to raise the bar on hiring if learning static typing is an impediment. I recommend less JS monkeys and looking for actual engineers.

Their 6+ year engineers are getting paid less than many interns do in America according to said poster. The big tech monopoly means that hiring good senior engineers is nearly impossible. :)

Re: RFC: Adopt a modern JavaScript framework for use with MediaWiki

#230
post #160

Earlier quoted context omitted.

> 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.

It's our collective responsibility to decide what user agents work with what platforms. 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 brea…

You seem to completely have missed what the foundation is about.
Post reply on HN