Giter Club home page Giter Club logo

eo_framework's Introduction

EO-FRAMEWORK

Symfony is a set of standalone, decoupled, and cohesive PHP components that solve common web-development problems.

Why I created this Framework

  1. To learn more about the low-level architecture of modern web frameworks in general and about the Symfony fullstack framework in particular.
  2. To experiment creating a framework.
  3. 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. )

NOTE

- Separation of concerns

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.

- Think about some conventions.

  • 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.

OOP and the HTTP Specification

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.