Gobline is a set of loosely coupled components for building MVC and REST applications in PHP.
According to the original MVC pattern, the Controller should not interact with the View. Though, all major frameworks seem to contradict this rule. Gobline's MVC model tend to follow the original pattern by letting the View fetching its own data from the Model.
Each controller action is itself a class (called Action Model in Gobline jargon). Ever had a UserController controller class with a growing number of actions like add(), profile(), list(), login(), and so on? This classic approach violates SRP. With the help of sub requests (miscalled as hmvc), Gobline increases code modularity, re-usability and maintains a better separation of concerns.
At its core, Gobline invokes a set of PSR-7 middlewares which receive a request and return a response. By allowing to add your own custom middlewares, this truly allows you to manipulate the request and response at wish. This makes Gobline feel less like a framework, and more like a set of reusable libraries.
Whether you need to develop a small website displaying static templates, a REST API, or a more complex web application, Gobline has been written to meet any type and size of application.
Controllers (Action Models in Gobline jargon) are optional. Template rendering is optional.
Enforced SRP allows you to write larger applications with increased code modularity and re-usability.
Your application needs to be multilingual? Gobline comes with i18n routes out of the box. You can effortlessly generate hreflang elements and other HTML meta-data.
View helpers help the view perform certain common tasks. Gobline's view helpers are able to subscribe to view events, allowing them to add <head> elements (script, style, title, ...), html attributes, body scripts, etcetera.