SlideShare a Scribd company logo
Overview of Design Patterns
             &
 The MVC Design Pattern
         Sapana Mehta
Sapana Mehta (CS-6V81)


                    J2EE

• Components
   – Enterprise Java Beans (EJB)
   – Java Server Pages (JSP)
   – Servlets
• Containers (service providers)
   – Web container
   – Bean Container
• Connectors (connection service providers)
Sapana Mehta (CS-6V81)
Sapana Mehta (CS-6V81)


     J2EE and Design Patterns

• J2EE: AN OPERATING SYSTEM FOR THE WEB
  Enterprise web applications, which live on
  networks and are accessible through
  browsers, are redefining Enterprise Web
  Software. This is the next wave of computing.


• The J2EE architecture is built to enable
  component developers to use a Model View
  Controller (MVC) Design Pattern.
Sapana Mehta (CS-6V81)


        MVC continued

• Model encapsulates the core data and
  functionality
• View encapsulates the presentation of the data
  there can be many views of the common data
• Controller accepts input from the user and
  makes request from the model for the data to
  produce a new view.
Sapana Mehta (CS-6V81)


MVC Structure for J2EE
Sapana Mehta (CS-6V81)


             MVC Architecture
• The Model represents the structure of the data in the
  application, as well as application-specific operations
  on those data.

• A View (of which there may be many) presents data in
  some form to a user, in the context of some
  application function.

• A Controller translates user actions (mouse
  motions, keystrokes, words spoken, etc.) and user
  input into application function calls on the model, and
  selects the appropriate View based on user preferences
  and Model state.
Sapana Mehta (CS-6V81)


           Advantages of MVC

• Separating Model from View (that is,
  separating data representation from
  presentation)
  - easy to add multiple data presentations for
    the same data,
  -facilitates adding new types of data
  presentation as technology develops.
  -Model and View components can vary
  independently enhancing maintainability,
  extensibility, and testability.
Sapana Mehta (CS-6V81)

     Advantages of MVC design
             Pattern
• Separating Controller from View (application behavior
   from presentation)
   - permits run-time selection of appropriate
    Views based on workflow, user preferences,
    or Model state.
• Separating Controller from Model (application behavior
   from data representation)
  - allows configurable mapping of user actions
    on the Controller to application functions on
    the Model.
Sapana Mehta (CS-6V81)


    Consequences or Benefits

• We make changes without bringing down the
  server.
• We leave the core code alone
• We can have multiple versions of the same
  data displayed
• We can test our changes in the actual
  environment.
• We have achieved “separation of concerns”

More Related Content

What's hot

Java Servlets
Java ServletsJava Servlets
Java Servlets
BG Java EE Course
 
Java Server Pages(jsp)
Java Server Pages(jsp)Java Server Pages(jsp)
Java Server Pages(jsp)
Manisha Keim
 
Introduction to SOAP/WSDL Web Services and RESTful Web Services
Introduction to SOAP/WSDL Web Services and RESTful Web ServicesIntroduction to SOAP/WSDL Web Services and RESTful Web Services
Introduction to SOAP/WSDL Web Services and RESTful Web Services
ecosio GmbH
 
REST API
REST APIREST API
REST API
Tofazzal Ahmed
 
ASP.NET MVC Presentation
ASP.NET MVC PresentationASP.NET MVC Presentation
ASP.NET MVC Presentation
ivpol
 
enterprise java bean
enterprise java beanenterprise java bean
enterprise java bean
Jitender Singh Lodhi
 
Angular
AngularAngular
Angular
LearningTech
 
Solid principles
Solid principlesSolid principles
Solid principles
Monica Rodrigues
 
Java Servlets
Java ServletsJava Servlets
Angularjs PPT
Angularjs PPTAngularjs PPT
Angularjs PPT
Amit Baghel
 
Authentication and Authorization in Asp.Net
Authentication and Authorization in Asp.NetAuthentication and Authorization in Asp.Net
Authentication and Authorization in Asp.Net
Shivanand Arur
 
Rest API Testing
Rest API TestingRest API Testing
Rest API Testing
upadhyay_25
 
Jdbc in servlets
Jdbc in servletsJdbc in servlets
Jdbc in servlets
Nuha Noor
 
Asp.net mvc basic introduction
Asp.net mvc basic introductionAsp.net mvc basic introduction
Asp.net mvc basic introduction
Bhagath Gopinath
 
JavaScript Promises
JavaScript PromisesJavaScript Promises
JavaScript Promises
L&T Technology Services Limited
 
Fundamento de poo en php
Fundamento de poo en phpFundamento de poo en php
Fundamento de poo en php
Robert Moreira
 
Servlets
ServletsServlets
Servlet and servlet life cycle
Servlet and servlet life cycleServlet and servlet life cycle
Servlet and servlet life cycle
Dhruvin Nakrani
 
