Giter Club home page Giter Club logo

system-runtime's People

Contributors

ecarriou avatar gitter-badger avatar warpdesign avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

system-runtime's Issues

Add 'default' property for type definition

Add default property for type definition.

example: { "name": "address", "type": "object", "schema": { "city": { "type": "string", "mandatory": false, "default": "Paris" } } }

Improve collection management

  • remove position parameter from collection event,
  • improve check when adding an item into a collection and
  • add more functions for RuntimeArray class.

Simplify APIs

APIs will be simplify as follow:

  • Runtime prefix of all classes will be changed to _
  • Remove some duplicated APIs: DataBase.system, DataBase.subsystem, System.main, System.ready and System.sync

Remove subsystem property

Remove subsystem property from systems.
Because this property is not used, we will remove it and assure also compatibility with old systems that have this property.

Update runtime.system API

Before we have this signature for runtime.system API:

runtime.system(name: string)

now:

runtime.system(params: any)

we can:

  • create a system by just passing a string for the name (as before) or
  • create a system by passing a configuration object.

example:

runtime.system({ '_id':' 'internalId', 'name' : 'my_system_name', 'version' : 1234, 'description: 'some infos about the system...' })

Improve API signature check

add type check on the first parameter of a collection API. Example: vador.children("luke")needs to send a warning.

Update the way id is generated to be used as variable name

For a System Designer example, I have created some Web Component-like widgets:

  • widgets are generated with custom tags,
  • widgets are in fact components and their DOM id are their internal id and
  • in that case we can not use a CSS selector to select a widget by its id: its id is not DOM compliant.

=> we need to generate id DOM compliant, i.e. that can not begin with a number.

Improve Runtime Database insert API

  • insert event must send a copy of the document, not a reference to the element
  • on a $db.insert, we have to fill the document with the missing fields for not mandatory fields

Override / clear a collection

Add the ability to override / clear a collection by passing an array.

Examples:

  • vador.children([]): clear the children collection,
  • vador.children(['luke']): override the children collection and
  • vador.children([this.require('luke')]): override the children collection.

Improve logs

  • clean the jsdoc of the logs
  • fix an issue when showing an invalid document in the documentation

Bug when installing system server side

There is a bug when installing a system server side system:

runtime: error when trying to call the method 'install' on component 'runtime' (class 'Runtime'): system.status is not a function

Create extensions

  • Remove some core classes that are not always used as extensions.
  • Create mode-server-admin extension

Add more apis to be compliant with OSGi specifications

To be more compliant with OSGi specifications, we need to add:

  • runtime.update(id: string, data: JSON): update a system given its id. It will reload the system from its path. We can also add a data parameter to update the system from this data.
  • SystemRuntime.update(data: JSON): update the system from this data.

Add APIs to export bundle of system

Add:

  • runtime.bundle(): string: export the current system in a bundle (a stringifyed JSON object).
  • SystemRuntime.bundle(): string: export the system in a bundle (a stringifyed JSON object).

Don't include build artefacts in source repo

/build folder shouldn't be included in the git source repo since the artefacts from the build pollute the diffs. Consider to:

  • add build to .gitignore file
  • keep this repo exclusively for sources
  • include the build folder when you're publishing to npm (you might exclude the src folder in your .npmignore)
  • consider using npmcdn for bower users (transparent)

Minor updates

  • Fix collection event with reset type that could not been send.
  • value parameter of collection event is now the real object, not its id.
  • Update a log message.
  • RuntimeDatabase findAPI can now search in collection.

Add a 'dev' mode

  • if we add mode="dev" on the script tag that load System Runtime, we can drag / drop systems directly in the browser to test them live.

[Chrome] Can not use System Runtime APIs when debugging on Chrome

Step to reproduce the bug:

  • put debugger instruction in your code,
  • open your script with Chrome browser,
  • open the console,
  • refresh the browser,
  • the script breaks on the line you put debugger,
  • run this('runtime') in the console,
  • a JavaScript error is thrown

Why ? There seems to have a regression in the last version of Chrome.

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.