Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Introduction

What we already know is - Cubbles is about components easily to used in any web application.

Webpackages > Artifacts (apps | components | utilities) > Resources

A Webpackage contains at least a manifest.webpackage file and an arbitrary number of artifacts. Each webpackage is identified by its name and version (e.g. "twitter-connectors@1.0").

Artifacts:

  • Apps can be used to provide complete html documents - containing a more or less sophisticated web application. Keep in mind that Cubbles has its main focus on components - to be used in 3rd party web applications.

  • With components we make a difference between elementary components (aka "elementaries") and compound components (aka "compounds"). Both are different types of artifacts and described in different sections of the manifest.webpackage.

  • Utilities are artifacts to contain any kind of resource, that can be used by components (or apps). Use utilities to provide js functionality (simple functions or complete libraries), styles etc. - anything that might be used by more than one other artifact.

Each artifact can contain any number of resources (js, css, json etc. -files)


The valid structure of a whole manifest file is described by a json schema: https://github.com/cubbles/cubx-webpackage-document-api/wiki/manifest.webpackage:-Change-Notes

Note: A webpackage is intended to be used as a collection of related artifacts (e.g. a component library, a well structured compound or different variants of one component). Keep in mind, that all artifacts are versioned with the webpackage.



The manifest.webpackage file is te most important document of each webpackage - containing all data describing the webpackage and of each of its artifacts.

Code Block
languagejs
titlemanifest.webpackage (Example)
linenumberstrue
collapsetrue
{
  "name": "the-unique-name-of-my-webpackage",
  "version": "0.2.0",
  "modelVersion": "8.3.0",
  "docType": "webpackage",
  "author": {
    "name": "John Doe",
    "email": "john.doe@example.org"
  },
  "license": "MIT",
  "homepage": "http://project.home.com",
  "keywords": [
    "connectors",
    "energy"
  ],
  "runnables": [
      {
        "name": "readme",
        "path": "/doc/readme.html",
        "description": "Read this ..."
      }
  ],
  "artifacts": {
    "apps": [
       // 0..n apps
    ],
    "compoundComponents": [
       // 0..n compounds
    ],
    "elementaryComponents": [
       // 0..n elementaries
    ],
    "utilities": [
       // 0..n utilities
    ]
}

Elementary Components

TODO

Compound Components

TODO