Servlet and Servlet Life Cycle
Servlet and Servlet Life CycleServlet and Servlet Life Cycle
Servlet and Servlet Life Cycle
Dhrumil Panchal
 

What's hot (20)

Java Servlets
Java ServletsJava Servlets
Java Servlets
 
Java Server Pages(jsp)
Java Server Pages(jsp)Java Server Pages(jsp)
Java Server Pages(jsp)
 
Mvc architecture
Mvc architectureMvc architecture
Mvc architecture
 
Introduction to SOAP/WSDL Web Services and RESTful Web Services
Introduction to SOAP/WSDL Web Services and RESTful Web ServicesIntroduction to SOAP/WSDL Web Services and RESTful Web Services
Introduction to SOAP/WSDL Web Services and RESTful Web Services
 
REST API
REST APIREST API
REST API
 
ASP.NET MVC Presentation
ASP.NET MVC PresentationASP.NET MVC Presentation
ASP.NET MVC Presentation
 
enterprise java bean
enterprise java beanenterprise java bean
enterprise java bean
 
Angular
AngularAngular
Angular
 
Solid principles
Solid principlesSolid principles
Solid principles
 
Java Servlets
Java ServletsJava Servlets
Java Servlets
 
Angularjs PPT
Angularjs PPTAngularjs PPT
Angularjs PPT
 
Authentication and Authorization in Asp.Net
Authentication and Authorization in Asp.NetAuthentication and Authorization in Asp.Net
Authentication and Authorization in Asp.Net
 
Rest API Testing
Rest API TestingRest API Testing
Rest API Testing
 
Jdbc in servlets
Jdbc in servletsJdbc in servlets
Jdbc in servlets
 
Asp.net mvc basic introduction
Asp.net mvc basic introductionAsp.net mvc basic introduction
Asp.net mvc basic introduction
 
JavaScript Promises
JavaScript PromisesJavaScript Promises
JavaScript Promises
 
Fundamento de poo en php
Fundamento de poo en phpFundamento de poo en php
Fundamento de poo en php
 
Servlets
ServletsServlets
Servlets
 
Servlet and servlet life cycle
Servlet and servlet life cycleServlet and servlet life cycle
Servlet and servlet life cycle
 
Servlet and Servlet Life Cycle
Servlet and Servlet Life CycleServlet and Servlet Life Cycle
Servlet and Servlet Life Cycle
 

Viewers also liked

J2EE Introduction
J2EE IntroductionJ2EE Introduction
J2EE Introduction
Patroklos Papapetrou (Pat)
 
Java Server Pages
Java Server PagesJava Server Pages
Java Server Pages
Shah Nawaz Bhurt
 
Jsp
JspJsp
Implicit object.pptx
Implicit object.pptxImplicit object.pptx
Implicit object.pptx
chakrapani tripathi
 
Jsp element
Jsp elementJsp element
Jsp element
kamal kotecha
 
Implicit objects advance Java
Implicit objects advance JavaImplicit objects advance Java
Implicit objects advance Java
Darshit Metaliya
 
J2EE and layered architecture
J2EE and layered architectureJ2EE and layered architecture
J2EE and layered architecture
Suman Behara
 
MVC ppt presentation
MVC ppt presentationMVC ppt presentation
MVC ppt presentation
Bhavin Shah
 
Web Services (SOAP, WSDL, UDDI)
Web Services (SOAP, WSDL, UDDI)Web Services (SOAP, WSDL, UDDI)
Web Services (SOAP, WSDL, UDDI)
Peter R. Egli
 
Cookies and sessions
Cookies and sessionsCookies and sessions
Cookies and sessions
Lena Petsenchuk
 

Viewers also liked (13)

J2EE Introduction
J2EE IntroductionJ2EE Introduction
J2EE Introduction
 
Design patterns
Design patternsDesign patterns
Design patterns
 
Java Server Pages
Java Server PagesJava Server Pages
Java Server Pages
 
Jsp
JspJsp
Jsp
 
Implicit object.pptx
Implicit object.pptxImplicit object.pptx
Implicit object.pptx
 
Jsp element
Jsp elementJsp element
Jsp element
 
Implicit objects advance Java
Implicit objects advance JavaImplicit objects advance Java
Implicit objects advance Java
 
J2EE and layered architecture
J2EE and layered architectureJ2EE and layered architecture
J2EE and layered architecture
 
JSP
JSPJSP
JSP
 
MVC ppt presentation
MVC ppt presentationMVC ppt presentation
MVC ppt presentation
 
Web Services (SOAP, WSDL, UDDI)
Web Services (SOAP, WSDL, UDDI)Web Services (SOAP, WSDL, UDDI)
Web Services (SOAP, WSDL, UDDI)
 
