Giter Club home page Giter Club logo

spa_mvc's Introduction

Dipendenze NPM

npm i express --save
npm i -D happypack webpack ts-loader typescript clean-webpack-plugin lit-html

Idea generale

Il framework è composto da un container, l'App Container, che racchiude le nostre pagine che carichiamo. Quindi abbiamo bisogno di una classe App che conterrà i metodi che supportano la visualizzazione e la de-visualizzazione delle nostre Pagine. Quindi dovrà conoscere le Pagine che la compongono.

La classe Pagina è composta da oggetti componenti che sono il cuore visivo e comportamentale della nostra applicazione. Una pagina dovrà conoscere pertanto i suoi componenti, caricarli (o "distruggerli"?). Una pagina può "vivere" anche se non è quella attualmente visualizzata? Una pagina dovrà sottostare a criteri di sicurezza?

Quando clicco su un link (normale/hashed) cosa succede? Un link deve essere mappato con una pagina che dovrà essere una pagina valida dell'App, solo a questo punto il Router avviserà la mia App per il caricamento. Ho quindi bisogno di una classe Router che mappa un collegamento con una pagina, verificare se è appartenente alla App e, in caso affermativo, "avvisare" per la visualizzazione, altrimenti visualizza un messaggio di errore.

La classe App

La classe App estenderà la classe HTMLElement.

La classe accetta una stringa che identifica l'elemento HTML tramite l'id.

spa_mvc's People

Contributors

lordkenzo avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.