liveBook · Manning

MVC model

As explained in Spring Start Here, Second Edition

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.3 section 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.

Also explained in

Compare how 2 books explain MVC model →

Related concepts

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.