I have seen that they talk a lot about entry points and end points, the truth is that I have an idea of what it refers to, but I still don't know the correct definition or what they are for. Beforehand thank you very much.
I have seen that they talk a lot about entry points and end points, the truth is that I have an idea of what it refers to, but I still don't know the correct definition or what they are for. Beforehand thank you very much.
Entry point is the URL that the visitor will have entered in their browser to view your application or site. Formerly, each section of a website was an entrypoint
With the advent of libraries that provide routing (Backbone, Ract, Angular, Vue) it has become trivial to serve single page applications (SPA) where the visitor arrives at a landing page and from there can visit the rest of the site, giving the impression that you are browsing between different pages when, in reality, it is still the same landing page that shows you different sections depending on the URL you are requesting. The entrypoint will contain the current functionality as a router and display different content depending on the requested url, "intercepting" the internal links.
The visitor sees that the URL is changing and really feels that he is moving between links, but he has not left the same entrypoint.
There is a delicate balance between having very few entrypoints with dependencies that they do not need, or many with the maintenance that this entails.
Endpoints are the URLs of an API or a backend that respond to a request. The same entrypoints have to match an endpoint to exist. Something must respond in order for a site to render meaningful to the visitor. For each entrypoint waiting for a user to visit there can be dozens of endpoints serving the data to fill each graph and infographic that is displayed at the entrypoint.
The difference between entrypoint and endpoint is that endpoints are not intended to interact with the end user . They will usually only return json, or not at all. And more than often, an entrypoint will make several calls to different endpoints to show statistics, galleries, latest comments, etc.
Additionally, it is assumed that when talking about an endpoint we are in a RESTful environment , so (unlike using a browser), the client can use the same endpoint with different verbs . The same endpoint, for example:
it will return a list of users if you use the GET verb, and it will create a user if you use the POST verb. The endpoint itself does not say anything about the actions you can do with it.
The existence of endpoints is usually proportional to the number of entities you want to model in your backend or API. Let's say that for each entity there should be at least one endpoint, and for each of them, you could perform the actions of creating, reading, updating and deleting data. And then if you consider that each relationship between two entities gives rise to another endpoint, you may have many more. Again, given the User model, if each user has N galleries, the endpoint
It will return the galleries of the user that you have requested. Again in a simple json, because it is not meant to be read directly by the end user.
Indeed, as @amenadiel mentions, an entrypoint and an endpoint are very different.
If we could classify them briefly it would be:
Usage examples:
The relationship between them:
An entrypoint, such as a home page of a website, can be consulted information from different endpoints to fill the sections of the page with certain information, being simplistic, suppose that:
Furthermore, we understand endpoints as web services that will be used not only when accessing an entrypoint but also when clicking on a button, a checkbox, or any interaction event with the user.
And what if we don't interact with the browser but are the API being queried?
In this case, is everything endpoint?
You receive a request , query a database or an external API and return a result . What is your entrypoint in that case?
The entrypoint is the request that arrives through the API router, while the endpoint is that external API, etc. what queries That request may have come from a browser, a terminal, postman, etc.
The entrypoint / endpoint topic depends more on the context in which you move, although as a general answer, @ffflabs's is perfect.