Classic application
It receives an HTTP request, uses routes and controllers, then generally renders a PHP view on the server.
src/controllers/
src/models/
src/middleware/
src/views/
routes/WebApp.php
public/index.phpAML View
It keeps the PHPAML server, while declarative pages and components live under src/views. Engine then handles compiled frontend interactions.
src/views/pages/
src/views/components/
src/views/layouts/
src/views/stylesheets/
routes/WebApp.phpAPI
It uses HTTP, routes, controllers, and data, but has no view layer. Its final representation is generally JSON.
src/controllers/
src/requests/
src/resources/
src/repositories/
src/routes/
public/index.phpConsole
It has no browser, HTTP request, or route. Program::main() receives terminal arguments and returns an exit code.
src/Program.php
src/
tests/
phpaml.jsonSUMMARY
What to remember
- Classic renders pages on the server.
- View adds a declarative reactive interface.
- API responds without views, generally as JSON.
- Console runs PHP without an HTTP server.