Symfony is a set of standalone, decoupled, and cohesive PHP components that solve common web-development problems.
- To learn more about the low-level architecture of modern web frameworks in general and about the Symfony fullstack framework in particular.
- To experiment creating a framework.
- To show that I can really create a framework of my own.
At each step, I will have a fully-working framework that I can use as is or as a start for other projects. The goal is to have a fully featured full-stack web framework.
While most framework try to follow the MVC architecture, with Symfony its a different ball game, because Symfony Components are able to create any type of frameworks.
A look at the MVC semantics book, shows that it focusses on how to create the Controller part of the framework, because, the Model and the View aspects really depends on my personal taste, since I can use any exsting 3rd-party libraries (like: Doctrine, Propel, or plain-old PDO for the Model, and pure PHP or Twig for the View. )
In desiging this framework, my focus should not just be on following the MVC pattern. Rather, my main goal should be on the Separation of Concerns - This should be probably the only design pattern that I should care about
.
Also, I should note that the fundamental principle of the Symfony Components are focussed on the HTTP SPECIFICATIONS. Thus, another name for the eo_framework is http-Framework; or Request-Response Framework.
- Where to store the codes.
- How to name the classes.
- How to reference external dependencies, etc.
- Using a Framework should give me more than just security and testability, more importantly, the framework I choose should allow me to write better code faster.
Writing web code is about interacting with HTTP, therefore, the core principles of my framework should be around the HTTP Specification.
The HTTP specification describes how a "client" (a browser, for instance) interacts with a "server" (our application via a web server).
The dialog between the client and the server is specified by well-defined "messages", "requests" and "responses": the "client" sends a "request" to the "server" and based on this request, the server returns a "response".
In PHP, the request is represented by global variables ($_GET, $_POST, $_FILE, $_COOKIE, $_SESSION…) and the response is generated by functions (echo, header, setcookie, …).
The first step towards better code is probably to use an Object-Oriented approach; that’s the main goal of the Symfony HttpFoundation component: replacing the default PHP global variables and functions by an Object-Oriented layer.