![]() ![]() Many examples on the web using Electron combine frameworks, generators, and libraries, with a considerable price to pay in terms of dependencies to external packages, when the tools weren't chosen with care to reduce these dependencies. At first sight, it's therefore the ideal solution! but beware, there are still some pitfalls to avoid so that Electron doesn't turn into a complex labyrinth. Binaries are available for Windows, Linux, and MacOS. The slightly more evolved answer is called Electron: it's an integrated solution containing a Node.js interpreter, a browser based on Chromium, and a few TypeScript compatible classes which allow both to efficiently exchange information through inter-process communication, and to control in details the display windows as well. However, it's more difficult to send asynchronous information from the Node.js motor to the interface, or to control the appearance of the browser window. It's a very valid possibility: it enables the interface to easily look for information and to post the changes, with a REST interface for example. HTTP client/server architecture for the design of an application entirely in TypeScript The first idea that comes to mind, when you think about an application combining a Node.js motor and an HTML user interface coded in TypeScript, is to run a small local web server in Node.js and to use a simple browser to display the interface. We are going to explore this scenario and see how to access Yoctopuce modules in such a scenario. ![]() You can also write traditional applications in TypeScript, that is applications which combine a graphical interface and access to all the resources of the machine, for example to access a database or files. People like the TypeScript language as much to create web interfaces as to write Node.js software which work as a service, with complete access to the machine resources. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |