Firefox OS Web Apps for Science

Introduction

The Web has become an integral part of our daily life. Some of the reasons for its success are its open nature and the way it enables anyone to get access to knowledge and to create his own projects. The Mozilla community has worked since the early days of the Web to guarantee openness, innovation and opportunity [Moz1].

The Web was created at the CERN to share knowledge between researchers [W3C1]. But although it was invented by scientists, we still have not seen the same positive impact on scientific practice. There are two main reasons that could explain this situation and they are actually related to each other.

The first one is a human problem. Researchers have kept teaching students to write papers for publication in journals and to avoid sharing their detailed results because of competition between academic groups. This means that most scientists ignore how to use tools to publish Web content and do not have the culture of openness and collaboration. Mozilla Science Lab was launched last year to remedy that problem and build educational resources, tools and prototypes for the research community [Moz2].

The second one is more technical. At the beginning of the Web, we had no tools to write scientific documents that could effectively replace the traditional authoring tools for publication on papers. Even if some tools are now available 11For example, the authors used git for version control and LaTeXML to produce HTML pages from LaTeX they are still not used during the early years of undergraduate and graduate courses. In science, there is one extra technical problem: we still lack a cross-compatible way to publish mathematics on the Web despite the publication of the MathML standard in 1998 [W3C2]. The Mozilla MathML Project [Moz3] was launched in 1999 and in a few years, the team produced a good MathML implementation in Gecko together with tools to publish mathematics on the Web. MathML finally became part of HTML5 thanks to Mozilla’s effort [Moz4], but other Web rendering engines still have limited support or even no support at all [Oreilly1]. This means that scientists either stay outside the Web (e.g. exchange only PDF documents) or rely on some workarounds (PNG images, CSS stylesheet, Javascript polyfills 22This is a term used by Web developers to describe code providing a technology that is expected to be supported natively by browsers) to publish mathematical content on the Web, with their inherent limitations and issues.

In recent years, the mobile market has grown considerably and more and more people are using mobile devices to access the Web. Mozilla has been working on Firefox OS, an open-source operating system for these mobile devices that relies exclusively on open standards and in particular Web technologies [Moz5]. Thanks to Gecko’s good support for MathML and HTML5 in general as well as Mozilla’s long experience with community involvement, we now have the opportunity to build a family of scientific Web applications compatible with Firefox OS devices. Some of the early prototypes created by the Mozilla MathML team are presented in this paper.

In a first part, we will review the Web platforms and focus on how the technologies can be used for science. We will present the classical features as well as more recent improvements that have been integrated into Mozilla projects recently such as the Open Type MATH table, WebGL, Web Components or TeXZilla. Some of this work has been made during the crowdfunding project “Mathematics in ebooks” which has also resulted in the creation of a collection of scientific documents using advanced Web technologies [Wang1].

In a second part, we will study how to use these technologies to write Firefox OS Web apps for science. We will give an overview of the general format, which is essentially just an archive of Web pages together with a manifest. We will discuss the big picture for a Math Suite and present three Web apps we started to develop: a math cheat sheet, a note-taking app for math and finally an app to help doing algebraic calculations similar to Epsilonwriter at MathUI’13 [Nicaud2].

The authors have written this paper using collaboration tools like GitHub and all the sources, programs and tools presented here are open. Because PDF format has been requested for submission to the MathUI workshop, we had to provide our demos separately instead of integrating them directly into the document. We try to provide some screenshots in appendix but they will not replace real testing and we strongly invite the reader to test the demos in a Gecko browser. A Web version of that document is also available for online reading.