The Spring Web model-view-controller (MVC) framework is designed around a Dispatcher Servlet that dispatches requests to handlers, with configurable handler mappings, view resolution, locale and theme resolution as well as support for uploading files.The default handler is based on the @Controller and @Request Mapping annotations, offering a wide range of flexible handling methods. With the introduction of Spring 3.0, the @Controller mechanism also allows you to create RESTful Web sites and applications, through the @PathVariable annotation and other features.
In Spring Web MVC you can use any object as a command or form-backing object; you do not need to implement a frame work-specific interface or base class. Spring's data binding is highly flexible: for example, it treats type mismatches as validation errors that can be evaluated by the application, not as system errors. Thus you need not duplicate your business objects' properties as simple, untyped strings in your form objects simply to handle invalid sub missions, or to convert the Strings properly. Instead, it is often preferable to bind directly to your business objects.
Spring's view resolution is extremely flexible.A Controller implementation can even write directly to the response stream. Typically, a Model And View instance consists of a view name and a model Map, which contains bean names and corresponding objects such as a command or form, which contain reference data. View name resolution is highly configurable, through bean names, a properties file, or your own View Resolver implementation. The model (the M in MVC) is based on the Map interface, which allows for the complete abstraction of the view technology.You can integrate directly JSP, Velocity, or any other rendering technology. he model Map is simply transformed into an appropriate format, such as JSP request attributes or a Velocity template model.
Features of Spring Web MVC
Spring's web module includes many unique web support features:
Spring is more flexible than web MVC frameworks that mandate a particular technique.
Pluggability of other MVC implementations
Non-Spring MVC implementations are prefer able for some projects.Many teams expect to leverage their existing investment in skills and tools. A large body of knowledge and experience exist for the Struts framework.If you can abide Struts' architectural flaws, it can be a viable choice for the web layer; the same applies to WebWork and other web MVC frameworks.
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 frame work of your choice with Spring easily. Simply start up a Spring root application context through its Context Loader Listener, and access it through its Servlet Context 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.
Your registered beans and Spring's services can be at your finge tips even without Spring's Web MVC.Spring does not compete with Struts or Web Work in this scenario. It simply addresses the many areas that the pure web MVC frameworks do not, from bean configuration to data access and transaction handling. So you can enrich your application with a Spring middle tier and/or data access tier, even if you just want to use, for example, the transaction abstraction with JDBC or Hibernate.
Java-Springs Related Interview Questions
|Adv Java Interview Questions||J2EE Interview Questions|
|Core Java Interview Questions||JSP Interview Questions|
|Java-Springs Interview Questions||Java Servlets Interview Questions|
|JMS(Java Message Service) Interview Questions||Hibernate Interview Questions|
|Java applet Interview Questions||Java Interview Questions|
|Framework7 Interview Questions||Java collections framework Interview Questions|
|Java 8 Interview Questions||Java Programmer Interview Questions|
Introduction To Spring Framework
New Features And Enhancements In Spring 3.0
The Ioc Container
Validation, Data Binding, And Type Conversion
Spring Expression Language (spel)
Aspect Oriented Programming With Spring
Spring Aop Apis
Data Access With Jdbc
Object Relational Mapping (orm) Data Access
Marshalling Xml Using O/x Mappers
Web Mvc Framework
Integrating With Other Web Frameworks
Portlet Mvc Framework
Remoting And Web Services Using Spring
Enterprise Javabeans (ejb) Integration
Jms (java Message Service)
Task Execution And Scheduling
Dynamic Language Support
All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.