Skip to content

Latest commit

 

History

History
77 lines (64 loc) · 3.27 KB

introduction.md

File metadata and controls

77 lines (64 loc) · 3.27 KB
title type description num previous-page next-page toolkit-index
Introduction
chapter
Introducing the Scala Toolkit tutorials
1
testing-intro
title description icon link
Tests
Testing code with MUnit.
fa fa-vial-circle-check
/toolkit/testing-intro.html
title description icon link
Files and Processes
Writing files and running processes with OS-Lib.
fa fa-folder-open
/toolkit/os-intro.html
title description icon link
JSON
Parsing JSON and serializing objects to JSON with uPickle.
fa fa-file-code
/toolkit/json-intro.html
title description icon link
HTTP Requests
Sending HTTP requests and uploading files with sttp.
fa fa-globe
/toolkit/http-client-intro.html

What is the Scala Toolkit?

The Scala Toolkit is a set of libraries designed to effectively perform common programming tasks. It includes tools for working with files and processes, parsing JSON, sending HTTP requests, and unit testing.

The Toolkit supports:

  • Scala 3 and Scala 2
  • JVM, Scala.js, and Scala Native

Use cases for the Toolkit include:

  • short-lived programs running on the JVM, to scrape a website, to collect and transform data, or to fetch and process some files,
  • frontend scripts that run on the browser and power your websites,
  • command-line tools packaged as native binaries for instant startup

{% include inner-documentation-sections.html links=page.toolkit-index %}

What are these tutorials?

This series of tutorials focuses on short code examples, to help you get started quickly.

If you need more in-depth information, the tutorials include links to further documentation for all of the libraries in the toolkit.

How to run the code?

You can follow the tutorials regardless of how you choose to run your Scala code. The tutorials focus on the code itself, not on the process of running it.

Ways to run Scala code include:

  • in your browser with Scastie
    • pros: zero installation, online sharing
    • cons: single-file only, online-only
  • interactively in the Scala REPL (Read/Eval/Print Loop)
    • pros: interactive exploration in the terminal
    • cons: doesn't save your code anywhere
  • interactively in a worksheet in your IDE such as IntelliJ or Metals
    • pros: interactive exploration in a GUI
    • cons: requires worksheet environment to run
  • in scripts, using Scala CLI
    • pros: terminal-based workflow with little setup
    • cons: may not be suitable for large projects
  • using a build tool (such as sbt or mill)
    • pros: terminal-based workflow for projects of any size
    • cons: requires some additional setup and learning
  • using an IDE such as IntelliJ or Metals
    • pros: GUI based workflow for projects of any size
    • cons: requires some additional setup and learning

These choices, with their pros and cons, are common to most programing languages. Feel free to use whichever option you're most comfortable with.