If you do not want to use Spring's web MVC, but intend to leverage other solutions that Spring offers, you can integrate the web MVC framework of your choice with Spring easily. Simply start up a Spring root application context through its ContextLoaderListener, and access it through its ServletContext attribute (or Spring's respective helper method) from within a Struts or WebWork action. No "plug-ins" are involved, so no dedicated integration is necessary. From the web layer's point of view, you simply use Spring as a library, with the root application context instance as the entry point.
Alex Prohorov wrote:Thank you Mark!
What I am asking for is if it is possible tho use proprietary presentation layer without even mentioning (not to tell - using) existing things - Struts, Velocity etc. Not even JSP. Ideally there would be an API for that.
Alex Prohorov wrote:Mark!
Actually you got that right. Spring integration of Play! or Swing is very close to the point of my interest. The problem is that I am not much familiar with those two and just a beginner in Spring. And my question is - any hints on how that integration may be done in general. The document I quoted ("Simply start up a Spring root application context through its ContextLoaderListener, and access it through its ServletContext attribute (or Spring's respective helper method) from within a Struts") sounds a bit fuzzy on that. There should be a way NOT using Struts.
Absolutely yes (but not in a JSP environment). But it has its own mechanisms of binding data within presentation layer (extremely straightforward, simple and fast) so I do not see what for may I need ApplicationContext in presentation layer if I reuse HybridJava and thus maybe there is no need to push ApplicationContext into ServletContext - its usage may be limited to Business Layer and below.Mark Spritzler wrote:I would assume HybridJava is deployed in a Servlet environment too.
Alex Prohorov wrote:
Absolutely yes (but not in a JSP environment). But it has its own mechanisms of binding data within presentation layer (extremely straightforward, simple and fast) so I do not see what for may I need ApplicationContext in presentation layer if I reuse HybridJava and thus maybe there is no need to push ApplicationContext into ServletContext - its usage may be limited to Business Layer and below.Mark Spritzler wrote:I would assume HybridJava is deployed in a Servlet environment too.
I am thinking about transforming the presentation part generated by HybridJava compiler into a library that may be taken as a whole and just inserted into the Spring environment. Maybe (to begin with) I will be lucky in taking the simple non-WEB application example from a book (like HelloWorldSpringDI from Pro.Spring.3.pdf) and hooking up the Sample application of HybridJava to it. Interface is not very clear yet.
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |