model view controller architecture of java web applications dr. m v s peri sastry,...
TRANSCRIPT
![Page 1: Model View Controller Architecture of Java Web Applications Dr. M V S Peri Sastry, Ph.D.[BITS-Pilani]](https://reader036.vdocuments.us/reader036/viewer/2022082712/56649f345503460f94c510ee/html5/thumbnails/1.jpg)
Model View Controller Architecture of Java Web Applications
Dr. M V S Peri Sastry, Ph.D.[BITS-Pilani]
![Page 2: Model View Controller Architecture of Java Web Applications Dr. M V S Peri Sastry, Ph.D.[BITS-Pilani]](https://reader036.vdocuments.us/reader036/viewer/2022082712/56649f345503460f94c510ee/html5/thumbnails/2.jpg)
![Page 3: Model View Controller Architecture of Java Web Applications Dr. M V S Peri Sastry, Ph.D.[BITS-Pilani]](https://reader036.vdocuments.us/reader036/viewer/2022082712/56649f345503460f94c510ee/html5/thumbnails/3.jpg)
Model View Controller
![Page 4: Model View Controller Architecture of Java Web Applications Dr. M V S Peri Sastry, Ph.D.[BITS-Pilani]](https://reader036.vdocuments.us/reader036/viewer/2022082712/56649f345503460f94c510ee/html5/thumbnails/4.jpg)
Model View Controller
![Page 5: Model View Controller Architecture of Java Web Applications Dr. M V S Peri Sastry, Ph.D.[BITS-Pilani]](https://reader036.vdocuments.us/reader036/viewer/2022082712/56649f345503460f94c510ee/html5/thumbnails/5.jpg)
L 5.1
![Page 6: Model View Controller Architecture of Java Web Applications Dr. M V S Peri Sastry, Ph.D.[BITS-Pilani]](https://reader036.vdocuments.us/reader036/viewer/2022082712/56649f345503460f94c510ee/html5/thumbnails/6.jpg)
• Model consists of data and the functions that operate on data
• Java bean that we use to store data is a model component
• EJB can also be used as a model component
L 5.2
Model
![Page 7: Model View Controller Architecture of Java Web Applications Dr. M V S Peri Sastry, Ph.D.[BITS-Pilani]](https://reader036.vdocuments.us/reader036/viewer/2022082712/56649f345503460f94c510ee/html5/thumbnails/7.jpg)
• View is the front end that user interact.• View can be a HTML JSP Struts ActionForm
L 5.3
view
![Page 8: Model View Controller Architecture of Java Web Applications Dr. M V S Peri Sastry, Ph.D.[BITS-Pilani]](https://reader036.vdocuments.us/reader036/viewer/2022082712/56649f345503460f94c510ee/html5/thumbnails/8.jpg)
• Controller component responsibilities1. Receive request from client2. Map request to specific business operation3. Determine the view to display based on the
result of the business operation
L 5.4
Controller
![Page 9: Model View Controller Architecture of Java Web Applications Dr. M V S Peri Sastry, Ph.D.[BITS-Pilani]](https://reader036.vdocuments.us/reader036/viewer/2022082712/56649f345503460f94c510ee/html5/thumbnails/9.jpg)
Advantages of MVC architecture
• 1) Clear separation between presentation logic and business logic.2)Each object in mvc have distinct responsibilities.3)All objects and classes are independent of each other.so change in one class does't need alternation in other classes.4)Easy to maintain the code and future improvements.
![Page 10: Model View Controller Architecture of Java Web Applications Dr. M V S Peri Sastry, Ph.D.[BITS-Pilani]](https://reader036.vdocuments.us/reader036/viewer/2022082712/56649f345503460f94c510ee/html5/thumbnails/10.jpg)
Disadvantages
• Increased Complexity• Time consuming• Knowledge of multiple technologies are
required• If you change controller code then• i. We need to recompile the class & redeploy
the Application• ii. We need to write separate code for that file
![Page 11: Model View Controller Architecture of Java Web Applications Dr. M V S Peri Sastry, Ph.D.[BITS-Pilani]](https://reader036.vdocuments.us/reader036/viewer/2022082712/56649f345503460f94c510ee/html5/thumbnails/11.jpg)
Thank you