Slide 1

Slide 1 text

Hypertext on Rails HATEOAS が示す Rails の正しさ Taiju HIGASHI @ Kaigi on Rails 2026

Slide 2

Slide 2 text

Taiju HIGASHI Works at ESM, Inc Ruby/Rails: ~4 years Rails 7 was my first Rails fukui.rb organizer 北陸Ruby会議 staff

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

HATEOAS hypermedia as the engine of application state

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

https://ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm

Slide 7

Slide 7 text

Uniform Interface REST is defined by four interface constraints: identification of resources; manipulation of resources through representations; selfdescriptive messages; and, hypermedia as the engine of application state. https://ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

https://roy.gbiv.com/untangled/2008/rest-apis-must-be-hypertext-driven

Slide 10

Slide 10 text

REST APIs must be hypertext-driven if the engine of application state (and hence the API) is not being driven by hypertext, then it cannot be RESTful and cannot be a REST API. Period. Is there some broken manual somewhere that needs to be fixed? https://roy.gbiv.com/untangled/2008/rest-apis-must-be-hypertext-driven

Slide 11

Slide 11 text

hypertext-driven The client knows only the entrypoint The server offers available actions through hypertext (hypermedia) The client chooses and follows

Slide 12

Slide 12 text

What does HATEOAS change?

Slide 13

Slide 13 text

roguelife Live Life Like a Roguelike Get Your Daily I-Ching Reading Post Daily Reflections

Slide 14

Slide 14 text

A quick detour: domain knowledge 六十四卦 (Hexagram) 6 陽 (Yang) 5 4 陰 (Yin) 3 2 1 = 2 64 6 patterns

Slide 15

Slide 15 text

The entrypoint GET / 302 Found Location: /days/ GET /days/ Which one? /divination” ... ” ...

Slide 16

Slide 16 text

POST /days//divination 200 OK Which one? /divination/lines” ... ” ...

Slide 17

Slide 17 text

POST /days//divination/lines 200 OK Which one? /divination/lines” ... ” ...

Slide 18

Slide 18 text

POST /days//divination/lines 303 See Other Location: /days//hexagram GET /days//hexagram Which one? /resulting_hexagram” ... /reflections” ... ” ...

Slide 19

Slide 19 text

How we built new feature (Reflections feature) What can users do? View reflections as a timeline Post a reflection Delete a reflection When is it available? Once the hexagram is available Post and delete today only Where is it offered? Linked from the hexagram page Post and delete offered on the reflections timeline

Slide 20

Slide 20 text

Just focus on affordances: where and when to offer and .

Slide 21

Slide 21 text

Wait.

Slide 22

Slide 22 text

Hey, genius. Isn’t this just ordinary Rails dressed up in fancy words?

Slide 23

Slide 23 text

Exactly.

Slide 24

Slide 24 text

Client-driven SPA User Client “Give me the final line.” “Your hexagram is complete, so Reflections is available. Which one?” “Reflections.” “Since it’s today, you can post or delete. Which one?” Server “Give them the final line.” “Here’s the new state.” “Give them their reflections.” “Here’s the data.”

Slide 25

Slide 25 text

HATEOAS User Server “Give me the final line.” “Which one?” “Reflections.” “Which one?”

Slide 26

Slide 26 text

You already know why ordinary Rails feels so good.

Slide 27

Slide 27 text

So why did we take Hypertext out of Rails?

Slide 28

Slide 28 text

Because... Responsiveness Separate frontend / backend teams Trends Mobile apps Real-time collaboration

Slide 29

Slide 29 text

Did we really have many good reasons to take Hypertext out of Rails?

Slide 30

Slide 30 text

No content

Slide 31

Slide 31 text

Hotwire is a game changer.

Slide 32

Slide 32 text

Hotwire carries HTML. HTML carries affordances. That’s HATEOAS.

Slide 33

Slide 33 text

Conclusion

Slide 34

Slide 34 text

Let’s start with Hypertext on Rails.