JavaScript:
Who, Where, What, Why and Next
Read these slides on your own device:
Web Directions Code Leaders, 2019-06-19
Who is this guy?
Laurie Voss
Chief Data Officer & co-founder, npm Inc.
@seldo
This is a talk about microfrontends
Not really
What are we talking about?
- Who are we?
- Where are we deploying?
- What are we using?
- Why are we doing this stuff?
- Next: what's in the future?
What are you
getting out of this?
- A warm fuzzy feeling
- A thing to migrate away from
- A new exciting thing to learn
How do I know this stuff?
- npm Registry download stats
- The npm 2018/2019 user survey
- The State of JavaScript Survey 2018
State of CSS
Disclaimer 1:
This talk contains both fact and opinions
Please do not get mad about graphs.
Disclaimer 2:
"Most popular" is not the same as "best"
But popularity remains a useful metric.
Disclaimer 3:
I swear a lot
WHO
npm: the biggest software registry, ever
JavaScript: biggest on GitHub
JavaScript: biggest on Stack Overflow
JavaScript is the most popular programming language ever
JavaScript developers are getting more sophisticated
JavaScript developers are getting more experienced with npm
~99%
of JavaScript users use npm
More experienced users care more
about best practices
We care about security more
npm audit
and npm audit fix
335,775,921 audits in the last 30 days
npm Enterprise
- yourco.npme.io
- Share and discover internal JS
- Full search
- Package pages and online docs
- SSO (Google, Okta, Auth0, etc.)
- Security and compliance reporting
29% of JavaScript developers can't use certain licenses
WTFPL:
it's funny but nobody likes it
25% of JavaScript devs don't consider it their primary language
Other primary languages for JavaScript devs
WHERE
97% of JavaScript developers write code for browsers
Desktop web vs. mobile web
Native apps
What does "native" mean exactly?
Native apps
Native desktop apps
- 26% of developers write native desktop apps
- 21% of developers say they use Electron
- What do the other 5% use?
Native mobile frameworks
Deploy targets
WHAT
The registry always grows
Everything in the registry grows
Share of Registry
React
has conquered
the web
63% of JavaScript developers use React
47% of JavaScript devs write React some or most of the time
AngularJS and Angular
are totally different things with the same name.
37% of npm users write AngularJS or Angular
- 20% AngularJS (1.x)
- 29% Angular (2.x+)
27% of JavaScript devs use Vue
Web components
We're just not that into them.
Back-end frameworks
...remember them?
Server Side Rendering
Everything old is new again.
Doesn't this seem kind of familiar?
Express still dominates
8% of JavaScript devs use Gatsby
9% of JavaScript devs use Next.js
5% of JavaScript devs use Nuxt
Nest.js: it's a thing!
GraphQL
GraphQL: get on board
The hottest trend in JavaScript
is not writing JavaScript
63% of JavaScript devs use TypeScript
36% of JavaScript devs write TypeScript some or most of the time
The @types scope
WebAssembly:
use any language on the web
WebAssembly on npm
The call is coming from inside the house.
WebAssembly: early days
WHY
Team A | Team B
Why is JavaScript so popular?
Empirical Analysis of Programming Language Adoption
Meyerovich & Rabkin, 2013
The inescapable pull of JavaScript libraries
The reluctant JavaScripters
This happened already
TypeScript is being driven by reluctant JavaScripters
WebAssembly frees the reluctant from JavaScript
Don't fear the WASM
Why is React so popular?
React: the component model the web always wanted
React component libraries
React hooks
React: its own gravity well?
But... Vue
The back-end:
a whole new world
Is letting React take over
a good idea?
NEXT
Right now: tink
Run "npx tink" to try it yourself!
Soon: a component-based future
Don't fear the app builder
WebAssembly
Native apps
"With great power comes great responsibility"
– Gandalf, probably?
I ❤️ you
@seldo
laurie@npmjs.com
Slides available:
JavaScript: Who, Where, What, Why and Next
By seldo
JavaScript: Who, Where, What, Why and Next
- 6,260