StudentShare
Contact Us
Sign In / Sign Up for FREE
Search
Go to advanced search...
Free

Spring Framework with MVC Web Applications - Essay Example

Cite this document
Summary
"Spring Framework with MVC Web Applications" paper views the role of the controllers and how view resolving and request mapping are done. It should be clear that the controller handles all requests. The handler checks the URL and maps it to the correct destination. …
Download full paper File format: .doc, available for editing
GRAB THE BEST PAPER92.2% of users find it useful
Spring Framework with MVC Web Applications
Read Text Preview

Extract of sample "Spring Framework with MVC Web Applications"

Spring Framework Section Introduction to Spring Framework To answer the simple question of what is spring framework, the answer is that spring framework is a Java platform that gives an infrastructure to develop Java applications. The framework handles the infrastructure for the programmer, so as to give the application a better focus. Rod Johnson originally created this open source framework. This framework addresses the complexity experienced enterprise application development. It achieves this ability with beans that were previously only with EJBs. Spring can benefit any Java application in terms of simplicity, testability, and loose coupling. It simplifies Java development through four key strategies Lightweight and minimally invasive development with POJOs Declarative programming through aspects and common conventions Loose coupling through dependency injection and interface orientation Boilerplate reduction through aspects and templates This is the framework for the programmer or the developer who wants to develop Java application using Plain Old Java Objects (POJOs) and then non-invasively apply enterprise services (Johnson, et al., 2011). Simply put, it is a one-stop-shop solution for developers of enterprise applications. The Spring framework has several features that are categories into modules. The diagram shown illustrates the key features of Spring. This framework avoids the clutter and gives you the ability to use only what you need. The core features of Spring framework are able to support declarative transaction management, remote access to the application logic through web services, and other main options for data persisting. Spring offers fully featured MVC framework and enables the programmer to transparently integrate AOP. Its key design is non-intrusiveness, which is no dependency on the framework. When a programmer talks about Spring, dependency injection and inversion control should echo. Dependency control makes the Spring framework more popular because it allows individuals and institutions to build robust, dependable applications that are easy to maintain. If you are asking why use Spring, here are the advantages that a programmer would want. Escape from the use of API to execute Java methods in databases Avoid the use of the Remote API by executing local Java methods remotely It is also flexible as programmers decides how to program Use management operations without having to use JMX APIs Use message handlers locally, avoiding the use of the JMS APIs Spring addresses the main problems of J2EE regarding web application development, Enterprise Java beans, Database access (JDBC, ORM), transaction management and Remote access. The primary purpose is to reduce dependencies and even introduce negative dependencies. Spring is largely built around dependency injection and aspect oriented programming (AOP). During runtime, dependencies are injected thereby preventing hard-coded object creation and object lookup. It enables loose coupling and helps the developer to write effective unit tests. As a programmer, the Spring framework does need you to implement interfaces or extend classes. Instead, it allows the developer to focus on the actual app because the framework covers these features. The programmer does not need to struggle with a heavyweight framework of classes and unnecessary codes. The framework allows the developer to write their code and test it freely, without struggling with interfaces with codes that are difficult to test. The developer in spring will enjoy writing less code within the API because they will not be forced to implement any interface or extend a class. The classes used by Spring framework will have little or no indication of their use in Spring. Classes are essentially POJO and will have little indication of Spring. Since objects are responsible for having the references to their collaborating objects that are their dependencies, it can lead to excessive coupling of the code that is difficult to test, reuse, or understand (Richardson, 2006). Since when developing requires some degree of coupling, because when objects are not coupled the application will have no functionality. For the application to perform anything, the classes should have a clear knowledge of each other’s function. This means that spring also does coupling, but it is usually loose and well managed. Spring framework manages dependency by using a third party to assign dependencies to objects when they are created. These dependencies are created and obtained by the object that require them. This simply shows that dependencies are injected into only the object requiring them. Section 2: Building web applications with Spring MVC MVC (Model View Controller) is a concept of interface design that is used in OOP development. It consists of a design that relates the user interface with the data models that lie beneath it. It is widely used by programmers in a wide array of applications. In Spring framework, there are features that support development of MVC applications, these features include Simplicity Portability Fast Flexibility Loosely coupled applications The Spring framework code has high performance, ease in testing, and high flexibility. Thus, when building MVC there is no better framework to use than spring Framework. The HTTP Request path in Spring MVC Once the request has been made, its first stop is at the spring’s dispatcher. This is where the spring web framework funnels its web request through. The front panel refers to a web application sequence where a single servlet distributes responsibilities from request to other components in the application to do the processing of the request. Its main job is to send the request on to a Spring MVC controller. The dispatcher servlet consults handler mappings to figure out where the next request stop will be. The handler mapping pays attention to the URL of the request before it makes its decision. Once an appropriate controller has been chosen, DispatcherServlets redirects the request to the chosen controller. The request drops its payload at the controller and waits for it to process the data. The controller performs the logic of the request resulting to some feedback for display to the user by the browser. The information is called the model and must be given a view that is user friendly. The controller then packages up the required model data and identifies the name of a view to render the output. Since the DispatcherServlet now knows which view will render the output, the HTTP request’s final stop is at the view implementation. The delivery of the data model marks the request’s final job. The view uses the model data to give the output that will be carried back to the client by the response object. Figure. Adapted from lecture 4 notes Kingston University London To conclude this article, lets view the role of the controllers and how view resolving and request mapping are done. It should be clear that the controller handles all requests. The handler checks the URL and maps it to the correct destination. Once the controller has identified the model, it must present it to the user in a user-friendly manner. The model is formatted then to a friendly format that could be JSP. The controller packages the model and identifies the view that will clearly show the output. Once the view has been identified the controller sends them to the dispatcher servlet. The view is just a logical view that is used to locate the actual view for producing the output. The dispatcher must consult the view resolver to map the logical to the specific implementation of the view that will show the output. This view implementation is not necessarily in JSP. References Johnson, R., Hoeller, J., Donald, K., Samplaleanu, C., Harrop, R., Arendsen, A., et al. (2011). Spring Framework. http://docs.spring.io/spring/docs/3.1.0.M1/spring-framework-reference/html/index.html. Richardson, C. (2006, June 20). Overview of POJO programming. Retrieved April 17, 2014, from Cloud Tools: http://cloudtools.net/presentations/OverviewOfPOJOs_BEA_JUG.pdf Read More
Cite this document
  • APA
  • MLA
  • CHICAGO
