Light php framework to illustrate the implementation of a web framework with static routes for study purposes
, (*1)
Tiny and simple framework to illustrate an implementation of a web framework with static routes using Php | Study purposes for programming classes., (*2)
This was a design POC architecture for academic use forged as a gift for a friend teaching classes in web programming., (*3)
You may use it as it is. There is no plan on continuing this project (well...who knows in the future!), (*4)
Feel free to send comments., (*5)
composer require longanime/webx
Simple View-Controller (no model) with static route approach., (*6)
Folder structure:, (*7)
|-app/ root folder of your application |--actions/ your actions classes |--view/ your view classes (matching actions' names) |-actions.php Build your actions and rounting |-app.php Your application configuration |-index.php App caller, (*8)
Create an app.php
file in your root folder and inialize a new App., (*9)
$app = new App( "app-name" );
You can create your actions/rountings direct inside the app.php
file or you could create an actions.php
file and inside of it require individual controllers (no enforced, for now)., (*10)
When creating, for each action it will seek for 1. an action class: a file under /app/actions/[ActionName].class.php 2. a view: a file under /app/views/[ActionName].php, (*11)
If the action does not needs a view, just create the class file under (1), (*12)
There is an example app called webx-app available on github., (*13)
You can reach me at michael at malvins dot studio, (*14)
Good Coding!, (*15)