Model View Controller (MVC)
Model View Controller (MVC)Model View Controller (MVC)
Model View Controller (MVC)
 
Cookies and sessions
Cookies and sessionsCookies and sessions
Cookies and sessions
 

Similar to Jsp with mvc

Mvc pattern and implementation in java fair
Mvc   pattern   and implementation   in   java fairMvc   pattern   and implementation   in   java fair
Mvc pattern and implementation in java fairTech_MX
 
Web tier-framework-mvc
Web tier-framework-mvcWeb tier-framework-mvc
Web tier-framework-mvc
KashfUlHuda1
 
Struts(mrsurwar) ppt
Struts(mrsurwar) pptStruts(mrsurwar) ppt
Struts(mrsurwar) ppt
mrsurwar
 
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
Aaron Jacobson
 
Asp.net,mvc
Asp.net,mvcAsp.net,mvc
Asp.net,mvc
Prashant Kumar
 
Software Design Patterns
Software Design PatternsSoftware Design Patterns
Software Design Patterns
alkuzaee
 
Spring mvc
Spring mvcSpring mvc
Spring mvc
Pravin Pundge
 
Introduction to ASP.NET Core MVC and the MVC Pattern.pptx
Introduction to ASP.NET Core MVC and the MVC Pattern.pptxIntroduction to ASP.NET Core MVC and the MVC Pattern.pptx
Introduction to ASP.NET Core MVC and the MVC Pattern.pptx
QuickwayInfoSystems3
 
IRJET- MVC Framework: A Modern Web Application Development Approach and Working
IRJET- MVC Framework: A Modern Web Application Development Approach and WorkingIRJET- MVC Framework: A Modern Web Application Development Approach and Working
IRJET- MVC Framework: A Modern Web Application Development Approach and Working
IRJET Journal
 
What is ASP.NET MVC
What is ASP.NET MVCWhat is ASP.NET MVC
What is ASP.NET MVC
Brad Oyler
 
Mvc Brief Overview
Mvc Brief OverviewMvc Brief Overview
Mvc Brief Overview
rainynovember12
 
Mcv design patterns
Mcv design patternsMcv design patterns
Mcv design patterns
Rob Paok
 
ASP.Net | Sabin Saleem
ASP.Net | Sabin SaleemASP.Net | Sabin Saleem
ASP.Net | Sabin Saleem
SaBin SaleEm
 
Interaction-Oriented Architecture.pptx
Interaction-Oriented Architecture.pptxInteraction-Oriented Architecture.pptx
Interaction-Oriented Architecture.pptx
Godwin Monserate
 
Architectural Design & Patterns
Architectural Design&PatternsArchitectural Design&Patterns
Architectural Design & Patterns
Inocentshuja Ahmad
 
SaaS transformation with OCE - uEngineCloud
SaaS transformation with OCE - uEngineCloudSaaS transformation with OCE - uEngineCloud
SaaS transformation with OCE - uEngineClouduEngine Solutions
 
design pattern_MVC.pptx
design pattern_MVC.pptxdesign pattern_MVC.pptx
design pattern_MVC.pptx
Tarun710971
 
Aspnet mvc
Aspnet mvcAspnet mvc
Aspnet mvc
Hiep Luong
 

Similar to Jsp with mvc (20)

Mvc pattern and implementation in java fair
Mvc   pattern   and implementation   in   java fairMvc   pattern   and implementation   in   java fair
Mvc pattern and implementation in java fair
 
MVC Framework
MVC FrameworkMVC Framework
MVC Framework
 
J2 ee archi
J2 ee archiJ2 ee archi
J2 ee archi
 
Web tier-framework-mvc
Web tier-framework-mvcWeb tier-framework-mvc
Web tier-framework-mvc
 
Struts(mrsurwar) ppt
Struts(mrsurwar) pptStruts(mrsurwar) ppt
Struts(mrsurwar) ppt
 
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
 
Asp.net,mvc
Asp.net,mvcAsp.net,mvc
Asp.net,mvc
 
Software Design Patterns
Software Design PatternsSoftware Design Patterns
Software Design Patterns
 
Spring mvc
Spring mvcSpring mvc
Spring mvc
 
Introduction to ASP.NET Core MVC and the MVC Pattern.pptx
Introduction to ASP.NET Core MVC and the MVC Pattern.pptxIntroduction to ASP.NET Core MVC and the MVC Pattern.pptx
Introduction to ASP.NET Core MVC and the MVC Pattern.pptx
 
IRJET- MVC Framework: A Modern Web Application Development Approach and Working
IRJET- MVC Framework: A Modern Web Application Development Approach and WorkingIRJET- MVC Framework: A Modern Web Application Development Approach and Working
IRJET- MVC Framework: A Modern Web Application Development Approach and Working
 
