SlideShare une entreprise Scribd logo
1  sur  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

Contenu connexe

Tendances

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
 

Tendances (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
 

En vedette

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
 

En vedette (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
 

Similaire à 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
 

Similaire à 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
 

Plus de 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
 

Plus de 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
 

Dernier

From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdfChristopherTHyatt
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 

Dernier (20)

From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 

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"; } }