Life after greenpages samplehttps://www.eclipse.org/forums/index.php/mv/msg/469166/1032874/#msg_1032874
I am new to Virgo development. Nevertheless, I have some experience with OSGi, both with and without SpringDM.

However, my experience with web frameworks is quite limited.

My idea is now to create a Modular Web application, but the modules has to provide not only services, but also Web Pages, Controllers, etc.

The idea is to divide the application in bundles but not only in horizontal layers (services layers, infrastructure, etc.) But also in vertical layers (features).

So for instance, we would like to have a Web App that shows different menu entries depending on the available services. But when we click on those menu entries, we should be redirected to a Web Page contained in another bundle (which has a spring MVC architecture).

My questions are:

Am I missing the point with this architecture?

Is it possible to divide the web layer in different bundles but still using Spring MVC, spring Security and so on?
If yes, are those bundles a WAR or a JAR?
Is there sample code like Greenpages but showing a modular web GUI?

Thanks a lot folks!

]]>Fernando Kerko2013-04-03T14:51:31-00:00Re: Life after greenpages samplehttps://www.eclipse.org/forums/index.php/mv/msg/469166/1033090/#msg_1033090
You might like http://www.eclipse.org/virgo/documentation/virgo-documentation-3.6.0.RELEASE/docs/snaps-guide/htmlsingle/virgo-snaps-guide.html which is a framework for modularising your web layer. I've had difficulty using it with Spring though, something about it not creating spring contexts for the snap bundles, if I remember correctly.
Best, Dan.]]>Daniel McGreal2013-04-03T21:02:30-00:00Re: Life after greenpages samplehttps://www.eclipse.org/forums/index.php/mv/msg/469166/1034667/#msg_1034667
Thanks.]]>Nayyab Naqvi2013-04-05T18:47:38-00:00Re: Life after greenpages samplehttps://www.eclipse.org/forums/index.php/mv/msg/469166/1035466/#msg_1035466
Daniel McGreal2013-04-06T23:35:32-00:00Re: Life after greenpages samplehttps://www.eclipse.org/forums/index.php/mv/msg/469166/1064536/#msg_1064536
Snaps does seem to introduce modularity, but at the cost of simply adding new DispatcherServlets at each of its sub context paths. In the sample application, they add a DispatcherServlet to /cat in the cat snap.

Is there any clean way to have one DispatcherServlet route requests to Spring services declared in another bundle?

Here's the specific scenario I have. I have a web client that uses ExtJS's RPC mechanism "ExtDirect" for async calls. I've worked out the modularity of the client side with Snaps, so that UI features can be added dynamically. It looks like this

However the way ExtDirect works is it sends all requests to one URL with post data. ExtDirectSpring works by putting a controller at "/router" and then scanning Spring services with certain annotations. I want those services to be able to be in their corresponding feature bundle. I can get that to work, but then those bundles' application contexts need to be web aware (to the same context as the snap host) to support things like session scoping. That's where I get lost.

Is the Snaps approach the only recommended way of modularizing by feature? Even if I take the snaps approach, does the snap actually share the web context at all with the parent, so that the Spring Web fundamentals can be shared?