Nox Philosophy
The Nox MVC web framework was designed against the grain of "do everything" frameworks. Typically, larger frameworks come with a lot of baggage. Such as:
- Long dependency chains - adding to your application's tech debt and liability
- Custom-syntax for route parameters or ORMs
- Mini-frameworks inside of the encompassing framework, adding to the learning curve of that particular library
The Nox PHP MVC framework aims to keep invasive, opinionated patterns to a minimum. Apart from a standard MVC paradigm, the way your application's microservices and features are implemented is left up to you. Nox provides the tools you need to build a successful MVC PHP application.
Nox Powers Over 800 Production Websites & Applications
Nox is the backbone of Footbridge Media's proprietary CMS that powers almost all of their clients.
Why PHP >=8.1?
By being progressive with the minimum PHP version support, the end result syntax that Nox implements is more streamlined, understandable, and compares better to larger-scale application frameworks - such as Java Spring. Nox makes use of PHP 8's attributes/decorators to handle request routing on your controller methods. This allows you to avoid having to manually add methods to a router class. Routes simply work out-of-the-box with PHP method attributes. See how MVC routing with PHP 8 attributes is done by viewing the routing docs.
Start Using PHP in New, Modern Ways
Leave the typical messy, scripting style of PHP in the dark ages. Experience OOP, MVC architecture in PHP
Create a Maintainable Application That Will Scale
You have, no-doubt, witnessed the enormous various that PHP code has in its ecosystem. A terrible mix of bad practice, business logic mixed with developer logic, and common misunderstandings. The default style of programming that PHP tends to aim developers towards with its lax scripting style leads developers to be stuck in a predicament of misunderstanding when moving to other languages.
Stop writing code that you'll dread coming back to.
To this day, you will still find PHP developers injecting their variables from user input into their MySQL queries.
$username = $_POST['username'] ?? null;
$result = $mysqli->query("SELECT id FROM `users` WHERE `username` = '" . $username ."');
Of course, the solution here is to use prepared statements - whether it be in the PDO or MySQLi driver. However, why not just take MySQL syntax completely out of your application and write it all in pure PHP?
You can do this with Nox and the simple Nox ORM - Abyss.
#[Route("POST", "/change-username")]
public function changeUserName(): void{
$username = $_POST['username'] ?? null;
$columnQuery = new ColumnQuery()
->where("username","=",$username);
$user = User::queryOne($columnQuery);
$user->username = "New Username here";
$user->save();
}
Learn more about how you can take MySQL syntax out of your PHP application forever in the ORM docs: