Re: [fpc-devel] First pas2js public release
On Thu, 21 Dec 2017, Michael Schnell wrote: On 20.12.2017 11:36, Michael Van Canneyt wrote: (Nothing stops really the server-side-native binary (e.g. written in Pascal) from sending a pas2js transpiled program to the browser as a part of a 'html page'/script, You could do so. But I don't think you should. How else should the Java Script code reach the browser ? You just place it on the server as a file, so the HTTP server (Apache, NginX, IIS) sends it. The server side native binary doesn't need to provide it. But this could be done. In fact, there is a demo that does this: the server program is a HTTP server which has the compiler built-in, and using 3 special URLS you can request a recompile (hotreload). It can even watch the project directory on the server and automatically recompile. The browser polls for updates and when an update is available, reloads the page. A classical mechanism when doing web development in react, angular or vue, now also available in FPC. But next week I will properly document this in the wiki. Michael. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
Re: [fpc-devel] First pas2js public release
On 21.12.2017 08:51, Michael Van Canneyt wrote: I know. But I believe such people are completely on the wrong track. This is, because seemingly for you (and many others), the User Communication is a most important part of the project and needs to be crafted in the best possible way regarding look and feel. OTOH, for me (and some others), the User Communication is just a means to tell the program what to do and to watch if it works as expected, while the stuff the program in fact is provided for, does not do any user communication at all. Hence, for the application programmer, it's desirable, that the IDE provides means to create a GUI that fits to the wherabouts of the development phase and final project with as little effort as possible. This results in the request for allowing to do a GUI that without any additional effort runs on multiple targets. -Michael ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
Re: [fpc-devel] First pas2js public release
On 21.12.2017 08:52, Michael Van Canneyt wrote: because I consider it a misguided approach, Could you elaborate why you think so ? What I have in mind is: - Do a common project for both "business" and the "GUI near" code. - The IDE provides some means to define which parts of the codes are to go where (in an Object Pascal system supposedly based on classes). - With that, interfaces are provided for the communication (e.g. procedure calls; in an Object Pascal system supposedly class based procedures, properties and events). - The IDE compiles the code appropriately with acknowledging separates definitions for both parts to be runnable where. - The communication between the parts is implemented accordingly: if it's a "local" GUI, just a normal executable is created, if the GUI is Browser based: this part is implemented with pas2js, and the loading and communication is implemented accordingly (if the main part is stand alone, including a built-in web server, if the main part is to be run behind a web server doing it as a cgi). I do see that this is unlikely to happen, but IMHO just because lack of dev time, not because of bad concept. -Michael ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
Re: [fpc-devel] First pas2js public release
On 20.12.2017 11:36, Michael Van Canneyt wrote: (Nothing stops really the server-side-native binary (e.g. written in Pascal) from sending a pas2js transpiled program to the browser as a part of a 'html page'/script, You could do so. But I don't think you should. How else should the Java Script code reach the browser ? -Michael ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
Re: [fpc-devel] First pas2js public release
Greet work !! now i am playing with demos. waiting for the components. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel