Programming language Elm, its features
The programming area has its own increasingly popular paradigm: more and more applications are being created without global structure randomly changed by the different parts of the code. React-js, Redux, Apache Samza and Lambda-architecture are in the list of such frameworks. The purely functional programming language, explicit representation of the application state as one component and bus event processing are the main components of this approach. They are consistently registered and strictly arranged by date.
The main advantage of this approach is the possibility to replay events log. Moreover it requires neither repetition of the events in the external system nor their simulation. The logic or the user interface could be easily changed in order to see the final result after the same sequence of the events. In addition the cancel and recovery procedure are available in any time, which is useful while debugging the short-term events in UI such as animation or hidden/drop-down elements. The example of a component for auto-completion is given below. It includes the event log and control buttons.
However, it can be guaranteed when the state transformation is set as pure application only. Otherwise such backups and changes could lead to side effects of the application. The purely functional programming language has its flipside, incremental changes in UI and asynchronous requests are difficult to capture.
Due to virtual-dom and React-js and their practical approach the first problem was successfully solved, at least in the world of web-applications. Indeed, the application code becomes simpler, it is written as if the user interface is reconstructed. The application language purity has one more advantage: once the function has the same argument or variable several times, the end result could be easily cashed. The second problematical issue could be solved by the structures that are not so elegant, but nevertheless clear.
The programming language Elm is pure, applicative, and reactive, moreover it implements this approach.It gets compiled to JS-code to implement the HTLM5-aplications (the project on use on the server is also in process). The programming language and examples, including application architecture tutorial with asynchronous requests are available on its web-site.