|Life after greenpages sample [message #1032874]
||Wed, 03 April 2013 10:51
| Fernando Kerko
Registered: April 2013
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!
|Re: Life after greenpages sample [message #1064536 is a reply to message #1032874]
||Wed, 19 June 2013 14:28
| Mark Peters
Registered: July 2009
I'm in the exact same boat, and would love some input from somebody who has gone down this road before.|
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
/index.jsp (the snap host at / embeds script tags point to...)
/featureA/featureA.js (a snap at context path /featureA)
/featureB/featureB.js (a snap at context path /featureB)
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?
Powered by FUDForum
. Page generated in 0.02528 seconds