Live data from Hacker News

RFC: Adopt a modern JavaScript framework for use with MediaWiki

phabricator.wikimedia.org

91–100 of 293 posts

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

#91

Earlier quoted context omitted.

I'm also avoiding typescript as much as I can, but not because typescript itself, but because of how typescript projects tends to be outlined. Lots of the projects are way over-engineered for where they are on the timeline and typescript makes people reach for classes too early. Seeing the same with vanilla JS projects now too when `class` been introduced. Instead I'm stricly using ClojureScript as the tooling is rea…

I’m spinning up a few new projects at the moment, and was sooo close to doing them in ClojureScript. I ended up going with JavaScript, Preact, and Rollup just because of familiarity allowing me to move faster. That, and my build times are sub-second, something that was not true of my previous Webpack and typescript projects. My total application bundle size is still smaller than React alone. ClojureScript is really g…

> How are your production bundle sizes?

Application I'm working on is not that complex, 20 something different pages with multiple sub-sections themselves, bundle ends up being 1.5MB or something like that, 300kb gzipped. Main weight comes from using multimethods which pulls in a lot of cljs.core, so not using that would make it a lot smaller.

Also gonna start splitting the bundle per page but haven't yet.

> Are you using shadowcljs? If not, what tooling are you using?

No, using figwheel-main, project was started before shadowcljs starting to look as good as it looks today. Starting a project today I would probably look into shadow-cljs first. But we're not using any npm dependencies, but shadow-cljs seems to have better introspection properties than figwheel-main (like seeing partitions of bundle size easier, we're currently doing it by looking at the sourcemaps...)

> Also, what editor?

Using vim + fireplace which been working really well for me.

> Calva wasn’t up to snuff. I wonder if that’s changed

Haven't used Calva myself but tons of people in the community swear by it, so I'm thinking it's been improving since the last time you tried it.

I'm not sure when was the last time you tried Calva but Calva been in at least two Clojurists Together (https://www.clojuriststogether.org/) funding cycles, so if you tried it before mid-2019, give it a try again (and report back :) )

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

#92
post #79

Earlier quoted context omitted.

>Typescript will not help us a dime with type checking for most of devs we hire are long past the stage when typing errors are a thing for them. Who are these mythical people? Do they just magically decipher what interface an argument conforms to? What methods are accessible on a returned result from any random library they're using?

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.

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

#93

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…

I'm a React fanboy, but I have to admit, the Svelte performance and code size is impressive.

Maybe that would be a feasible way to get a modern developer experience without the bloat?

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

#94
post #44

Can someone give a quick code example for the follwing? The framework allows UI elements to be defined in a declarative way How can you use Vue so that what you do is more declarative then when using a template engine like handlebars?

I believe the templating is what's declarative, here. For instance, in Vue you can insert logic such as for loops, conditionals, event listeners, two-way data binding and so on right in the template with directives (HTML attributes).

    
Instead of an imperative JavaScript for loop.

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

#95

Please don't make Wikipedia a JS monstrosity :(

Contemporary framworks all allow for server side rendering and build time rendering.

Sure, you won't get 100% of the goodies, if you disable JS, some stuff simply can't be done with HTML/CSS, but at least the important parts would still work.

Also, solutions like Svelte are rather fast and small, compared to Vue/React but also compared to previously known small frameworks like HyperApp.

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

#96
post #23
post #5

I've loved Vue for a long time, worked two years with it almost daily, but right now I avoid it as much as I can, as I can't stand working with JavaScript without TypeScript. The TypeScript support in the current version of Vue is crap, and the simplest things, such as creating a (typed) component library, are hard and require numerous hacks. If I were to use something that lacks TypeScript support, it would be Svelt…

A reverse situation here. I deal with strict no typescript policy, so besides a problem of finding typescript devs, we have a problem of having to "de-typescript" a lot of 3rd party code. Typescript has a lot of adoption within with ex-Java devs, and with that comes a lot of "Java-think." It's hard for these people to adapt to not doing things "the Java way" and vice versa. And another part of the problem is that peo…

I agree with this.

TypeScript makes Java and .NET developers think they understand the language and platform and causes a lot of irrelevant design to be copied over into the JS world where it mutates and becomes absolutely poisonous.

Just look at Angular where the boilerplate and crazy dependency injection completely surpasses anything seen in the Java / .NET world.

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

#97
post #88

Earlier quoted context omitted.

Apologies, I a bit confused. SPA stands for Single-Page Application, does it not? So if you have a single page that works as an application, it is a SPA, no? I understand the desire to use webkit, Typescript, and so forth to develop modern apps, I'm just confused at why Vue in a stand alone page delivered by ftp or usb drive isn't a "full" SPA

You can mix and match traditional server-rendered content and JS framework (in this case Vue)-rendered components on the same page (not considering SSR here). Going full SPA means using the latter exclusively.

You can easily do that with React too. In fact, that's how Facebook first used it, using it for just the chatbox (or something) with the rest of the page as it was.

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

#98
I have been donating to Wikimedia for years, but have sent an email to let them know that I will stop the day Wikipedia becomes inaccessible without JavaScript.

Wikipedia is a unique project because of how reliable it is -- in both its merit and its tech. It would be sad to see it go.

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

#100

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…

The proposal stresses the need for Server-Side Rendering so I suppose they're thinking about this.
Post reply on HN