Giter VIP home page Giter VIP logo

hosts-app's Introduction

hosts-app

Web app showing boxes with information sortered done without framework and applying oop pattern. I've used typescript for many reasons but basically because it give me more confidence and for me I develop faster.

Installation

npm install

Start application

npm start

Test

npm test or npm run test:watch

Folder structure of src:

  • src/@types (types definition of typscript)
  • src/components (classes to create the DOM elements)
  • src/services (main hosts service responsible to manage data layer)
    • test
    • views (service to create append elements to the DOM)
  • src/statics (index.html and styles.css statics files)
  • src/utils (so far a polyfill function for instantiation of polyfills if it is necessary)

Hosts service

  • The main idea of this service is to create from a json structure given a data structure data based on an object. Each property of this object is the name of the hosts. The reason to do this is because we can access the information of one host specifically without iterating into an array.
  • The method getTopAppsByHost is the responsable to sorting the application by apdex before returning the object. In this way when we add or remove an application to the host we receive the applications resorted.
  • I've used a quickSort algorithm for the sorting method of application in order to be as performant as possible.

DOM elements

  • Each web element created for the application is done by classes. There is a parent class that instantiates the properties and has the render method. Each child component has the responsibility to create and append his elements.

hosts-app's People

Watchers

 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.