I was reading http://stateofjs.com/2016/introduction/#sections and could not avoid noticing that the frameworks or technologies we use are not among the most popular or most liked among the participants of this survey.
Examples: * Frontend frameworks: We use jQuery and OOjs UI. The latter does not appear at all in the list, jQuery is not in the top ten. This question might be biased though on what people perceive as a framework.
* Testing framework: We mostly use qUnit, Cucumber, Selenium. Of these only Cucumber appears in the top 6 and it has very low satisfaction (people who have used do not like it).
* CSS tools: We use plain CSS and Less. Less has considerable lower satisfaction than SASS/SCSS and is less popular.
* Build tools: We don't use these in core to my knowledge, but many extensions seem to use Grunt for running linting tools. Again, Grunt has very low satisfaction compared to other tools.
It is natural, that as large and complex project we do not jump to the latest cool thing. I am not advocating to change tools that work well for us, but I don't remember seeing a public discussion whether they work well or not. Though, I am seeing some changes, for example jscs+jshint being replaced with eslint.
We could possibly go faster or write better software with better tools (of course this would need a careful evaluation). And while doing that we could perhaps lower the barrier for new developers by using something they already know. The topic of how to attract new developers to our movement has been popular lately (for example [1]).
[1] https://phabricator.wikimedia.org/T148911
----
For me one pain point is automated testing of JavaScript code. It seems that testing frameworks, development practices and the way code is written could all be improved to make automated testing easier. Would there be interest in sharing comments how you do this and does what you do work well for you?
-Niklas
On Fri, Nov 18, 2016 at 11:16 AM, Niklas Laxström <niklas.laxstrom@gmail.com
wrote:
- Testing framework: We mostly use qUnit, Cucumber, Selenium. Of these
only Cucumber appears in the top 6 and it has very low satisfaction (people who have used do not like it).
Direct link, for context:
http://stateofjs.com/2016/testing/
I would like to clarify. As far as I know, we use qunit for unit testing frontend javascript code. We use cucumber for end-to-end/acceptance tests, but only in combination with ruby, not javascript.
qunit and selenium are testing frameworks (generally speaking, a tool that has setup, teardown, reporting...) and selenium is a browser driver, something completely different. They are testing tools, and generally used together, but not the same thing.
Some good news, we are experimenting with nodejs+mocha+selenium:
https://www.mediawiki.org/wiki/Selenium/Node.js
Watch that page, I am working on it, more good stuff is coming soon.
For me one pain point is automated testing of JavaScript code. It
seems that testing frameworks, development practices and the way code is written could all be improved to make automated testing easier. Would there be interest in sharing comments how you do this and does what you do work well for you?
Are you interested in unit or end-to-end/acceptance testing? Both? Something else?
Željko
On Fri, Nov 18, 2016 at 11:16 AM, Niklas Laxström niklas.laxstrom@gmail.com wrote:
I was reading http://stateofjs.com/2016/introduction/#sections and could not avoid noticing that the frameworks or technologies we use are not among the most popular or most liked among the participants of this survey.
Examples:
- Frontend frameworks: We use jQuery and OOjs UI. The latter does not
appear at all in the list, jQuery is not in the top ten. This question might be biased though on what people perceive as a framework.
I definitely wouldn't call jQuery a framework. (My rule of thumb is: if you call its functions, it's a library. If it calls your functions, it's a framework.) But it's interesting how low it appears. I guess jQuery provides less functionality over bare JavaScript in modern browsers.
Given that OOjs UI was developed by us, for our needs, and that we've put basically no effort into promoting it (folks have gotten it on https://cdnjs.com/ recently, though), I'm not surprised no one outside of us heard of it.
- Testing framework: We mostly use qUnit, Cucumber, Selenium. Of these
only Cucumber appears in the top 6 and it has very low satisfaction (people who have used do not like it).
QUnit wasn't even in their survey, yet it took second place among the "write-in" votes.
Parsoid uses Mocha (the most popular in the survey) for testing. We experimented with Jasmine (second most popular) in MediaWiki around 2012, but it was abandoned in favor of QUnit.
- CSS tools: We use plain CSS and Less. Less has considerable lower
satisfaction than SASS/SCSS and is less popular.
CSS has high usage and satisfaction scores though. I always said allowing Less was a mistake ;)
Less is more accessible than SASS to developers who know CSS, syntax-wise. SCSS is almost the same though, I honestly don't see why you'd prefer one to the other.
We experimented with SCSS too, for MediaWiki UI styling. It was abandoned in favor of Less in 2013, mostly because we have Less support and SCSS required a build step before committing.
- Build tools: We don't use these in core to my knowledge, but many
extensions seem to use Grunt for running linting tools. Again, Grunt has very low satisfaction compared to other tools.
Just about everything that includes any JavaScript code uses Grunt for linting, including MediaWiki core.
wikitech-l@lists.wikimedia.org