Documentation · Chapter 03

Build your first
complete application.

We will create a small personal library while following the real path of a PHPAML request.

You will change one element at a time, in an exact file, then verify the result.

≈ 70 min

A visible result, not disconnected fragments.

At the end, three addresses will work: the provided home page, an About page, and a Books page. You will know which file receives the address, which prepares information, and which produces HTML.

The running project

phpaml — zsh
http://127.0.0.1:8910/
http://127.0.0.1:8910/about
http://127.0.0.1:8910/books

A local address is visible only on your computer. It lets you work without publishing the website. The number 8910 is the port: think of it as a door reserved for your development server.

The chain you will build

1URL/books
→
2RouteWebApp.php
→
3ControllerBookController
→
4Viewbooks.php

Each arrow simply means “pass the work to the next step.” If a page fails, this map tells you where to look.

VOCABULARY

Words to remember.

RouteRule connecting an address to an action.
ControllerPHP class organizing what must happen.
ViewPHP file responsible for producing the HTML page.
ModelObject representing information or a domain rule.

SUMMARY

What to remember

  • We are building a classic MVC application.
  • Every page follows URL → route → controller → view.
  • The browser never reads your PHP classes directly.
  • Every step is checked before moving on.