Racket Weekend is for beginners, but hardly touches the web
Racket Weekend is an introductory short course on Racket. It is designed for working programmers to get started with Racket, and assumes you're brand new to the language. Its 11 lessons focus on bread & butter, everyday programming in Racket.
One of the lessons is about web programming, but the remaining 10 are about other essential ingredients of the overall Racket stew. The web programming it does touch on is just the tip of the iceberg. In keeping with the Racket Weekend let's-keep-it-brief spirit, the coverage of the Racket HTTP server is helpful for getting started, but it is far from comprehensive. (Indeed, the web lesson in Racket Weekend is a compressed version of chapter 1 of Server: Racket.)
Server: Racket dives deep into the web, but isn't for beginners
Server: Racket is an in-depth guide to web programming with Racket's built-in HTTP server. It is intended for web programmers who want to use Racket for their next HTTP API or web site.
But Server: Racket was not written with Racket beginners in mind. It's not an introduction to Racket. If you're new to the language, it's unlikely that Server: Racket, on its own, will be helpful.
Here's how you can get started with Racket, aiming directly toward the web
The Racket Web Kickstarter combines the best of both worlds.
With the help of Racket Weekend, you get basic training in Racket.
Then, take your knowledge up a notch and launch your next web site or HTTP API using the knowledge you learn from Server: Racket.
What is covered?
Racket Weekend delves into the following 11 topics:
Structure of programs and basic syntax In which we begin the excursion by talking about what Racket programs look like, and how they’re structured. Modules. Basic data: numbers, strings, lists, functions.
The read-evaluate-print loop (REPL) A way to work with your programs directly. Easily one of the killer tools offered by Racket (and other Lisps, too).
Structures Making your own structured data types is where you start to structure your complex data in Racket.
Object-oriented programming In addition to vanilla structures, Racket comes out-of-the-box with a powerful object system. Learn the Racket approach to OOP that you can mix and match it with non-OOP programs.
Macros Take the language into your own hands by writing functions that generate bits of language. Macros can greatly simplify your programs, and help open the door to making your own languages, one of Racket’s specialties.
Contracts Your function's value probably satisfies certain properties, assuming that the inputs do. Wrap your functions in contracts—an agreement between called and caller that is enforced by Racket.
Functional programming bricolage Racket encourages functional programming without being doctrinaire about it. Learn about some of the idioms and basic ideas of FP, Racket-style.
Testing Making sure that your functions do what you think they do—writing tests—is bread & butter programming. Racket offers a delightfully straightforward approach to testing that will make you really want to test.
Web programming It’s fine and well to write Racket programs for yourself. But what if you want to expose your work via the web? Racket comes with a built-in HTTP server. Learn how to get started with it.
Documentation Racket comes with it's own language for documentation called Scribble. It makes writing documentation a real pleasure.
Packages Learn how to find and install packages from the Racket community, as well as how to make your own and submit it to the Racket package server.
Server: Racket part
Server: Racket is itself divided into two parts:
Part 1: HTTP à la Racket
Working with HTTP requests and responses entirely within Racket: no external systems, and using only modules that come standard with Racket.
The servlet: In the beginning there was request? → response?
Routes: URL-based dispatching
Working with JSON data
Processing HTML forms
Handling AJAX requests
Part 2: Connecting with external systems
Where we begin to connect to specialized systems running outside of Racket and use specialized packages that aren't included in a standard Racket installation.
Using a relational database (db, sql)
Session management (redis)
Environment variables (dotenv)
JSON Schema validation (argo)
Models (object-relational mapping) (racquel)
Sending HTTP requests (http)
Caching with memcached (memcached)
Database migrations with Phinx
Racket and Docker
A CRUD-style HTTP API
Deploying a Racket site behind a proxy
Choose how much basic training you want
Server: Racket is a single 182-page PDF.
Racket Weekend comes in three editions, allowing you to deepen your basic knowledge before moving on to the web part. The three parts are:
A 100-page PDF ebook.
The ebook and a 26-page workbook (PDF format) containing 45 exercises that ask you to apply what you've learned in the lessons.
The ebook, the workbook, and more than 2 hours of screencasts where I go through nearly all the the exercises in the workbook, showing you how I approach them and giving you a sense of my own Racket workflow.