SlideShare a Scribd company logo
1 of 36
Design & Development
of Web Applications
using Spring MVC
by Naresh Chintalcheru
Spring MVC
Another Web MVC Framework?
Spring MVC
Another Web MVC Framework?
After learning Struts, JSF, DDUI …….
…………….. now Spring MVC ?
Spring MVC
● Benefit of using a Web Framework
● Removes the need of boilerplate code
● Gather HTTP Request Parameters
● Validation & Conversions
● Update the Model
● Standard code level design for multiple
applications in an enterprise
● Navigation Flow
● Validations
Spring MVC
● Benefit of using a Web Framework
● No Web Application Component Design
● Use Web Framework as Design Templates
and plugin the View, Model and Controllers
Spring MVC
● Benefit of using a Web Framework
● Speed up the development
Spring MVC
Web MVC Frameworks
● Struts
● JSF
● Wicket
● DDUI
● Spring MVC
Spring MVC
Presentation Layer Frameworks
● Web MVC Framework
● Template Framework
● View Technologies
● UI Widget Framework
Spring MVC
Template Frameworks
● Tiles
● Facelets
● SiteMesh
View Technologies
● JSP
● XHTML
● XSLT
UI Widget Frameworks
● JQuery
● DOJO
● SFX
Spring MVC
Why Spring MVC Framework?
Spring MVC
Spring MVC is a action-based or request-based
framework similar to Struts.
JSF is a component-based framework.
Spring MVC
Spring MVC
Spring MVC
Spring MVC vs JSF
● JSF is part of JEE Specification
● JSF is based on component architecture and
has learning curve
● Limited HTTP GET method support in JSF
● REST Web Services Support in Spring MVC.
Spring MVC
Spring MVC vs Struts
● Struts forces concrete Inheritance of
Action/ActionForm, taking away single shot of
Inheritance in Java.
● Spring MVC based on Interfaces and
Annotations.
● Spring MVC is truly view-agnostic. Many
options in View Technologies.
● Use Spring IoC Container from Presentation
Tier to Integration Tier.
Spring MVC
Spring MVC is only one module in the Spring Framework
Spring Framework Fundamentals
Spring Framework Fundamentals
Spring Framework Fundamentals
What is Spring Framework ?
● Spring Framework is …..
● Open Source Meta Framework
● Provides frameworks and container
● Simplify the development
Spring Framework Fundamentals
Spring framework is a Layered Architecture
Choose the modules needed and eliminate other
modules
All modules are built on the top of its core
container
Spring Framework
Benefits:
● Light Weight
● Promotes good OO design
● Container Agnostic Framework : Insulates the
application from its hosting container.
Spring Framework Fundamentals
Spring Has Two Web Frameworks
● Spring MVC
● Spring Web Flow
Spring Framework Fundamentals
Spring Framework Web Flow
● Secondary Page Flow logic framework
● Can be used with Spring MVC, JSF and
Struts.
Spring Framework Fundamentals
Spring MVC Request Flow ….
Spring MVC
Spring MVC
Spring MVC
Spring MVC
Spring MVC
Front Controller Design Pattern:
● DispatcherServlet is the Front Controller handles Client
Requests.
● ActionServlet in Struts
● FacesServlet in JSF
● AppServlet in DDUI
Spring MVC
Controller Design Pattern in MVC:
● Controllers are components that are being called by the
Dispatcher Servlet for performing page level logic and
delegate to Service Objects.
● Action Classes in Struts
● Managed Beans & Backed Beans in JSF
● PageProcessor in DDUI
Spring MVC
View Resolver & Navigation Logic:
● Resolves view names to views. Resolves navigation
logic from spring-mvc.xml
● Struts-config.xml in Struts
● Jsf-config.xml in JSF
Spring MVC
Developing App using Spring MVC:
● Step 1: web.xml : Front Controller
<web-app version="2.4">
<servlet>
<servlet-name>dispatcher</servlet-name>
<servlet-class> org.springframework.web.servlet.DispatcherServlet </servlet-class>
<load-on-startup>2</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>dispatcher</servlet-name>
<url-pattern>*.*</url-pattern>
</servlet-mapping>
</web-app>
Spring MVC
Developing App using Spring MVC:
● Step 2: web.xml : ApplicationContext
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/spring-mvc.xml</param-value>
</context-param>
Spring MVC
Developing App using Spring MVC:
● Step 3: spring-mvc.xml : Component Scan
<beans>
<context:component-scan base-package=“com.sf.web"/>
</beans>
Spring MVC
Developing App using Spring MVC:
● Step 4: Controller Classes
@Controller
public class EmployeeController {
@Autowired
private final EmployeeSO employeeSO;
@RequestMapping("/emplist")
public String empHandler(Model model) {
List empList = employeeSO.getAllEmp();
model.addAttribute(“empList”, empList);
return “ListEmpPage” ;
}
}
Spring MVC
Bean Validation Framework JSR-303:
public class Employee {
@NotNull
@Pattern(regexp = "[a-z-A-Z]*")
private String firstName;
@Size(min=2, max=15)
private String lastName;
@Past
private Date birthDate;
@Email (message=“Invalid Email “)
private String email;
Spring MVC
REST Web Services:
http://localhost:8080/SpringMVC/employee/John
@Controller @RequestMapping("/employee")
public class EmployeeController {
@RequestMapping( value="/{name}“ )
public String getEmp(@PathVariable String name, ModelMap
model) {
model.addAttribute(“emp", name);
return “EmpListPage";
}
}
Spring MVC
Question & Answers

More Related Content

What's hot

PUC SE Day 2019 - SpringBoot
PUC SE Day 2019 - SpringBootPUC SE Day 2019 - SpringBoot
PUC SE Day 2019 - SpringBootJosué Neis
 
Spring MVC framework
Spring MVC frameworkSpring MVC framework
Spring MVC frameworkMohit Gupta
 
Modularize JavaScript with RequireJS
Modularize JavaScript with RequireJSModularize JavaScript with RequireJS
Modularize JavaScript with RequireJSMinh Hoang
 
Reactjs Introduction - Virtual DOM
Reactjs Introduction - Virtual DOMReactjs Introduction - Virtual DOM
Reactjs Introduction - Virtual DOMTamir Azrab
 
Advance java Online Training in Hyderabad
Advance java Online Training in HyderabadAdvance java Online Training in Hyderabad
Advance java Online Training in HyderabadUgs8008
 
Java EE 8 Web Frameworks: A Look at JSF vs MVC
Java EE 8 Web Frameworks: A Look at JSF vs MVCJava EE 8 Web Frameworks: A Look at JSF vs MVC
Java EE 8 Web Frameworks: A Look at JSF vs MVCJosh Juneau
 
Web sockets in Angular
Web sockets in AngularWeb sockets in Angular
Web sockets in AngularYakov Fain
 
Struts 2 - Introduction
Struts 2 - Introduction Struts 2 - Introduction
Struts 2 - Introduction Hitesh-Java
 
The Past Year in Spring for Apache Geode
The Past Year in Spring for Apache GeodeThe Past Year in Spring for Apache Geode
The Past Year in Spring for Apache GeodeVMware Tanzu
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring Framework Serhat Can
 
MVC Demystified: Essence of Ruby on Rails
MVC Demystified: Essence of Ruby on RailsMVC Demystified: Essence of Ruby on Rails
MVC Demystified: Essence of Ruby on Railscodeinmotion
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring FrameworkRajind Ruparathna
 

What's hot (19)

PUC SE Day 2019 - SpringBoot
PUC SE Day 2019 - SpringBootPUC SE Day 2019 - SpringBoot
PUC SE Day 2019 - SpringBoot
 
Spring MVC framework
Spring MVC frameworkSpring MVC framework
Spring MVC framework
 
Modularize JavaScript with RequireJS
Modularize JavaScript with RequireJSModularize JavaScript with RequireJS
Modularize JavaScript with RequireJS
 
Reactjs Introduction - Virtual DOM
Reactjs Introduction - Virtual DOMReactjs Introduction - Virtual DOM
Reactjs Introduction - Virtual DOM
 
Advance java Online Training in Hyderabad
Advance java Online Training in HyderabadAdvance java Online Training in Hyderabad
Advance java Online Training in Hyderabad
 
Spring Framework
Spring FrameworkSpring Framework
Spring Framework
 
Java EE 8 Web Frameworks: A Look at JSF vs MVC
Java EE 8 Web Frameworks: A Look at JSF vs MVCJava EE 8 Web Frameworks: A Look at JSF vs MVC
Java EE 8 Web Frameworks: A Look at JSF vs MVC
 
Introduction to Spring Boot
Introduction to Spring BootIntroduction to Spring Boot
Introduction to Spring Boot
 
Web sockets in Angular
Web sockets in AngularWeb sockets in Angular
Web sockets in Angular
 
Struts 2 - Introduction
Struts 2 - Introduction Struts 2 - Introduction
Struts 2 - Introduction
 
React js Demo Explanation
React js Demo ExplanationReact js Demo Explanation
React js Demo Explanation
 
The Past Year in Spring for Apache Geode
The Past Year in Spring for Apache GeodeThe Past Year in Spring for Apache Geode
The Past Year in Spring for Apache Geode
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring Framework
 
Spring MVC 5 & Hibernate 5 Integration
Spring MVC 5 & Hibernate 5 IntegrationSpring MVC 5 & Hibernate 5 Integration
Spring MVC 5 & Hibernate 5 Integration
 
J servlets
J servletsJ servlets
J servlets
 
MVC Demystified: Essence of Ruby on Rails
MVC Demystified: Essence of Ruby on RailsMVC Demystified: Essence of Ruby on Rails
MVC Demystified: Essence of Ruby on Rails
 
Struts,Jsp,Servlet
Struts,Jsp,ServletStruts,Jsp,Servlet
Struts,Jsp,Servlet
 
Require.JS
Require.JSRequire.JS
Require.JS
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring Framework
 

Viewers also liked

Skillwise-Spring framework 1
Skillwise-Spring framework 1Skillwise-Spring framework 1
Skillwise-Spring framework 1Skillwise Group
 
Building Web Application Using Spring Framework
Building Web Application Using Spring FrameworkBuilding Web Application Using Spring Framework
Building Web Application Using Spring FrameworkEdureka!
 
Enhancing Spring MVC Web Applications Progressively with Spring JavaScript
Enhancing Spring MVC Web Applications Progressively with Spring JavaScriptEnhancing Spring MVC Web Applications Progressively with Spring JavaScript
Enhancing Spring MVC Web Applications Progressively with Spring JavaScriptJeremy Grelle
 
Modern Architectures with Spring and JavaScript
Modern Architectures with Spring and JavaScriptModern Architectures with Spring and JavaScript
Modern Architectures with Spring and JavaScriptmartinlippert
 
Spring I/O 2012: Natural Templating in Spring MVC with Thymeleaf
Spring I/O 2012: Natural Templating in Spring MVC with ThymeleafSpring I/O 2012: Natural Templating in Spring MVC with Thymeleaf
Spring I/O 2012: Natural Templating in Spring MVC with ThymeleafThymeleaf
 
Java Spring MVC Framework with AngularJS by Google and HTML5
Java Spring MVC Framework with AngularJS by Google and HTML5Java Spring MVC Framework with AngularJS by Google and HTML5
Java Spring MVC Framework with AngularJS by Google and HTML5Tuna Tore
 
Building a Scalable Architecture for web apps
Building a Scalable Architecture for web appsBuilding a Scalable Architecture for web apps
Building a Scalable Architecture for web appsDirecti Group
 
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - DOSUG February 2016
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - DOSUG February 2016Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - DOSUG February 2016
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - DOSUG February 2016Matt Raible
 
Hr coverage directi 2012
Hr coverage directi 2012Hr coverage directi 2012
Hr coverage directi 2012Directi Group
 
Web Application Development Fundamentals
Web Application Development FundamentalsWeb Application Development Fundamentals
Web Application Development FundamentalsMohammed Makhlouf
 
Web Design & Development Trends Presentation
Web Design & Development Trends PresentationWeb Design & Development Trends Presentation
Web Design & Development Trends PresentationRichard Bowden
 
A project report on comparative study of mutual funds in india
A project report on comparative study of mutual funds in indiaA project report on comparative study of mutual funds in india
A project report on comparative study of mutual funds in indiaProjects Kart
 
Introduction to Web Architecture
Introduction to Web ArchitectureIntroduction to Web Architecture
Introduction to Web ArchitectureChamnap Chhorn
 
Fundamentals of Web Development For Non-Developers
Fundamentals of Web Development For Non-DevelopersFundamentals of Web Development For Non-Developers
Fundamentals of Web Development For Non-DevelopersLemi Orhan Ergin
 
Architecture of a Modern Web App
Architecture of a Modern Web AppArchitecture of a Modern Web App
Architecture of a Modern Web Appscothis
 

Viewers also liked (20)

SpringMVC
SpringMVCSpringMVC
SpringMVC
 
Skillwise-Spring framework 1
Skillwise-Spring framework 1Skillwise-Spring framework 1
Skillwise-Spring framework 1
 
Spring Framework - III
Spring Framework - IIISpring Framework - III
Spring Framework - III
 
Building Web Application Using Spring Framework
Building Web Application Using Spring FrameworkBuilding Web Application Using Spring Framework
Building Web Application Using Spring Framework
 
Enhancing Spring MVC Web Applications Progressively with Spring JavaScript
Enhancing Spring MVC Web Applications Progressively with Spring JavaScriptEnhancing Spring MVC Web Applications Progressively with Spring JavaScript
Enhancing Spring MVC Web Applications Progressively with Spring JavaScript
 
Modern Architectures with Spring and JavaScript
Modern Architectures with Spring and JavaScriptModern Architectures with Spring and JavaScript
Modern Architectures with Spring and JavaScript
 
Spring I/O 2012: Natural Templating in Spring MVC with Thymeleaf
Spring I/O 2012: Natural Templating in Spring MVC with ThymeleafSpring I/O 2012: Natural Templating in Spring MVC with Thymeleaf
Spring I/O 2012: Natural Templating in Spring MVC with Thymeleaf
 
Introduction to spring boot
Introduction to spring bootIntroduction to spring boot
Introduction to spring boot
 
Java Spring MVC Framework with AngularJS by Google and HTML5
Java Spring MVC Framework with AngularJS by Google and HTML5Java Spring MVC Framework with AngularJS by Google and HTML5
Java Spring MVC Framework with AngularJS by Google and HTML5
 
Building a Scalable Architecture for web apps
Building a Scalable Architecture for web appsBuilding a Scalable Architecture for web apps
Building a Scalable Architecture for web apps
 
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - DOSUG February 2016
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - DOSUG February 2016Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - DOSUG February 2016
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - DOSUG February 2016
 
Hr coverage directi 2012
Hr coverage directi 2012Hr coverage directi 2012
Hr coverage directi 2012
 
Web Application Development Fundamentals
Web Application Development FundamentalsWeb Application Development Fundamentals
Web Application Development Fundamentals
 
Web application architecture
Web application architectureWeb application architecture
Web application architecture
 
Web Design & Development Trends Presentation
Web Design & Development Trends PresentationWeb Design & Development Trends Presentation
Web Design & Development Trends Presentation
 
Final Year Project Presentation
Final Year Project PresentationFinal Year Project Presentation
Final Year Project Presentation
 
A project report on comparative study of mutual funds in india
A project report on comparative study of mutual funds in indiaA project report on comparative study of mutual funds in india
A project report on comparative study of mutual funds in india
 
Introduction to Web Architecture
Introduction to Web ArchitectureIntroduction to Web Architecture
Introduction to Web Architecture
 
Fundamentals of Web Development For Non-Developers
Fundamentals of Web Development For Non-DevelopersFundamentals of Web Development For Non-Developers
Fundamentals of Web Development For Non-Developers
 
Architecture of a Modern Web App
Architecture of a Modern Web AppArchitecture of a Modern Web App
Architecture of a Modern Web App
 

Similar to Design & Development of Web Applications using SpringMVC

Technoligent providing custom ASP.NET MVC development services
Technoligent providing custom ASP.NET MVC development servicesTechnoligent providing custom ASP.NET MVC development services
Technoligent providing custom ASP.NET MVC development servicesAaron Jacobson
 
Introduction to mvc architecture
Introduction to mvc architectureIntroduction to mvc architecture
Introduction to mvc architectureravindraquicsolv
 
Session 46 - Spring - Part 4 - Spring MVC
Session 46 - Spring - Part 4 - Spring MVCSession 46 - Spring - Part 4 - Spring MVC
Session 46 - Spring - Part 4 - Spring MVCPawanMM
 
Spring - Part 4 - Spring MVC
Spring - Part 4 - Spring MVCSpring - Part 4 - Spring MVC
Spring - Part 4 - Spring MVCHitesh-Java
 
Mvc 4 0_jayant_jindal_28082010
Mvc 4 0_jayant_jindal_28082010Mvc 4 0_jayant_jindal_28082010
Mvc 4 0_jayant_jindal_28082010Rishu Mehra
 
Web tier-framework-mvc
Web tier-framework-mvcWeb tier-framework-mvc
Web tier-framework-mvcKashfUlHuda1
 
Spring Framework
Spring Framework  Spring Framework
Spring Framework tola99
 
MVC From Beginner to Advance in Indian Style by - Indiandotnet
MVC From Beginner to Advance in Indian Style by - IndiandotnetMVC From Beginner to Advance in Indian Style by - Indiandotnet
MVC From Beginner to Advance in Indian Style by - IndiandotnetIndiandotnet
 
Sitecore MVC: What it is and why it's important
Sitecore MVC: What it is and why it's importantSitecore MVC: What it is and why it's important
Sitecore MVC: What it is and why it's importantnonlinear creations
 
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 3 ...
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 3 ...Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 3 ...
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 3 ...WebStackAcademy
 
Which is better asp.net mvc vs asp.net
Which is better  asp.net mvc vs asp.netWhich is better  asp.net mvc vs asp.net
Which is better asp.net mvc vs asp.netConcetto Labs
 

Similar to Design & Development of Web Applications using SpringMVC (20)

Technoligent providing custom ASP.NET MVC development services
Technoligent providing custom ASP.NET MVC development servicesTechnoligent providing custom ASP.NET MVC development services
Technoligent providing custom ASP.NET MVC development services
 
Introduction to mvc architecture
Introduction to mvc architectureIntroduction to mvc architecture
Introduction to mvc architecture
 
Spring mvc
Spring mvcSpring mvc
Spring mvc
 
Session 46 - Spring - Part 4 - Spring MVC
Session 46 - Spring - Part 4 - Spring MVCSession 46 - Spring - Part 4 - Spring MVC
Session 46 - Spring - Part 4 - Spring MVC
 
Month 2 report
Month 2 reportMonth 2 report
Month 2 report
 
Spring - Part 4 - Spring MVC
Spring - Part 4 - Spring MVCSpring - Part 4 - Spring MVC
Spring - Part 4 - Spring MVC
 
Ios models
Ios modelsIos models
Ios models
 
Aspnet mvc
Aspnet mvcAspnet mvc
Aspnet mvc
 
Mvc 4 0_jayant_jindal_28082010
Mvc 4 0_jayant_jindal_28082010Mvc 4 0_jayant_jindal_28082010
Mvc 4 0_jayant_jindal_28082010
 
Spring Framework-II
Spring Framework-IISpring Framework-II
Spring Framework-II
 
MVC architecture
MVC architectureMVC architecture
MVC architecture
 
MVC & backbone.js
MVC & backbone.jsMVC & backbone.js
MVC & backbone.js
 
Mvc
MvcMvc
Mvc
 
Web tier-framework-mvc
Web tier-framework-mvcWeb tier-framework-mvc
Web tier-framework-mvc
 
Spring Framework
Spring Framework  Spring Framework
Spring Framework
 
MVC From Beginner to Advance in Indian Style by - Indiandotnet
MVC From Beginner to Advance in Indian Style by - IndiandotnetMVC From Beginner to Advance in Indian Style by - Indiandotnet
MVC From Beginner to Advance in Indian Style by - Indiandotnet
 
Sitecore MVC: What it is and why it's important
Sitecore MVC: What it is and why it's importantSitecore MVC: What it is and why it's important
Sitecore MVC: What it is and why it's important
 
Asp.net mvc
Asp.net mvcAsp.net mvc
Asp.net mvc
 
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 3 ...
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 3 ...Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 3 ...
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 3 ...
 
Which is better asp.net mvc vs asp.net
Which is better  asp.net mvc vs asp.netWhich is better  asp.net mvc vs asp.net
Which is better asp.net mvc vs asp.net
 

More from Naresh Chintalcheru

Bimodal IT for Speed and Innovation
Bimodal IT for Speed and InnovationBimodal IT for Speed and Innovation
Bimodal IT for Speed and InnovationNaresh Chintalcheru
 
Introduction to Node.js Platform
Introduction to Node.js PlatformIntroduction to Node.js Platform
Introduction to Node.js PlatformNaresh Chintalcheru
 
Asynchronous Processing in Java/JEE/Spring
Asynchronous Processing in Java/JEE/SpringAsynchronous Processing in Java/JEE/Spring
Asynchronous Processing in Java/JEE/SpringNaresh Chintalcheru
 
Problems opening SOA to the Online Web Applications
Problems opening SOA to the Online Web ApplicationsProblems opening SOA to the Online Web Applications
Problems opening SOA to the Online Web ApplicationsNaresh Chintalcheru
 
Lie Cheat & Steal to build Hyper-Fast Applications using Event-Driven Archite...
Lie Cheat & Steal to build Hyper-Fast Applications using Event-Driven Archite...Lie Cheat & Steal to build Hyper-Fast Applications using Event-Driven Archite...
Lie Cheat & Steal to build Hyper-Fast Applications using Event-Driven Archite...Naresh Chintalcheru
 
Java7 New Features and Code Examples
Java7 New Features and Code ExamplesJava7 New Features and Code Examples
Java7 New Features and Code ExamplesNaresh Chintalcheru
 
Design & Develop Batch Applications in Java/JEE
Design & Develop Batch Applications in Java/JEEDesign & Develop Batch Applications in Java/JEE
Design & Develop Batch Applications in Java/JEENaresh Chintalcheru
 
Building Next Generation Real-Time Web Applications using Websockets
Building Next Generation Real-Time Web Applications using WebsocketsBuilding Next Generation Real-Time Web Applications using Websockets
Building Next Generation Real-Time Web Applications using WebsocketsNaresh Chintalcheru
 
Automation Testing using Selenium
Automation Testing using SeleniumAutomation Testing using Selenium
Automation Testing using SeleniumNaresh Chintalcheru
 
Object-Oriented Polymorphism Unleashed
Object-Oriented Polymorphism UnleashedObject-Oriented Polymorphism Unleashed
Object-Oriented Polymorphism UnleashedNaresh Chintalcheru
 

More from Naresh Chintalcheru (15)

Cars.com Journey to AWS Cloud
Cars.com Journey to AWS CloudCars.com Journey to AWS Cloud
Cars.com Journey to AWS Cloud
 
Bimodal IT for Speed and Innovation
Bimodal IT for Speed and InnovationBimodal IT for Speed and Innovation
Bimodal IT for Speed and Innovation
 
Reactive systems
Reactive systemsReactive systems
Reactive systems
 
Introduction to Node.js Platform
Introduction to Node.js PlatformIntroduction to Node.js Platform
Introduction to Node.js Platform
 
Asynchronous Processing in Java/JEE/Spring
Asynchronous Processing in Java/JEE/SpringAsynchronous Processing in Java/JEE/Spring
Asynchronous Processing in Java/JEE/Spring
 
Problems opening SOA to the Online Web Applications
Problems opening SOA to the Online Web ApplicationsProblems opening SOA to the Online Web Applications
Problems opening SOA to the Online Web Applications
 
Lie Cheat & Steal to build Hyper-Fast Applications using Event-Driven Archite...
Lie Cheat & Steal to build Hyper-Fast Applications using Event-Driven Archite...Lie Cheat & Steal to build Hyper-Fast Applications using Event-Driven Archite...
Lie Cheat & Steal to build Hyper-Fast Applications using Event-Driven Archite...
 
Java7 New Features and Code Examples
Java7 New Features and Code ExamplesJava7 New Features and Code Examples
Java7 New Features and Code Examples
 
Big Trends in Big Data
Big Trends in Big DataBig Trends in Big Data
Big Trends in Big Data
 
Design & Develop Batch Applications in Java/JEE
Design & Develop Batch Applications in Java/JEEDesign & Develop Batch Applications in Java/JEE
Design & Develop Batch Applications in Java/JEE
 
Building Next Generation Real-Time Web Applications using Websockets
Building Next Generation Real-Time Web Applications using WebsocketsBuilding Next Generation Real-Time Web Applications using Websockets
Building Next Generation Real-Time Web Applications using Websockets
 
Mule ESB Fundamentals
Mule ESB FundamentalsMule ESB Fundamentals
Mule ESB Fundamentals
 
Automation Testing using Selenium
Automation Testing using SeleniumAutomation Testing using Selenium
Automation Testing using Selenium
 
Android Platform Architecture
Android Platform ArchitectureAndroid Platform Architecture
Android Platform Architecture
 
Object-Oriented Polymorphism Unleashed
Object-Oriented Polymorphism UnleashedObject-Oriented Polymorphism Unleashed
Object-Oriented Polymorphism Unleashed
 

Recently uploaded

UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPathCommunity
 
UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7DianaGray10
 
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019IES VE
 
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online CollaborationCOMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online Collaborationbruanjhuli
 
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesAI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesMd Hossain Ali
 
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostKubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostMatt Ray
 
UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6DianaGray10
 
Introduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxIntroduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxMatsuo Lab
 
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPAAnypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPAshyamraj55
 
Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1DianaGray10
 
Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™Adtran
 
Cybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxCybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxGDSC PJATK
 
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationUsing IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationIES VE
 
How Accurate are Carbon Emissions Projections?
How Accurate are Carbon Emissions Projections?How Accurate are Carbon Emissions Projections?
How Accurate are Carbon Emissions Projections?IES VE
 
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...DianaGray10
 
Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Commit University
 
Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.YounusS2
 
VoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBXVoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBXTarek Kalaji
 
AI You Can Trust - Ensuring Success with Data Integrity Webinar
AI You Can Trust - Ensuring Success with Data Integrity WebinarAI You Can Trust - Ensuring Success with Data Integrity Webinar
AI You Can Trust - Ensuring Success with Data Integrity WebinarPrecisely
 

Recently uploaded (20)

UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation Developers
 
UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7
 
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
 
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online CollaborationCOMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
 
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesAI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
 
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostKubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
 
UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6
 
Introduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxIntroduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptx
 
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPAAnypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
 
Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1
 
Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™
 
Cybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxCybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptx
 
20150722 - AGV
20150722 - AGV20150722 - AGV
20150722 - AGV
 
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationUsing IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
 
How Accurate are Carbon Emissions Projections?
How Accurate are Carbon Emissions Projections?How Accurate are Carbon Emissions Projections?
How Accurate are Carbon Emissions Projections?
 
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
 
Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)
 
Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.
 
VoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBXVoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBX
 
AI You Can Trust - Ensuring Success with Data Integrity Webinar
AI You Can Trust - Ensuring Success with Data Integrity WebinarAI You Can Trust - Ensuring Success with Data Integrity Webinar
AI You Can Trust - Ensuring Success with Data Integrity Webinar
 

Design & Development of Web Applications using SpringMVC

