Closed clarnx closed 1 week ago
Hoop is a very suitable word. I don’t like the word middleware because it is too long.
Hoop is a very suitable word. I don’t like the word middleware because it is too long.
Thanks for the response. @chrislearn Another way to know if the community wants hoop
or middleware
is to create a poll for the community to choose to keep hoop
or replace it with middleware
.
If you still want to keep hoop
, another alternative to achieving this is that hoop
remains and then you add middleware
which functions just like hoop
for those who want to use it to make their code more relatable to other developers on a project. So basically middleware
will just return hoop
.
My personal opinion is that changing the name is useless. Middleware is a very basic concept. Even beginners only need to look at the example or the documentation to know that hoop is middleware.
Adding another middleware method will inevitably make people wonder what the relationship between the two functions middleware
and hoop
is, which will confuse users. If you really want to add it, you must mark it as a deprecated function.
I don't think there is any need for this, if you really need to write middleware instead of hoop, create an extension trait like this
@TheAwiteb thanks for sharing how to add an implementation of middleware without the need of adding it from source. I think this will be a better approach.
Is your feature request related to a problem? Please describe. A quick Google search of the word
hoop
does not describe anything related to middleware.Describe the solution you'd like A clear and concise description of an alternative name for
hoop
will be ideal since most developers are familiar with the wordmiddleware
in other frameworks or programming languages. Salvo is simple enough to attract newer developers learning Rust and coming from Laravel, Express.js, and Django backgrounds. Laravel, Express.js, and Django all use the word middleware.Describe alternatives you've considered A suggestion in my opinion as an alternative name to hoop can be
middleware
.