Chapter 6
Building with Grit
A real application, feature by feature.
By the end of this chapter you'll be able to
- What we are building
- Step one: the project
- Step two: the resources
- Step three: the rule, in the only place it can live
- Step four: the endpoint
Lessons
Module: Building with Grit
Project: a task tracker, end to end
Part IV explained the pieces.
Relationships, and the forms they generate
A model on its own is a spreadsheet.
Project: a publication, from draft to public page
Every project in Part V so far has been behind a login.
Money, dates, and the types that prevent bugs
There is a class of bug you cannot test your way out of, because the test and the code share the same wrong assumption.
Project: an invoicing application
An invoice is not a record.
File uploads and the image pipeline
D9 was "a user uploads a ten megabyte photo from their phone, and it is served to every visitor at ten megabytes".
Background jobs, cron and transactional email
Some work must not happen inside a request.
The event bus, realtime, and webhooks
An application grows a particular kind of mess: one thing happens, and five systems have to hear about it.
Observability: Studio, Pulse and Sentinel
B11 was "when something goes wrong, nobody can tell me what happened".
Testing a Grit application
Chapter eighteen taught the mechanics.
Upgrading, deploying, and handing it over
Two things decide whether a framework is a help or a trap, and neither is visible on the day you start: can you take a new version without a.
Chapter assignment
Finish every assignment in Building with Grit
Each lesson in this part ends with its own assignment, named for the leaderboard. Finish them in order.
See success criteriaLesson 1 takes ~15 min.
Start chapterSpot a typo? Have an idea?
Help us improve this chapter. One click opens a GitHub issue with this chapter's URL pre-filled — suggest a clearer wording, report a bug, or request a new lesson. The course keeps improving thanks to learners like you.
Suggest an improvement on GitHub