Slide 1

Slide 1 text

A History of JavaScript on Mobile Jamie Birch

Slide 2

Slide 2 text

The birth of JavaScript Created in 1995 for Netscape Navigator. First ECMAScript spec in 1997.

Slide 3

Slide 3 text

Before the iPhone (pre-2007)

Slide 4

Slide 4 text

HitchHiker (1997) The first mobile browser to implement ECMAScript, by British company SNTC. Ran nearly exclusively on Sony phones with antennae.

Slide 5

Slide 5 text

Pocket Internet Explorer v3.0 (1998) Not actually based on Internet Explorer. Genuine Internet Explorer 10 only landed in Windows Phone 8 (2012).

Slide 6

Slide 6 text

Palmscape v3.0(?) (2000) A made-in-Japan browser for PalmOS PDAs.

Slide 7

Slide 7 text

NetFront v3.0(?) (2002) Deployed on just about every device, including TVs, Kindle (2007-2009; JavaScriptCore from 2010) and Sony PSP (2009).

Slide 8

Slide 8 text

Opera Mobile v3.6 (2000): on PDAs

Slide 9

Slide 9 text

Opera Mobile v6 (2004): on Windows Mobile

Slide 10

Slide 10 text

Opera Mobile v8.5+ (2006): on Nintendo Nintendo DS in 2006 (v8.5). Wii in 2007 (v9).

Slide 11

Slide 11 text

Blackberry Mobile, Web Pro, Vision Mobile Browser, Polaris Browser, Myriad Browser, etc. Surely others

Slide 12

Slide 12 text

After the iPhone (post-2007)

Slide 13

Slide 13 text

Post-iPhone (2007+) … And the second browser war (2004–2017) Browser JavaScript engine Chrome V8 Safari JavaScriptCore Firefox SpiderMonkey Internet Explorer Chakra Opera Futhark, Carakan

Slide 14

Slide 14 text

The de facto standard on iOS: JavaScriptCore • Introduced in iOS 7 (2013) • Zero size (on iOS) • Battery-efficient • Used by NativeScript iOS (2014) • Used by React Native iOS & Android (2015) • What more could you want?

Slide 15

Slide 15 text

Other options V8 • Fast (even with JIT disabled) • Heavy (17.6 MB for v9.7 on Android, without Internationalisation API) • Used for NativeScript on Android (2014) and iOS once JITless (2019) • Used for React Native by Expo (2019) and Microsoft (2020)

Slide 16

Slide 16 text

Other options Hermes • React Native announced Hermes in 2019 • Small (4.4 MB release build on iOS, as of React Native v0.73.7) • Fast (due to AoT compilation) • However, lacks ES6 support, Intl, etc.

Slide 17

Slide 17 text

Other options Remember Node.js? • Node.js ported to mobile on 2017 (swapping V8 for ChakraCore) • Back to V8 once it supported JITless mode (2020) • Fast, with a comprehensive SDK, but heavy • Sadly never really caught on

Slide 18

Slide 18 text

Other options Small runtimes • Ultra-small easily-embeddable runtimes • Duktape (2013) and JerryScript (2014) for seriously weak devices • QuickJS (2019)

Slide 19

Slide 19 text

Abrupt conclusion • JavaScript engines on mobile have gone from individual ventures to a game of Big Tech • Which engine should we use nowadays? • Size: JavaScriptCore (on iOS), Duktape, JerryScript, QuickJS, Hermes • Fast startup: Hermes • Fast execution: V8 • Features: V8, JavaScriptCore, SpiderMonkey

Slide 20

Slide 20 text

Profile Tokyo Engineer at NativeScript TSC Chair @birch_js @shirakaba Thanks for watching! Jamie Birch