Skip to content
Greg Bowler edited this page May 11, 2026 · 3 revisions

A page view is the HTML that represents the response sent back to the browser. It stays as HTML on disk rather than being assembled from lots of PHP string output.

That separation is important because it means the page can be designed, read, and reviewed as a document in its own right.

Static HTML as the starting point

The simplest useful page view is just a normal HTML file. We can open it in an editor, write the structure we want, and serve it immediately.

That is helpful while prototyping because the first version of a page can be built and discussed as plain markup. Later, the same file can become production code by adding page logic, components, partials, and binding. There is no rewrite required just because the page has become dynamic.

Default placeholder content can stay in the HTML too. Later, when data is bound into the document, those default values are replaced. Until then, the file can still read well and make sense on its own.

How views are loaded

When a request matches a route, WebEngine loads the matching view file from page/. In many cases that is just one file, but a full response may also include:

Those features still result in one final HTML document, but they allow the source views to stay smaller and easier to maintain.

Good practices for page views

Keep page views semantic and readable. Write the HTML so another developer can understand the page structure without needing to read the PHP first.

It also helps to design the page shape before adding logic. Once the structure is visible in HTML, it is much easier to decide which parts need binding, which parts need reusable components, and which parts should stay static.


When views need to be made dynamic, we'll use page logic.

Clone this wiki locally