What this book covers
Chapter 1, Julia Programming Overview, reviews the Julia programming language in order to prepare you for web development with Julia. We’ll work with Julia in the REPL and with the Visual Studio Code editor, which is how we’ll build web apps in the rest of the book. Then, we will look at the types, flow controls, functions, and methods that you’ll need in any Julia app.
Chapter 2, Using Julia Standard Web Packages, delves into what Julia’s standard library and JuliaWeb have to offer for building web apps. First, we will look at working with the Sockets package and building two versions of a TCP echo server. Then, we will examine how to work with the WebSockets package, followed up with a thorough discussion of the HTTP package. Next, we'll build several web server examples and see how to route incoming requests. Finally, it will all come together when working with JSON data using a REST web server.
Chapter 3, Applying Julia in Various Use Cases on the Web, examines what the Julia community has built over the past 5 years in the way of tools to build web-based applications. To make a static website, Franklin is available to you as a valuable choice. If you need to build a cross-platform Electron-based GUI app, you can combine WebIO, Blink, and Interact to accomplish this. If your next project is to build a web dashboard, look no further than Dash for Julia. We will also discuss the architecture of microservices, the current state of WASM in the Julia ecosystem, and which cloud platforms are readily available for Julia. Finally, you will get an overview of all the mature web frameworks in Julia, giving you a better idea of which to apply when and gain a quick start to working with any of them.
Chapter 4, Building an MVC ToDo App, guides us through creating a complete application in the Genie Julia web framework, which you can take as a blueprint for starting your own project. You’ll learn how to generate a new MVC project and its model, how to create views to display the data, and how to route the browser requests through a controller function to its intended view. You’ll also see how you can add data validation functions and set up automatic testing for your app.
Chapter 5, Adding a REST API, enriches our to-do application with a REST API. You’ll learn how to code the CRUD functions for this API. The REST API exposes your data to the world – that’s why testing and documenting are especially important. You’ll learn how to write these specific tests, and how to document the API using Swagger.
Chapter 6, Deploying Genie Apps in Production, discusses the different possibilities for deploying Genie apps. First, we’ll see how to customize a production environment and then learn how to package our app in a Docker container, how to set up a repository on GitHub with the automatic execution of tests (as in, CI), and how to deploy our app in a Docker container using Git. We’ll also learn how to improve the app’s startup by using PackageCompiler.jl
. Finally, we will explore an alternative method of deployment using Heroku.
Chapter 7, Adding Authentication to Our App, takes us through adding an authentication layer to our app, so that only registered users will be able to use it, and a user will only see their own to-do items. Also, we will expand our tests for this new functionality.
, Creating an Interactive Data Dashboard, explores using the Genie Builder tool to build a dashboard to-do application. We’ll learn how to generate mock data, create and visualize a time series, and make various types of charts and filters.