#90 Added pattern description to README.md

This commit is contained in:
Ilkka Seppala
2015-07-19 14:17:01 +03:00
parent 600215599c
commit 3fc25a2102

View File

@ -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-Controller](#model-view-controller)
* [Model-View-Presenter](#model-view-presenter) * [Model-View-Presenter](#model-view-presenter)
* [Flux](#flux) * [Flux](#flux)
* [Front Controller](#front-controller)
### Architectural Patterns ### Architectural Patterns
@ -656,6 +657,19 @@ validation and for building to order
**Real world examples:** **Real world examples:**
* [Apache Isis](https://isis.apache.org/) * [Apache Isis](https://isis.apache.org/)
## <a name="front-controller">Front Controller</a> [&#8593;](#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 # Frequently asked questions