Core interfaces and classes for html applications.
Every page is html file in public directory. It includes:
- common html elements (
html
,head
,body
) - mark-up (for template engine or raw html)
Advantages of this approach:
- Client-side rendering and raw html can be used
- Real URI for every page
Application handle entry point in app (e.g. main.ts):
- Execute global hooks
- Check requested route for current page
- Run Route Handler
Contains map of URI -> Route Handler.
Route Handler known how handle specific URI with given params. Route handling cases:
- instantiate and execute Page Object with given Window context
- redirection (based on URI params, Window context, etc)
Route inject all external Page Object dependencies.
Page Object instantiate html components (forms, widgets) and handle events.