Skip to content

Instantly share code, notes, and snippets.

@tobiu
tobiu / FooterContainer.mjs
Created June 22, 2020 18:47
How to create a webworkers driven multithreading App - Part 2 - I
import {default as Container} from '../../../node_modules/neo.mjs/src/container/Base.mjs';
/**
* @class Covid.view.FooterContainer
* @extends Neo.container.Base
*/
class FooterContainer extends Container {
static getConfig() {return {
/**
* @member {String} className='Covid.view.FooterContainer'
@tobiu
tobiu / FooterContainer.mjs
Created June 22, 2020 18:56
How to create a webworkers driven multithreading App - Part 2 - II
items: [{
html: 'App created with <a target="_blank" href="https://github.com/neomjs/neo">neo.mjs</a>.'
}
// ,...
]
@tobiu
tobiu / MainContainer.mjs
Created June 22, 2020 18:59
How to create a webworkers driven multithreading App - Part 2 - III
import FooterContainer from './FooterContainer.mjs';
import HeaderContainer from './HeaderContainer.mjs';
import MainContainerController from './MainContainerController.mjs';
import Viewport from '../../../node_modules/neo.mjs/src/container/Viewport.mjs';
/**
* @class Covid.view.MainContainer
* @extends Neo.container.Viewport
*/
class MainContainer extends Viewport {
@tobiu
tobiu / MainContainerController.mjs
Created June 22, 2020 19:03
How to create a webworkers driven multithreading App - Part 2 - IV
/**
* @param {Object} data
*/
onRemoveFooterButtonClick(data) {
this.view.remove(this.getReference('footer'), true);
}
@tobiu
tobiu / MainContainer.mjs
Created June 23, 2020 11:46
How to create a webworkers driven multithreading App - Part 2 - V
import FooterContainer from './FooterContainer.mjs';
import HeaderContainer from './HeaderContainer.mjs';
import MainContainerController from './MainContainerController.mjs';
import {default as TabContainer} from '../../../node_modules/neo.mjs/src/tab/Container.mjs';
import Viewport from '../../../node_modules/neo.mjs/src/container/Viewport.mjs';
/**
* @class Covid.view.MainContainer
* @extends Neo.container.Viewport
*/
@tobiu
tobiu / Country.mjs
Last active June 23, 2020 12:05
How to create a webworkers driven multithreading App - Part 2 - VI
import Model from '../../../node_modules/neo.mjs/src/data/Model.mjs';
/**
* @class Covid.model.Country
* @extends Neo.data.Model
*/
class Country extends Model {
static getConfig() {return {
className: 'Covid.model.Country',
@tobiu
tobiu / Countries.mjs
Created June 23, 2020 12:21
How to create a webworkers driven multithreading App - Part 2 - VII
import Country from '../model/Country.mjs';
import Store from '../../../node_modules/neo.mjs/src/data/Store.mjs';
/**
* @class Covid.store.Countries
* @extends Neo.data.Store
*/
class Countries extends Store {
static getConfig() {return {
className: 'Covid.store.Countries',
@tobiu
tobiu / Table.mjs
Created June 23, 2020 12:50
How to create a webworkers driven multithreading App - Part 2 - VIII
import Container from '../../../../node_modules/neo.mjs/src/table/Container.mjs';
import CountryStore from '../../store/Countries.mjs';
import Util from '../../Util.mjs';
/**
* @class Covid.view.country.Table
* @extends Neo.table.Container
*/
class Table extends Container {
static getConfig() {return {
@tobiu
tobiu / Util.mjs
Created June 23, 2020 13:21
How to create a webworkers driven multithreading App - Part 2 - IX
/**
*
* @param {Object} data
* @param {Number} data.index
* @return {Object}
*/
static indexRenderer(data) {
return {
cls : ['neo-index-column', 'neo-table-cell'],
html: data.index + 1
@tobiu
tobiu / MainContainer.mjs
Last active June 23, 2020 15:14
How to create a webworkers driven multithreading App - Part 2 - X
import CountryTable from './country/Table.mjs';
import FooterContainer from './FooterContainer.mjs';
import HeaderContainer from './HeaderContainer.mjs';
import MainContainerController from './MainContainerController.mjs';
import {default as TabContainer} from '../../../node_modules/neo.mjs/src/tab/Container.mjs';
import Viewport from '../../../node_modules/neo.mjs/src/container/Viewport.mjs';
/**
* @class Covid.view.MainContainer
* @extends Neo.container.Viewport