Let's Talk
Status Open Only For Freelance
Home Projects Articles

Get in Touch

Have a project in mind? Let's work together.

Published

Hello OxygenFramework!

December 01, 2025
5 min read
Hello OxygenFramework!

For years, PHP has powered the web, but modern development demands speed, elegance, and low overhead. That's why I created Oxygen Framework: a lightweight, contemporary PHP framework built from the ground up to offer the best combination of expressive syntax and minimal footprint. Oxygen isn't just another framework; it's a carefully crafted environment designed to maximize developer efficiency without sacrificing performance.

For years, PHP has powered the web, but modern development demands speed, elegance, and low overhead. That's why I created Oxygen Framework: a lightweight, contemporary PHP framework built from the ground up to offer the best combination of expressive syntax and minimal footprint. Oxygen isn't just another framework; it's a carefully crafted environment designed to maximize developer efficiency without sacrificing performance.

1. The Core Philosophy: Why Oxygen? 🎯

When I started sketching out Oxygen, my goal was clear: to build an elegant tool that removes complexity while empowering developers. We focused on three core pillars:

A. Simplicity and Expressiveness

We believe code should be a pleasure to write and easy to read. Oxygen adopts an expressive, fluent API that makes common tasks—like routing, database interaction, and validation—intuitive. By minimizing configuration and maximizing sensible conventions, we cut down on boilerplate code.

B. Performance and Lightweight Design

Oxygen is built on a minimal core. We leverage high-performance components like Bramus Router and Nette Database instead of building everything in-house. This strategy ensures the framework remains exceptionally fast, with one of the lowest memory footprints in the PHP ecosystem, making it ideal for microservices or high-traffic applications where every millisecond counts.

C. Modern PHP Standards

Oxygen requires PHP 8.1+, allowing us to utilize modern features like Typed Properties and Attributes. This adherence to current standards ensures your code is more robust, less prone to runtime errors, and fully embraces the type-safe future of PHP.


2. Architecture Overview: The Structured Approach 🏗️

Oxygen adheres closely to the Model-View-Controller (MVC) architectural pattern, providing a clean separation of concerns crucial for scalable applications.

A. Request Lifecycle

The entire application flow is meticulously handled by the central Kernel.

  1. Request Entry: The HTTP request hits public/index.php.

  2. Container Initialization: The Dependency Injection (DI) Container (Oxygen's Service Container) is initialized, registering core services.

  3. Routing: The Router identifies the correct path and HTTP method, mapping the request to a Controller and its method.

  4. Middleware: The request passes through any global or route-specific Middleware filters (e.g., Auth checks, CSRF protection).

  5. Controller Execution: The Controller method is executed, with all necessary dependencies automatically injected by the DI Container.

  6. Response Generation: The Controller interacts with Models, generates the necessary data, and returns a Response (often a rendered View).

  7. Response Middleware: The response can pass through "after" Middleware for tasks like logging or content modification.

  8. Output: The final HTTP response is sent back to the user.

B. Dependency Injection (DI) 💉

At the heart of Oxygen is a powerful yet simple Service Container. It manages class dependencies, ensuring that classes are only instantiated when needed (lazy loading) and automatically resolved when type-hinted in a constructor or method.

Share this article

Back to Articles

© 2026 Redwan Aouni.

  • LinkedIn
  • Github
  • WhatsApp Bussiness