Coder Social home page Coder Social logo

webaxol / pluglightjs Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 569 KB

A light-weight JavaScript framework designed to create flexible and maintainable projects with a modular and hierarchical approach

License: MIT License

JavaScript 100.00%
event-management-system flexible framework javascript lightweight-framework decoupled-components microkernel

pluglightjs's Introduction

Hi, I am Gabriel Fuente

  • ๐Ÿ”ญ Iโ€™m currently working on Mirroware

  • ๐ŸŒฑ Iโ€™m currently learning WordPress, AngularJS

  • ๐Ÿ’ฌ Ask me about TypeScript, JavaScript, NodeJS

  • ๐Ÿ“ซ How to reach me [email protected]

  • โšก Fun fact I am left-handed (That ain't funny though)

Languages and Tools:

babel bash bootstrap css3 docker express git html5 javascript jest linux mongodb mysql nodejs php python sass typescript webpack


My Online Certificates

webaxolMy Hackerrank Profile

Webaxol - Hackerrank Profile


pluglightjs's People

Contributors

webaxol avatar

Stargazers

 avatar

Watchers

 avatar  avatar

pluglightjs's Issues

Missing built-in initializer

Setting up an application with CASES implies registering components such as: services, collections, events, agent types, etc. Therefore, it would be of great benefit to have a module responsible for initializing the things previously mentioned, so that the initialization process becomes more abstracted from the consumer of the framework. Not only having a built-in initializer would ease this task; there would be more security, as we will be able to check for errors before setting up everything.

AgentPool doesn't respect Objects' classes when assigning fields to new Agents

Agents-types are registered correctly; the prototype is correctly stored at AgentPool.#types, respecting the classes of objects defined at its attributes, for example:

class Example {
    constructor(){
        this.field = 'dummy';
    }
}

// Attribute A is stored with its class (Example)

typeA: {  attributeA : (instance of Example) }

However, when a new agent is created, its attributes (defined as objects) will be set as generic javascript objects, instead of keeping their original class.

// Notice that 'attributeA' is not defined as an instance of Example; it is a JavaScript vanilla Object

agent = {  #type : 'typeA', attributeA : { field : 'dummy' } }

This occurs because each agent attribute is assigned by creating a deep copy of the prototype's attributes; it doesn't recognize classes, only vanilla empty objects:

AgentPool.js - line 34

 this[field] = Object.assign({},_field); 

Missing delta-time at execution loop

The execution loop of does not provide information about execution time; it could be a problem when clients with different computer resources attempt to run a program, for example: a video game. Not implementing delta-time functions could vary how the same program executes at different clients; it is an issue especially for online interactive applications, where synchronization is a requirement.
Therefore, it is important to implement the delta-time feature as soon as possible.

Inheritance doesn't work properly when the framework is integrated with typescript modules

First of all, I imported the JavaScript vanilla World class to another project, which utilizes TypeScript; the intention was making a subclass as an extra layer to implement new functionalities on top of the framework's World class. However, Typescript sub-classes only inherit those fields and methods from their super class which are explicitly defined as "public." ECMAScript does not support the reserved word public for classes, therefore, there is not a simple way of letting typescript to inherit those attributes from JavaScript vanilla classes.

Possible solution:

  • Making a version of the framework using Typescript: It could be expensive, but those applications using Typescript could benefit from it.

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.