  • 1. Design & Development of Web Applications using Spring MVC by Naresh Chintalcheru
  • 2. Spring MVC Another Web MVC Framework?
  • 3. Spring MVC Another Web MVC Framework? After learning Struts, JSF, DDUI ……. …………….. now Spring MVC ?
  • 4. Spring MVC ● Benefit of using a Web Framework ● Removes the need of boilerplate code ● Gather HTTP Request Parameters ● Validation & Conversions ● Update the Model ● Standard code level design for multiple applications in an enterprise ● Navigation Flow ● Validations
  • 5. Spring MVC ● Benefit of using a Web Framework ● No Web Application Component Design ● Use Web Framework as Design Templates and plugin the View, Model and Controllers
  • 6. Spring MVC ● Benefit of using a Web Framework ● Speed up the development
  • 7. Spring MVC Web MVC Frameworks ● Struts ● JSF ● Wicket ● DDUI ● Spring MVC
  • 8. Spring MVC Presentation Layer Frameworks ● Web MVC Framework ● Template Framework ● View Technologies ● UI Widget Framework
  • 9. Spring MVC Template Frameworks ● Tiles ● Facelets ● SiteMesh View Technologies ● JSP ● XHTML ● XSLT UI Widget Frameworks ● JQuery ● DOJO ● SFX
  • 10. Spring MVC Why Spring MVC Framework?
  • 11. Spring MVC Spring MVC is a action-based or request-based framework similar to Struts. JSF is a component-based framework.
  • 14. Spring MVC Spring MVC vs JSF ● JSF is part of JEE Specification ● JSF is based on component architecture and has learning curve ● Limited HTTP GET method support in JSF ● REST Web Services Support in Spring MVC.
  • 15. Spring MVC Spring MVC vs Struts ● Struts forces concrete Inheritance of Action/ActionForm, taking away single shot of Inheritance in Java. ● Spring MVC based on Interfaces and Annotations. ● Spring MVC is truly view-agnostic. Many options in View Technologies. ● Use Spring IoC Container from Presentation Tier to Integration Tier.
  • 16. Spring MVC Spring MVC is only one module in the Spring Framework
  • 19. Spring Framework Fundamentals What is Spring Framework ? ● Spring Framework is ….. ● Open Source Meta Framework ● Provides frameworks and container ● Simplify the development
  • 20. Spring Framework Fundamentals Spring framework is a Layered Architecture Choose the modules needed and eliminate other modules All modules are built on the top of its core container
  • 21. Spring Framework Benefits: ● Light Weight ● Promotes good OO design ● Container Agnostic Framework : Insulates the application from its hosting container.
  • 22. Spring Framework Fundamentals Spring Has Two Web Frameworks ● Spring MVC ● Spring Web Flow
  • 23. Spring Framework Fundamentals Spring Framework Web Flow ● Secondary Page Flow logic framework ● Can be used with Spring MVC, JSF and Struts.
  • 24. Spring Framework Fundamentals Spring MVC Request Flow ….
  • 27. Spring MVC Front Controller Design Pattern: ● DispatcherServlet is the Front Controller handles Client Requests. ● ActionServlet in Struts ● FacesServlet in JSF ● AppServlet in DDUI
  • 28. Spring MVC Controller Design Pattern in MVC: ● Controllers are components that are being called by the Dispatcher Servlet for performing page level logic and delegate to Service Objects. ● Action Classes in Struts ● Managed Beans & Backed Beans in JSF ● PageProcessor in DDUI
  • 29. Spring MVC View Resolver & Navigation Logic: ● Resolves view names to views. Resolves navigation logic from spring-mvc.xml ● Struts-config.xml in Struts ● Jsf-config.xml in JSF
  • 30. Spring MVC Developing App using Spring MVC: ● Step 1: web.xml : Front Controller <web-app version="2.4"> <servlet> <servlet-name>dispatcher</servlet-name> <servlet-class> org.springframework.web.servlet.DispatcherServlet </servlet-class> <load-on-startup>2</load-on-startup> </servlet> <servlet-mapping> <servlet-name>dispatcher</servlet-name> <url-pattern>*.*</url-pattern> </servlet-mapping> </web-app>
  • 31. Spring MVC Developing App using Spring MVC: ● Step 2: web.xml : ApplicationContext <listener> <listener-class> org.springframework.web.context.ContextLoaderListener </listener-class> </listener> <context-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/spring-mvc.xml</param-value> </context-param>
  • 32. Spring MVC Developing App using Spring MVC: ● Step 3: spring-mvc.xml : Component Scan <beans> <context:component-scan base-package=“com.sf.web"/> </beans>
  • 33. Spring MVC Developing App using Spring MVC: ● Step 4: Controller Classes @Controller public class EmployeeController { @Autowired private final EmployeeSO employeeSO; @RequestMapping("/emplist") public String empHandler(Model model) { List empList = employeeSO.getAllEmp(); model.addAttribute(“empList”, empList); return “ListEmpPage” ; } }
  • 34. Spring MVC Bean Validation Framework JSR-303: public class Employee { @NotNull @Pattern(regexp = "[a-z-A-Z]*") private String firstName; @Size(min=2, max=15) private String lastName; @Past private Date birthDate; @Email (message=“Invalid Email “) private String email;
  • 35. Spring MVC REST Web Services: http://localhost:8080/SpringMVC/employee/John @Controller @RequestMapping("/employee") public class EmployeeController { @RequestMapping( value="/{name}“ ) public String getEmp(@PathVariable String name, ModelMap model) { model.addAttribute(“emp", name); return “EmpListPage"; } }