计算机专业毕业设计外文翻译--spring的webmvc构架模式(编辑修改稿)内容摘要:

properties file, or via your own ViewResolver implementation. The abstract model Map allows for plete abstraction of the view technology, without any hassle: Be it JSP, Velocity, or anything else every renderer can be integrated directly. The model Map simply gets transformed into an appropriate format, like JSP request attributes or a Velocity template model. 3. Integration: Using a Different Web Framework with Spring Many teams will try to leverage their investments in terms of knowhow and tools, both for existing projects and for new ones. Concretely, there are not only a large number of books and tools for Struts but also a lot of developers that have experience with it. Thus, if you can live with Struts39。 architectural flaws, it can still be a viable choice for the web layer. The same applies to WebWork and other web frameworks. If you don39。 t want to use Spring39。 s web MVC but intend to leverage other solutions that Spring offers, you can integrate the web framework of your choice with Spring easily. Simply start up a Spring root application context via its ContextLoaderListener, and access it via its ServletContext attribute (or Spring39。 s respective helper method) from within a Struts or WebWork action. Note that there aren39。 t any plugins involved, therefore no dedicated integration: From the view of the web layer, you39。 ll simply use Spring as a library, with the root application context instance as entry point. All your registered beans and all of Spring39。 s services can be at your fingertips even without Spring39。 s web MVC. Spring doesn39。 t pete with Struts or WebWork in this usage, it just addresses the many areas that the pure web frameworks don39。 t, from bean configuration to data access and transaction handling. So you are able to enrich your application with a Spring middle tier and/or data access tier, even if you just want to use . the transaction abstraction with JDBC or Hibernate. 4. Feature Check List If just focussing on the web support, some of Spring39。 s unique features are: .Clear separation of roles: controller vs validator vs mand object vs form object vs model object, DispatcherServlet vs handler mapping vs view resolver, etc. .Powerful and straightforward configuration of both framework and application classes as JavaBeans, including easy inbetween referencing via an application context, . from web controllers to business objects and validators. .Adaptability, nonintrusiveness: Use whatever Controller subclass you need (plain, mand, form,。
阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。 用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。