What is ASP.NET MVC
What is ASP.NET MVCWhat is ASP.NET MVC
What is ASP.NET MVC
 
Mvc Brief Overview
Mvc Brief OverviewMvc Brief Overview
Mvc Brief Overview
 
Mcv design patterns
Mcv design patternsMcv design patterns
Mcv design patterns
 
ASP.Net | Sabin Saleem
ASP.Net | Sabin SaleemASP.Net | Sabin Saleem
ASP.Net | Sabin Saleem
 
Interaction-Oriented Architecture.pptx
Interaction-Oriented Architecture.pptxInteraction-Oriented Architecture.pptx
Interaction-Oriented Architecture.pptx
 
Architectural Design & Patterns
Architectural Design&PatternsArchitectural Design&Patterns
Architectural Design & Patterns
 
SaaS transformation with OCE - uEngineCloud
SaaS transformation with OCE - uEngineCloudSaaS transformation with OCE - uEngineCloud
SaaS transformation with OCE - uEngineCloud
 
design pattern_MVC.pptx
design pattern_MVC.pptxdesign pattern_MVC.pptx
design pattern_MVC.pptx
 
Aspnet mvc
Aspnet mvcAspnet mvc
Aspnet mvc
 

More from vamsitricks (20)

Unit 6
Unit 6Unit 6
Unit 6
 
Np unit2
Np unit2Np unit2
Np unit2
 
Np unit1
Np unit1Np unit1
Np unit1
 
Np unit iv i
Np unit iv iNp unit iv i
Np unit iv i
 
Np unit iii
Np unit iiiNp unit iii
Np unit iii
 
Np unit iv ii
Np unit iv iiNp unit iv ii
Np unit iv ii
 
Unit 7
Unit 7Unit 7
Unit 7
 
Npc16
Npc16Npc16
Npc16
 
Npc14
Npc14Npc14
Npc14
 
Npc13
Npc13Npc13
Npc13
 
Npc08
Npc08Npc08
Npc08
 
Unit 3
Unit 3Unit 3
Unit 3
 
Unit 5
Unit 5Unit 5
Unit 5
 
Unit 2
Unit 2Unit 2
Unit 2
 
Unit 7
Unit 7Unit 7
Unit 7
 
Unit 6
Unit 6Unit 6
Unit 6
 
Unit 4
Unit 4Unit 4
Unit 4
 
Unit4wt
Unit4wtUnit4wt
Unit4wt
 
Unit3wt
Unit3wtUnit3wt
Unit3wt
 
Unit2wt
Unit2wtUnit2wt
Unit2wt
 

Jsp with mvc

  • 1. Overview of Design Patterns & The MVC Design Pattern Sapana Mehta
  • 2. Sapana Mehta (CS-6V81) J2EE • Components – Enterprise Java Beans (EJB) – Java Server Pages (JSP) – Servlets • Containers (service providers) – Web container – Bean Container • Connectors (connection service providers)
  • 4. Sapana Mehta (CS-6V81) J2EE and Design Patterns • J2EE: AN OPERATING SYSTEM FOR THE WEB Enterprise web applications, which live on networks and are accessible through browsers, are redefining Enterprise Web Software. This is the next wave of computing. • The J2EE architecture is built to enable component developers to use a Model View Controller (MVC) Design Pattern.
  • 5. Sapana Mehta (CS-6V81) MVC continued • Model encapsulates the core data and functionality • View encapsulates the presentation of the data there can be many views of the common data • Controller accepts input from the user and makes request from the model for the data to produce a new view.
  • 6. Sapana Mehta (CS-6V81) MVC Structure for J2EE
  • 7. Sapana Mehta (CS-6V81) MVC Architecture • The Model represents the structure of the data in the application, as well as application-specific operations on those data. • A View (of which there may be many) presents data in some form to a user, in the context of some application function. • A Controller translates user actions (mouse motions, keystrokes, words spoken, etc.) and user input into application function calls on the model, and selects the appropriate View based on user preferences and Model state.
  • 8. Sapana Mehta (CS-6V81) Advantages of MVC • Separating Model from View (that is, separating data representation from presentation) - easy to add multiple data presentations for the same data, -facilitates adding new types of data presentation as technology develops. -Model and View components can vary independently enhancing maintainability, extensibility, and testability.
  • 9. Sapana Mehta (CS-6V81) Advantages of MVC design Pattern • Separating Controller from View (application behavior from presentation) - permits run-time selection of appropriate Views based on workflow, user preferences, or Model state. • Separating Controller from Model (application behavior from data representation) - allows configurable mapping of user actions on the Controller to application functions on the Model.
  • 10. Sapana Mehta (CS-6V81) Consequences or Benefits • We make changes without bringing down the server. • We leave the core code alone • We can have multiple versions of the same data displayed • We can test our changes in the actual environment. • We have achieved “separation of concerns”