(“Spring Framework with MVC web applications Essay”, n.d.)
Spring Framework with MVC web applications Essay. Retrieved from https://studentshare.org/information-technology/1639889-spring-framework-with-mvc-web-applications
(Spring Framework With MVC Web Applications Essay)
Spring Framework With MVC Web Applications Essay. https://studentshare.org/information-technology/1639889-spring-framework-with-mvc-web-applications.
“Spring Framework With MVC Web Applications Essay”, n.d. https://studentshare.org/information-technology/1639889-spring-framework-with-mvc-web-applications.
  • Cited: 0 times

CHECK THESE SAMPLES OF Spring Framework with MVC Web Applications

An Assessment of the Vulnerabilities of the iPhone

??Performing vulnerability assessment is the only one step in developing a vulnerability management framework, but it is a very important step, you can perform vulnerability assessment internally or externally” (Manzuik et al.... An Assessment of the Vulnerabilities of the iPhone ...
20 Pages (5000 words) Dissertation

SECURITY ISSUES IN RED HAT ENTERPRISE LINUX

Another technology, Security Enhanced Linux (SELInux) prevents users and applications from damaging an entire system by enforcing security policies at the kernel level (Farrell, 2003).... With recent technologies, applications can be shielded in environments which do not expose them to: Potential flaws that may be inherent in the application... According to the research findings to supply a complete server the company need to introduce in the practical use more security principles and configurations, such as: security policy for the web service, Mail, FTP, Samba, NFS, DHCP, Squid, SSH, VPN....
68 Pages (17000 words) Dissertation

The Transportation Software in Business Environment

Ibm Websphere Application Server, the premier Java 2 Enterprise Edition and Web services-based application server is available on the broadest number of platforms and provides a robust, proven environment for Java applications on the internet.... It is the industry's leading J2EE and web Services application server.... TMWSuite's framework for logistics software was discussed in TMWSuite Brochure.... Three layers of the TMWSuite's framework....
26 Pages (6500 words) Essay

Photography - Adopting a Macintosh System

This paper "Photography - Adopting a Macintosh System" focuses on a comprehensive report on the adoption of a Macintosh-based computer system for LM Photography.... The owners would also like a new website designed to coincide with the launch of their new system.... .... ... ... LM Photography requires a report that clearly states the equipment required for the transition of their system and to identify any costs associated with the transition....
25 Pages (6250 words) Case Study

Building a Mobile Application - Java Script

Due to the evolution of technology, the trend has now transformed into developing web enabled applications.... Likewise, the application will provide similar functionality regardless of being connected to the Internet similar to other non-web-based applications.... Secondly, for instance, developing an application for the iPhone, there is a requirement to enable the debug bar in the Safari web browser....
8 Pages (2000 words) Case Study

Java Spring MVC Programming

There are however some extensions for building web applications besides the Java EE platform.... There are however some extensions for building web applications besides the Java EE platform.... spring framework is a kind of open-source framework that is used for building applications on the Java platform.... spring framework features include.... spring framework is a kind of open-source framework that is used for building applications on the Java platform....
2 Pages (500 words) Assignment

An Android App as a Guide of Injectable Medicines

The paper 'An Android App as a Guide of Injectable Medicines' presents an Android app for the NHS that will help the doctors and nurses.... The main benefit of this application is to help both the doctors and the nurses at the hospitals by providing them with a guide of Injectable Medicines.... ... ...
32 Pages (8000 words) Dissertation

How Smartphones Impact a Business or even Human Life

The report also provides information on what types of applications the companies could migrate to and what are the different mobile Operating Systems available to develop their applications.... This was implemented and tested during one assignment in the module of Mobile applications that was to create the Hallam University Campus navigator, an application that migrated from a simple web map to a responsive application.... he success of WWW (World Wide web) and the internet and also the major advances of communication technology (wireless communication, smartphone/mobile device platform) lead to a new age of technological innovation....
45 Pages (11250 words) Research Paper
sponsored ads
We use cookies to create the best experience for you. Keep on browsing if you are OK with that, or find out how to manage cookies.
Contact Us