clean-core
TypeScript icon, indicating that this package has built-in type declarations

0.0.7 • Public • Published

Clear Core

Build Status

codecov

Core interfaces and classes for html applications.

Architecture

Page

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

Application handle entry point in app (e.g. main.ts):

  • Execute global hooks
  • Check requested route for current page
  • Run Route Handler

Router

Contains map of URI -> Route Handler.

Route Handlers

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 Objects

Page Object instantiate html components (forms, widgets) and handle events.

Readme

Keywords

none

Package Sidebar

Install

npm i clean-core

Weekly Downloads

7

Version

0.0.7

License

BSD-2-Clause

Unpacked Size

18.5 kB

Total Files

62

Last publish

Collaborators

  • samizdam