Skip to content

Java 8 MVC Framework

Michael Delamere edited this page Aug 12, 2016 · 13 revisions

You have read that geeMVC is a Java 8+ MVC framework, but what is an "MVC framework"?

Let's start with the term framework in the software sense. A framework can be seen as providing the base building blocks of a software application. It sets out clear boundaries between various layers and defines what role each one plays. In the development sense a framework acts like a guideline for developers to follow, thereby ensuring that all parts of the software follow the same paradigm, and as such, aims to keep maintainability high.

A framework implementation like geeMVC provides the tools or building blocks necessary to comfortably build an application with a clear structure that can be followed by the whole development team.

Now let's cover the MVC part. First of all MVC stands for:

Abbr. Name Description
M Model This is usually the domain or service layer and contains the complex business logic and database accesses.
V View This is the frontend part. In a Java web application this would usually consist of a JSP or a template and contain HTML, JavaScript and CSS.
C Controller The controller basically controls the flow of the application and takes over the communication between the view and model layer. The controller should not contain any complex business logic or database accesses.

As you can see, the MVC pattern is made up of 3 layers, and as such, gives the developer a guideline of where to place his or her objects. The MVC pattern is simple and easy to understand and supports a clean separation of code, thereby enhancing maintainability considerably.

The Java 8+ MVC framework geeMVC mainly plays the part of the controller. In a sense it helps you control the flow of your application with very little boiler-plate code. There are excellent model and view technologies out there so we did not feel the need to reinvent those. geeMVC does however offer excellent taglibs for creating form functionality with minimal fuss - in fact, it almost creates all the HTML for you! In order to better support the model layer, geeMVC also comes with some very good JPA functionality that automatically fetches your entity beans and updates them with the incoming form-data accordingly.

Basically geeMVC aims to:

  • provide developers with a framework that supports them in keeping a clean, maintainable structure, without it becoming a painful, complex rule-book,
  • let developers get their work done fast and puts the application at the center,
  • let developers customize every aspect to meet their needs, rather than being didactic,
  • make it fun to build web applications with a framework architecture that is known to most developers.
Clone this wiki locally