From 3fc25a2102b76a2cce5bd10e71ed66fc7a8502b2 Mon Sep 17 00:00:00 2001 From: Ilkka Seppala Date: Sun, 19 Jul 2015 14:17:01 +0300 Subject: [PATCH] #90 Added pattern description to README.md --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 986d0dbd1..5154f6db4 100644 --- a/README.md +++ b/README.md @@ -79,6 +79,7 @@ Presentation Tier patterns are the top-most level of the application, this is co * [Model-View-Controller](#model-view-controller) * [Model-View-Presenter](#model-view-presenter) * [Flux](#flux) +* [Front Controller](#front-controller) ### Architectural Patterns @@ -656,6 +657,19 @@ validation and for building to order **Real world examples:** * [Apache Isis](https://isis.apache.org/) +## Front Controller [↑](#list-of-design-patterns) +**Intent:** Introduce a common handler for all requests for a web site. This way we can encapsulate common functionality such as security, internationalization, routing and logging in a single place. + +![alt text](https://github.com/iluwatar/java-design-patterns/blob/master/front-controller/etc/front-controller.png "Front Controller") + +**Applicability:** Use the Front Controller pattern when +* you want to encapsulate common request handling functionality in single place +* you want to implements dynamic request handling i.e. change routing without modifying code +* make web server configution portable, you only need to register the handler web server specific way + +**Real world examples:** +* [Apache Struts](https://struts.apache.org/) + # Frequently asked questions