summaryrefslogtreecommitdiff
path: root/book/src/main/scalatex/book/Index.scalatex
blob: e9a8fc8625c86e788c2dd33364dd30d3124be296 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
@sect("Hands-on Scala.js", "Writing client-side web applications in Scala")
  @div(cls:="pure-g")
    @div(cls:="pure-u-1 pure-u-md-13-24")
      @hl.ref("examples/demos/src/main/scala/Splash.scala", "var x")

    @div(cls:="pure-u-1 pure-u-md-11-24")
      @canvas(id:="canvas1", display:="block")
      @script("Splash().main(document.getElementById('canvas1'))")

  @p
    @lnk("Scala.js", "http://www.scala-js.org/") is a compiler that compiles Scala source code to equivalent Javascript code. That lets you write Scala code that you can run in a web browser, or other environments (Chrome plugins, Node.js, etc.) where Javascript is supported.

  @p
    This book contains something for all levels of experience with Scala.js: absolute beginners can get started with the @sect.ref{Intro to Scala.js} and @sect.ref{Hands On} tutorial, people who have used it before can skip ahead to the later parts of the tutorial: @sect.ref{Making a Canvas App} or @sect.ref{Interactive Web Pages}. Intermediate users will find interest in the chapters on @sect.ref{Cross Publishing Libraries} with Scala.js or @sect.ref{Integrating Client-Server}, and even experienced users will find the @sect.ref{In Depth} documention useful.

  @p
    This book does not spend time on pontifying a philosophy or ideology behind Scala.js or Scala. It instead spends its words on hands-on tutorials and in-depth dives into parts of the Scala.js platform, to try and get you acquainted with Scala.js as soon as possible, so you can make your own decisions about its merits or qualities.

  @sect("Intro to Scala.js")
    @Intro()

  @sect("Hands On", "Writing your first Scala.js programs")
    @p
      This half of the book walks you through various facets of the Scala.js development experience. From making your first app, to testing and publishing modules, to writing an integrated client-server application.

    @sect("Getting Started")
      @handson.GettingStarted()

    @sect("Making a Canvas App")
      @handson.CanvasApp()

    @sect("Interactive Web Pages")
      @handson.WebPage()

    @sect("The Command Line")
      @handson.CommandLine()

    @sect("Cross Publishing Libraries")
      @handson.PublishingModules()

    @sect("Integrating Client-Server")
      @handson.ClientServer()

  @sect("In Depth", "Exploring Scala.js")
    @p
      This half of the book dives into a few aspects of Scala.js much more deeply that the hands-on introduction does. It's aimed at someone who has already used Scala.js, and wants to explore the edge-cases, how things work under-the-cover, or why it has been designed in such a way. It's not a formal specification; rather, it's aim is to be a useful reference to read instead of (or in preparation for) digging into the implementation code.

    @sect("Javascript Interoperability")
      @indepth.JavascriptInterop()

    @sect("Deviations from Scala-JVM")
      @indepth.SemanticDifferences()

    @sect("The Compilation Pipeline")
      @indepth.CompilationPipeline()

    @sect("Scala.js' Design Space")
      @indepth.DesignSpace()

    @sect("Java APIs")
      @indepth.JavaAPIs()