Bringing back the "Shadow Endpoint" Terminology #5740
Replies: 3 comments 4 replies
-
As I'm one of the ones whose complaining on Discord prompted the creation of this discussion, I feel like I can provide a few reasons why "shadow endpoint" is a much better term than "page endpoint." The first reason is that cramming the word "page" into a different usage in the context of routing makes it very confusing for beginners to keep track of. They have to keep track of pages, endpoints, and page endpoints (which are really just regular endpoints that correspond to specific pages). When you're learning new terminology, it can be incredibly confusing to differentiate terms when you see multiple familiar words used in combination with each other, rather than having a new term to represent a new meaning. Consider the terms "server", "client", and "request", which are all commonly used in web development. Ignoring whether it makes chronological sense or not, imagine if we decided to use the term "server requester" instead of "client". While it's not a one-to-one comparison, I think it's a good example of how reusing the same words in too many places can negatively impact clarity. The second reason that I find "shadow" better than "page" is that the term "page endpoint" can be hard to use in conversation while being clear about what you're talking about. While explaining things in the Discord server, I often find myself doing sentence gymnastics to make it clear that I'm talking about a page endpoint, not a page, and not a page and an endpoint, and not a plain endpoint. I've still had people on the other end of the conversation get confused in this way, which just makes it harder to communicate. The third reason that I have for using "shadow" over "page" is simply that shadow endpoint is a much more representative name of what the functionality actually is. The logic behind "page endpoint" is relatively weak: it's an endpoint that has its own page. Why not call the pages "endpoint pages"? On the other hand, the term "shadow" endpoint elucidates that the endpoint is the "shadow" of the page, sitting behind it to feed it information. The term "shadow" also implies that some functionality has been "hidden", which is exactly what the shadow endpoint does by hiding the load function and having the page automatically call it. This is probably the weakest of the three points because it's entirely based on the connotations that I personally assign to those words, but I think it's worth mentioning because I've talked to others who share the same feelings. |
Beta Was this translation helpful? Give feedback.
-
as someone who recently started learning Svelte (and SvelteKit) - I thought Page Endpoints made a lot of sense! it sounded very reasonable to me that you had Endpoints as an overarching concept. Endpoints is then further divided into:
for me, the name Shadow Endpoint doesn't make as much sense and it is not clear to me that Shadow refers to the fact that a certain Endpoint is associated with a Page. again - I'm new to SvelteKit but maybe it could be good to factor in views from newer users as well 🙂 |
Beta Was this translation helpful? Give feedback.
-
It's all moot now anyway ... |
Beta Was this translation helpful? Give feedback.
-
For a brief moment, SvelteKit had referred to what is now known as "Page Endpoints" as "Shadow Endpoints".
#3532 introduced the terminology, but (if I remember correctly) it seemed that the naming caused quite a bit of confusion and thus the term never made it into the official docs and that's how the story ended.
Except not quite. It turns out that Rich had accidentally created a name that was too cool to be deleted from the internet as many of the more active members of the community started using the deprecated term of shadow endpoints to refer to the concept, with some even preferring it over the new term of page endpoints.
As it could be detrimental to SvelteKit to have "insider" terminology for core concepts, and because the name "shadow endpoints" has garnered many fans in the community, maybe having a poll about this could help decide if it's worth bringing the name back.
39 votes ·
Beta Was this translation helpful? Give feedback.
All reactions