- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 6
 
Page View
A Page View is a static HTML file that makes up the final rendered page and acts to fully separate the application's presentation from its logic. A Page View of "index.html" can be made dynamic by adding a Page Logic of "index.php".
There is another type of view/logic that shares the same concepts: API Webservices also have API View and API Logic files.
With many web frameworks, in order to link an incoming request to a view, a router must be used. The router is handled automatically within WebEngine, and is not exposed to the developer: the incoming request is simply matched to a file on disk. For example, the router will first try to match www.example.com/about with a file at /page/about.html, then check /page/about/index.html, then check for a dynamic file (see below). The view(s) will be loaded in from the matching HTML files, then matching logic files will be executed in context of the currently-loaded views.
The structure of WebEngine application URIs is that the path does not include an extension. This is sometimes referred to as directory-style URIs. This allows for page views to be stored within single files, or nested in directories.
Like in most systems, requesting a directory will serve the index within that directory. Because of this, the developer must be careful to not create clashing files and directories: A request to /contact will fail if there is a page/contact.html and a page/contact/index.html file present at the same time -- which one should the router choose?
// Headers and footers - why are they special to other template techniques - benefits of having site-wide header and footers.
// Custom components (DOM templates)
// Views and URLs for dynamic content.
// /page/shop/{category}/{item}.html - how to reference the named dynamic variables "category" and "item".
- Request-response lifecycle
 - Running your application
 - Project layout
 - Application architecture
 - Web servers
 - URIs
 - Page view
 - Dynamic URIs and pages
 - Headers and footers
 - Page logic
 - Protected globals
 - User input
 - Cookies
 - Sessions
 - DOM manipulation
 - Custom HTML components
 - DOM templates
 - Binding data to the DOM
 - Database
 - Client side assets
 - API Webservices
 - Security
 - Configuration
 - Build system
 - Coding styleguide