Exercise 1: Two Mechanisms, One End Result — Possible Solution ==================================================================== NEXT.JS'S MECHANISM ------------------------------ Per this chapter, Next.js achieves its catch-all routing through a filename convention - a folder literally named [...slug]. Its presence on disk is what tells Next.js to match anything at that point in the URL, with no Python-equivalent code declaring this behavior explicitly; the routing table is discovered from the folder structure itself. DJANGO'S MECHANISM ------------------------------ Per this chapter, Django achieves the identical end result through an explicit line of Python code - path('/', views.page_detail) in urlpatterns, using the path converter specifically, since it's the only built-in converter that matches through forward slashes rather than stopping at the first one. WHY THIS IS "THE SAME RESULT, GENUINELY DIFFERENT MECHANISMS" ------------------------------ Per this chapter's own central finding, Next.js's routing table is implicit - the folder structure itself IS the routing table, discovered by convention. Django's is explicit - urlpatterns is an ordinary Python list you write and can read in full in one file. Both let a URL of arbitrary depth resolve to a single handler, but one does it through a special file/folder naming convention the framework interprets automatically, and the other does it through code the developer writes and controls directly. WHY THIS WORKS AS AN ANSWER ------------------------------ It correctly names the filename convention ([...slug]) as Next.js's mechanism and the explicit path() call with the path converter as Django's mechanism, and correctly explains the underlying implicit-vs-explicit philosophy difference this chapter frames both mechanisms as examples of.