Closed rmunn closed 6 years ago
So why is this CE builder called
scope
instead ofrouter
?
Well, the reason was literally because Phoenix call it like that. ;-)
However, I do agree that we maybe should rename it to router
as it would be less confusing for people starting with the framework, and it would better express what this component is about.
CC: @isaacabraham @NinoFloris @baronfel any opinions?
Router works for me. In our training course, that's exactly how we describe scope
, so it seems like a good fit. Scope isn't necessarily bad - it represents a "scope" of routes :-) But router seems even better.
+1 - and keep scope as deprecated for couple of minors
Yes! Good change
The funny thing is that I actually use name Router
in the overview documentation ;-)
Ok, let's do this.
The names
application
,pipeline
, andcontroller
all makes sense to me, and I intuitively grasp what their purpose is. But every time I want to write a router to connect URLs (or partial URLs) to handlers, I want to typelet books = router { ... }
instead oflet books = scope { ... }
.So why is this CE builder called
scope
instead ofrouter
? I realize that Phoenix uses the namescope
and Saturn was heavily inspired by Phoenix, but since this was confusing to me, there's a possibility that it would be confusing to someone else who'd never used Phoenix, and thatrouter
might be a less-confusing name. It's at least worth opening a discussion.