A new major version of web app designer is released!

:new: Formally, we have released an updated preview and web application generator :partying_face:

This is something we have been working on since October last year - 2023. As it seemed at the very beginning, we could improve the existing preview and generator with little effort and increase productivity in 4-6 weeks.
But the task turned out to be several orders of magnitude more difficult. In half a year, we completely rewrote the web designer and everything connected with it several times, practically from scratch. Each time it turned out that the final product worked better than the old one, but not well enough.

In the previous version, we dynamically built and applied properties of UI elements based on the built-in mechanisms of the framework, performing re-rendering and calculations with each change. This led to high memory consumption, long rendering of elements, and other problems. By default, JS is executed in the browser as a single thread, and if this thread is busy with calculations, the UI is not updated and the responsiveness of the page is greatly reduced.

In the new version we have implemented a radically different approach:

  • When the application starts, it launches several webworkers that run in separate threads
  • A separate worker (state) is responsible for managing the state of UI elements
  • A separate worker (supervisor) is responsible for orchestration/management of business processes
  • A set of workers (runners) is responsible for the actual execution of business process logic. By default there is only one worker, but their number can increase if necessary.
  • When generating an application, UI elements and their state are pre-calculated into structures ready for rendering.
  • During generation, models, enums, business processes are optimized - blocks, variables and everything that will not be used in the application are thrown out

Now the application by default uses at least 4 separate computing threads, each performing its tasks without blocking each other.
Along with improving performance, we redesigned the state management of UI elements, rewriting all functions to be more performant.

Due to the transition to separate threads, we now have many more asynchronous operations: each worker works independently. Because of this, there are still some issues with the trigger sequence when starting the app, element triggers sometimes, but they will all be fixed step by step.

Previews and generated apps share the same code base, but there are a few differences:

  • The logic of the power supply blocks is common - it is taken from the same code. BP execution is identical.
  • The state worker in the preview and in the generated application is completely different, so the behavior of the state of UI elements may still differ.

All we have to do is release the web application designer (visually no different) and we have finished restructuring the web application architecture.
We will finally be able to start adding new features: cursors, media queries, modules, new UI elements.

I hope you liked the new web application and it was worth the wait!