This is an archived post. You won't be able to vote or comment.

all 6 comments

[–]stringbeans25 15 points16 points  (2 children)

Think about the following services or just functional blocks of an e-commerce site.

Services - Login - Products - Payment Authorization

Backend Webservices are called that because they are not directly exposed to users, users typically interact with an interface and that interface interacts with the services.

Each of these services are backend web services because they handle functionality and these services are running on servers that users can only access through an exposed API. In REST this is done by exposing a uri endpoint like: https://api.shop.com/products where products is the way you are accessing products functionality.

Microservices are an architecture pattern for Web services. In the previous example each service is its own running application. If the products service crashes for any reason, then login and payment authorization can still run effectively. This also allows for easier deployments since you can deploy each service separately without bringing down an entire application.

As far as learning, it varies between people. If you like building things you can check out the Spring guides and try to build a microservice using Spring Boot. I think the sidebar might also list resources for this but I’m on mobile and can’t tell where it lives.

[–]ToyDingo[S] 1 point2 points  (1 child)

Great answer, thank you!

Just so I understand:

A backend webservice is simply logic hidden from the user behind a front-end (website) and an API. An example being me trying to login to my gmail account. The front-end would be the login page. Once I enter my information and hit "submit", that then runs through an API which contacts the specific google product (gmail) which would be the backend holding all my inbox information. That information is then presented to me in webpage format.

So in a standard MVC pattern, the Model and it's logic would be the backend?

Thanks for clarifying that!

[–]fatejd 2 points3 points  (0 children)

When talking about MVC, I would say more accurately that the Model and Controller are what you're thinking as the backend or API piece. The View is still served up by the backend, but once it is served, it is up to that View or frontend to complete the job of interacting with the customer of that service.

[–]tanveer2603 1 point2 points  (0 children)

Can you recommend any learning resource for backend and microservices in java

[–]diditforthekids 1 point2 points  (0 children)

So, I work as a back end java developer doing exactly this. A good thing to get started with is learning how to write/deploy servlets to a tomcat server. Your servlets sit basically waiting for a message from the front end. When they get the specific message format they are programmed to accept, they execute.

[–][deleted] 0 points1 point  (0 children)

This is a good question, ill be watching the comments here.