Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
July 27, 2022 05:34 pm GMT

Low-code Framework Concept for Node.js

We've launched a project that it can automate data and logic in Node.js, so that it can organically reduce code lines.

Nucleoid Low-code Framework works with underlying declarative runtime environment that re-renders very same JavaScript codes makes a connections in the graph and eventually save the JavaScript state so that it doesn't require external database.

Hello World

app.post("/test", () => {  var a =  1  var b = a + 2;  var c = b + 3;})app.get("/test", () => {    return b;})

This will save and return variables without external database even if the program restarted.

The Nucleoid runtime environment tracks JavaScript state like variables, object, class, etc. that it can control all technical codes like pooling, connections, in meanwhile, developers can focus to build up business logic with vanilla JavaScript.

Example with actual objects:

class User {  constructor(name) {    this.name = name;  }}app.post("/users", () => new User("Daphne"));app.get("/users", () => {  return User.filter((user) => user.name === "Daphne")});

Theory

Applying declarative programming at the runtime gives us ability to include data management in the same process.

In different words, the main objective of the project is to manage both of data and logic under the same runtime, at the same time, we can also stream/export data to external database like NoSQL.

How it works

nucleoid.run(() => {  var a = 1;  var b = a + 2;  var c = b + 3;});

Once a variable is defined like var a = 1, the runtime does 3 major things. First, it places the var a in the graph and makes the connection between dependent variables.

Variable Graph

Second, updates state with new values in order get affect

State
var a1
var b3
var c6

However, actual execution is different since variables are tracked in the graph.

state.a = 1;state.b = state.a + 2;state.c = state.b + 3;

and finally stores statements in the runtime-managed fs.

IDE (OpenAPI Editor)

The framework works with Express.js, we also made small UI that builds up the very same codes with OpenAPI, package and run on CodeSandbox.

Go to Nucleoid IDE

Screenshot

This paradigm is still a part of the declarative programming, but applied at the runtime unlike Prolog or Haskell. As we are still discovering what we can do with this powerful programming model, please join us with any types of contribution!


Learn more at https://github.com/NucleoidJS/Nucleoid

Nucleoid Logo


Original Link: https://dev.to/canmingir/low-code-framework-concept-for-nodejs-55b0

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To