Page types

Pages & MVC (Model - View - Controller)

Page types in the editor determine the page view, controller & underlying data.

Each page has a view, (ss files), data objects (entries in the database, build automagically from the php page bits) and a controller .php files? 

They say: Each page type is represented by two php classes: a data object and a controller.  Both  live in tutorial/code/xxx.php

Hmmm: http://doc.silverstripe.com/lib/exe/detail.php?id=tutorial%3A2-extending-a-basic-site&cache=cache&media=tutorial:pagetype-inheritance.png

Page names: they say:

It is SilverStripe convention to suffix general page types with “Page”, and page types that hold other page types with “Holder”. This is to ensure that we don’t have urls with the same name as a page type - if we named our ArticleHolder page type “News”, it would conflict with the page name also called “News”.

View

Each page has xxx.ss in tutorial\template\ to define layout? (or as we see below we can abstract its unique changes out to a subtemplate)

Controller

Each pagetype has xxx.php in \tutorial\code to define page class (extends page.php)

Database (Model)

Rebuild the database after change any xxx.php above.  It seems it'll parse the Page object extension above to create the database objects?