0

I have a application designed using Spring REST service. the application has two REST projects:

  • Web
  • Core

Web has html, JavaScript and Java classes (ajax calls this REST). These Java classes in turn call the core project again through REST service.

What is the advantage of having them in two separate projects instead of one?

1 Answer 1

1

An application design like this might be advantageous if you take the broader infrastructure into account.

Possibly, your Core project serves more than one other project and combines common business logic across your application infrastructure. Then it might make sense to have it as a separate web application rather than compiled into the same application. You could have an entire infrastructure, that consists of small web projects, that call each other using REST services.

This is commonly referred to as a Microservices Architecture. In short, having this allows centralized logic, easy updates of the individual parts of the infrastructure and each part of the infrastructure to use different technology, while all work together.

If on the other hand, the Web project is the only user of the Core project you really have some wasteful overhead, unnecessary complexities and cause for error introduced into that application.

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.