# 13.1 Overview
JFinal adopts a microkernel-based, full-range extensible architecture. "Full-range" refers to the spatial expression of its extension methods. JFinal is composed of five main components: Handler, Interceptor, Controller, Render, and Plugin. This chapter will provide a brief introduction to this architecture and some commonly used extensions based on it.
# Five Main Components
Handler: Responsible for the pre-processing and post-processing of incoming HTTP requests. Handlers can be used for tasks such as URL rewriting, filtering, and more.
Interceptor: A mechanism that allows you to add behavior to methods inside Controllers. They can be used for logging, security checks, transactions, etc.
Controller: The core component where the business logic resides. It maps URLs to specific methods and handles client requests.
Render: Responsible for the view rendering process. JFinal supports multiple view technologies, and you can easily extend it to support others.
Plugin: Used for extending JFinal's capabilities, like adding support for databases, queues, and other services.
# Extensibility
The architecture is designed to be highly extensible, allowing developers to easily add custom functionalities or modify existing ones. Whether you need to add a custom authentication mechanism, integrate a new view rendering engine, or extend the Controller with new functionalities, JFinal's architecture makes it straightforward.
# Typical Extensions
Some of the typical extensions that can be built based on this architecture include:
Custom Handlers: For tasks like URL rewriting, request and response modification.
Custom Interceptors: For things like logging, security checks, or method-level annotations.
Custom Controllers: For implementing specific business logic or RESTful APIs.
Custom Renders: To integrate different view technologies other than the ones provided by default.
Custom Plugins: For integrating different databases, messaging queues, or any third-party libraries.
The next sections will delve deeper into these components and provide examples and best practices for extending them.