Augusto
Augusto

Reputation: 29867

Does Spring MVC 3 have view components?

I'm learning Spring 3 MVC for a project I'll start soon for a client and I can't find if it supports view components (similar in a way to portlets).

Ideally the solution would be similar to Rails, in which invoking "render" with a parameter (object or view name) renders the component.

OR to have something like the following in the view template

<component name="search" paramA="1" paramB="2"/>

and in this case, there's something that searches for the component "Search" in the classpath and initializes it with the parameters.

The ideal solution should have 0 configuration. Maybe the solution would be to write a custom taglib that does this for me, but I'm wondering if there's something already done out there.

I would be really thankful If anyone knows about a book / tutorial that explains spring mvc 3 from a Rails developer point of view.

Upvotes: 3

Views: 1198

Answers (1)

skaffman
skaffman

Reputation: 403451

Spring MVC isn't a component framework - it's too low level for that.

The Java world is awash with more web-based component frameworks than you can shake a widget at. Try (in no particular order) JSF, Spring WebFlow, PlayFramework, Vaadin, etc.

If you're already familiar with Rails, then the obvious choice is Grails - it's inspired by the Rails approach, uses Groovy rather than Java, but runs on the Java VM, and integrates with other Java stuff well.

Upvotes: 3

Related Questions