A model is an application object that represents data used by the application and made available for presentation.
A model is an application object that represents data used by the app and makes it available for presentation. A simple Java Comment object can represent a comment with author and text fields. section 4.1.3section 8.3
Listing 4.1 Defining the comment
public class Comment {
private String author;
private String text;
// Omitted getters and setters
}
The Comment POJO defines author and text fields for the data it represents. section 4.1.3
How Spring Start Here, Second Edition covers it
How deep it goes
Defines a Comment POJO with two fields; leaves the MVC Model's controller-method role unanswered.
Examples
Uses a Comment object with author and text fields to illustrate modeled application data.
What you can do after
Build it from scratch by defining a Comment POJO with author and text fields.
How it connects
Links POJOs and application data to controllers, dynamic views, and template engines.
Model–view–controllerpart of · Model–view–controller is a software architectural pattern that separates application data and behavior, presentation, and interaction handling into model, view, and controller responsibilities.
data modelpart of · A data model is a structured representation that defines how data is organized, including its entities, attributes, relationships, and applicable constraints.
domain modelequivalent to · A domain model is a software representation of the concepts, entities, relationships, rules, and behavior of a problem domain.
ModelFormused by · A ModelForm is a Django form class generated from a model that maps form fields to model fields and can create or update model instances.
servlet request attributeproduces · A servlet request attribute is a named value associated with an individual HTTP request and made available to components processing that request.
This explainer was generated by Manning's knowledge graph from the text of Spring Start Here, Second Edition. The section links point to the parts of the book it draws on.