2

My understanding of Microservice architect is that much of the work is shifted to the front end client side in a single page application (SPA).

The SPA will then interact with the back end microservices.

This begs a question: Does Spring framework with MVC still relevant here? I think only SpringBoot with Bean injection and JPA persistence support are still relevant. This is because in microservice architecture, the front end client side is single page app (SPA). We don't need the server side to worry about model view controller.

All the MVC will be irrelevant in the microservices architecture.

Please correct me. Thanks

4
  • 2
    They even have blog posts about this topic: spring.io/blog/2015/07/14/microservices-with-spring
    – ASA
    Commented Sep 13, 2016 at 13:35
  • 1
    What does "relevant" mean? Commented Sep 13, 2016 at 15:40
  • @RobertHarvey "relevant" means "still makes sense together". Microservices with Spring MVC, do they make sense together?
    – InformedA
    Commented Sep 13, 2016 at 16:00
  • 5
    That's a tautology. What is your specific criteria that fulfills the objective of "still makes sense together?" Availability of programmers with the necessary skills? Smallest code? Able to leap tall buildings in a single bound? You can also help us identify your notion of relevance by answering the question "why" to the assertion "I think only SpringBoot with Bean injection and JPA persistence support are still relevant." Commented Sep 13, 2016 at 16:03

2 Answers 2

3

Your frontend can (and possibly should) also be a microservice. That one can very well be implemented using a system like Spring MVC, using for example Thymeleaf as a templating system.
So yes, such things are still relevant, just not in your understanding of what a microservice is (which seems limited to some server process that spits out json for a javascript based web frontend to retrieve using ajax requests).

1

MVC can be seen as the old one with JSP however this is not how it works with Spring and even with MVC, View does not always mean "User Interface"

I use MVC Spring for a REST Server, my View is the JSON that i send back to the client, my controller is the entry point that match to the current URL requested, and my model include JPA/Business layer/business objects.

Furthermore Spring is meant to be light as opposite to JEE, and there is no point redoing yourself what can Spring does for you.

Finnaly Spring already include what you need for a microservice architecture, see this tutorial (ty @Traubenfuchs)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.