Registry / web-framework / katharos

katharos

JSON →
library1.0.1267jsnpmunverified

Katharos is a framework for building enterprise user interfaces, focusing on the model and view layers. Current stable version is 1.0.1267. It supports ES5-compliant browsers (IE11 and below not supported). The framework has an ecosystem of supporting libraries, including katharos-router for web application routing. It aims to scale between an integration and a full framework depending on business needs, differentiating by its focus on enterprise complexity management and modular architecture.

npm install katharos
INSTALL
IMPORT
SIG · KATHAROS
K
katharos
web-frameworkjavascriptv1.0.1267
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Katharos
import { Katharos } from 'katharos'
const katharos = require('katharos')
ESM-only; requires bundler or ES module support.
Model
import { Model } from 'katharos'
import Model from 'katharos'
Named export; not a default export.
View
import { View } from 'katharos'
import { view } from 'katharos'
Case-sensitive named export.

Creates a Katharos app with a Model and View, then renders the view into the DOM.

import { Katharos, Model, View } from 'katharos'; const app = new Katharos(); class UserModel extends Model { get defaults() { return { name: '', email: '' }; } } class UserView extends View { render() { return `<div>${this.model.name} (${this.model.email})</div>`; } } const userModel = new UserModel({ name: 'Jane', email: 'jane@example.com' }); const userView = new UserView({ model: userModel }); app.render(userView, document.getElementById('app'));
Debug
Known issues
deprecatedThe 'createModel' function is deprecated in favor of class-based Model.
fix
Use 'class MyModel extends Model' instead of 'createModel()'.
affects: >=1.0.0
gotchaModel defaults are mutable; changes to defaults object affect all instances.
fix
Return a new object from the defaults getter each time.
affects: >=1.0.0
breakingVersion 1.0 removed support for IE11 and below.
fix
Ensure your target environment is ES5-compliant (not IE11).
affects: >=1.0.0
Errors
Common errors & fixes
Cannot find module 'katharos'
Package not installed or import path incorrect.
fix
Run 'npm install katharos' and ensure you use the correct import statement: 'import { Katharos } from 'katharos'
TypeError: Katharos is not a constructor
Using default import instead of named import.
fix
Use 'import { Katharos } from 'katharos' (curly braces) instead of 'import Katharos from 'katharos'
Cannot read property 'render' of undefined
View instance not properly initialized with a model.
fix
Ensure you pass a model instance: 'new UserView({ model: userModel })'
Upgrade
Version history
1.0.1267latest on npm
Audit
Dependencies
katharos-routeroptionalRouting functionality for web applications
Agent activity
2 hits · last 30 days
node
2
Resources
katharos — npm install katharos · libregistry