Chapter 5
Frameworks & Patterns
The Go side demystified — Gin, GORM, CRUD, and the Handler → Service pattern that every resource follows.
~36 min total4 lessonsAssignment
By the end of this chapter you'll be able to
- Explain what Gin and GORM are, in one sentence each
- Walk a request from URL → handler → service → DB → response
- Write the four CRUD operations by hand and reason about why each line is there
- Decide whether new logic belongs in the handler or the service
Lessons
Module: The frameworks
Chapter assignment
Hand-write a Note resource
Without using `grit generate`, hand-write a Note resource: model, service, handler, routes. List notes, create one, update, delete. Then run `grit generate resource Note` in a fresh project and DIFF the two — note where your code differs from the generated. One paragraph in notes.md on what you learned.
See success criteriaLesson 1 takes ~8 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