Search code examples
springspring-mvccomponent-based

Can Spring Framework used to build modular componentized web applications?


When i think of Modular applications i think of mostly a component based architecture application (not necessary i know).

JSF is designed to do Component Web applications. Spring's Web Framework (Spring Web MVC) is a request/response model - mostly used to build a multi-layered architecture application so it is a different concept to what JSF is and what it is intended to do.

Can Spring Framework allow the workings of a componentized web application?

did some research and i found that Spring Dynamic Modules is based on OSGi framework but this Spring Project has been moved over to Eclipse Foundation. Is OSGi the way forward?


Solution

  • Spring Framework is not a web framework per se. It's web tier is traditionally created using Spring MVC. It was originally was a subproject but is now included logically in the core libraries.

    Spring MVC gives you a lot of freedom when selecting the view layer. Multiple template engines are supported out of the box with Thymeleaf, Velocity and FreeMarker mentioned in the documentation IIRC.

    You can also throw Spring MVC out, and integrate Spring with a different web framework with compoment based views if you wish. Integration with JSF is mentioned in the reference documentation (briefly, though). Here's a webinar about integrating with Vaadin - another cool component based framework.