Published Web framework pusa With the implementation of the concept that transfers the logic of the front, performed in the browser using JavaScript, on the side of the backend – browser management and DOM elements, as well as businesswichka performed on backend. The code running on the side of the browser JavaScript is replaced by a universal layer that causes handlers on the side of the backend. The need to develop using JavaScript for the front is absent. The reference PUSA implementation is written in PHP and extends under the GPLv3 license. In addition to PHP, technology can be implemented in any other language, including JavaScript / Node.js, Java, Python, GO and Ruby.
PUS determines Protocol Sharing on The minimalistic command set . When downloading the page, the browser loads the basic contents of the DOM and JavaScript core PUSA-FRONT. PUSA-FRONT through AJAX queries sends a browser event (such as click, Blur, Focus and Keypress) and query parameters (item called event, its attributes, URL, etc.) in the PUSA-back server handler. Based on the data obtained, the PUSA-BACK defines the controller, performs a payload and generates a response set of commands. Having received the response of the PUSA-FRONT request performs commands, changing the contents of the DOM and the browser environment.
The front state is formed but not controlled by backend, which makes the development for PUSA similar to the code for the video card or canvas, where the execution result is not controlled by the developer. For creating
Interactive applications based on Canvas and OnMousemove are provided with the ability to download and use additional JavaScript scripts on the client side. From the deficiencies of the method also marks the transfer of a part of the load from the front end to the backend and an increase in the data exchange frequency with the server.
Among the advantages are allocated: the elimination of the need to participate JavaScript developers of the frontland, a stable and compact client code (11KB), the inaccessibility of the main code from the front of the front end, the lack of the need for serialization of the REST and in the GRPC type tools, eliminating the problems of matching queries routing between the front end and backend.