summaryrefslogtreecommitdiff
path: root/book/src/main/scalatex/book/Index.scalatex
blob: 2ac629b6e151d109e7aeb39a36fd28350b0eb760 (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
@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
        @a("Scala.js", href:="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 Introduction and Hands-on tutorial, people who have used it before can skip ahead to the later parts of the tutorial, building a canvas app or dynamic HTML page. Intermediate users will find the chapters on cross-publishing a Scala.js library interesting, and even experienced users will find the In-depth Documention useful.

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

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

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

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

    @sect("Cross-platform Modules")
        @handson.CrossModules.template

    @sect("Integrating Client and Server")
        @handson.ClientServer.template

@sect("Scala.js in Depth", "Exploring Scala.js")
    @sect("Javascript Interoperability")
        @indepth.JavascriptInterop.template

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

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

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