Chap5 MVC
Chap5 MVC
The main goal of this design pattern was to solve the problem of users controlling a large and
complex data set by splitting a large application into specific sections that all have their own
purpose.
Components of MVC
Controller
Model
View
MVC Architecture Design
Controller:
The controller is the component that enables the interconnection between the views and the
model so it acts as an intermediary.
It processes all the business logic and incoming requests, manipulates data using
the Model component, and interact with the View to render the final output.
Responsibilities:
View:
The View component is used for all the UI logic of the application.
Views are created by the data which is collected by the model component but these data aren’t
taken directly but through the controller.
Responsibilities:
Model:
The Model component corresponds to all the data-related logic that the user works with.
This can represent either the data that is being transferred between the View and Controller
components or any other business logic-related data.
It responds to the controller’s request because the controller can’t interact with the database by
itself.
The model interacts with the database and gives the required data back to the controller.
Responsibilities:
It reduces complexity by dividing an application into three units. Model, view, and
controller.
It works well for Web apps that are supported by large teams of web designers and
developers.
This architecture helps to test components independently as all classes and objects are
independent of each other
The framework navigation can be complex as it introduces new layers of abstraction which
requires users to adapt to the decomposition criteria of MVC.
Ruby on Rails Django ,CherryPy, Spring MVC Catalyst Rails Laravel, Symphony
Q.4)Spring Frame work Architecture:
Core Container: Includes fundamental components like IoC and DI, helping to
manage object creation and configuration.
Data Access/Integration: Provides tools for interacting with databases, handling
transactions, and integrating with other data sources.
Web: Supports building web applications, including MVC (Model-View-
Controller) architecture.
AOP (Aspect-Oriented Programming) and Instrumentation: Allows adding
cross-cutting concerns like logging or security in a modular way.
Test: Offers support for testing Spring components, ensuring that they work as
expected.
Q,5)Explain Aspect Oriented Programming(AOP)
Customizable:You can change the settings any time whenever it’s neede.