The Reactor pattern allows an application to handle concurrent events while retaining the simplicity of single-threading. In this example we will create a generic version of the Reactor Pattern, it gives us further abstraction of the business logic from the pattern which improves code reuse.
The Reactor Pattern is a design pattern for synchronous demultiplexing and dispatching of concurrently arriving events. It receives incoming messages/requests/connections from multiple concurrent clients and processes these messages sequentially using event handlers. Basically the Reactor pattern allows an application to handle concurrent events while retaining the simplicity of single-threading.
The purpose of the Open Session In View (OSIV) Pattern is to handle a database session (connection and transaction) within the scope of a single web request cycle. A database session is created at the beginning of each web request, this is then used by all the different parts of the web application and then […]
The Factory Pattern is a common software development code pattern for creating objects. In this Factory Pattern example we will create a Generic Factory that conforms to the open/closed principle. The open/closed principle states “software classes, modules, functions etc. should be open for extension, but closed for modification. So in this example we will create a Factory that can be extended without having to edit the Factory class.
The Factory Pattern is a common software development code pattern for creating objects. In this example we will create a Factory class which is responsible for creating objects that all conform to a common Interface.