We have the following:
1. A Harbour WebSockets Server
2. An HTML/JavaScript Client.
Q&A:
Q: But, how is HMG related to this?
A: Well... we have a Harbour server, so, all except GUI, could be Harbour.
Q: The GUI, must be JavaScript in the client web browser, so, how is it related to HMG?
A: In the same way as HMG is related to Windows API.
I mean, hmgscript.js, will make the same job on a web browser, as libhmg.a does on a Windows OS: Make the GUI easy and intuitive.
Q: Isn't this very difficult?
A: No. JavaScript/HTML DOM are very easy compared with C and WIN32 API.
Q: Are we abandoning xBase?
A: No. A xBase to Javascript translator (or a xBase interpreter) can be considered as a secondary goal, so, eventually, our applications could be full xBase in the future. There is lots of JavaScript BASIC language interpreters, considereing the similarities between BASIC and xBase, it is feasible.
Q: What if I can't create an 'in-house' server running the Harbour websocket server.
A: My idea is to create four predefined procedures for the socket server (append, delete, modify and query). These procedures could be ported to a PHP websockets server with a MySql backend, making the servers interchangeable, without affecting our JavaScript client library.
Q: Why are you changing your original HMGSCRIPT design?
Because Websockets technology as an HTML standard do not existed when I started with the HMGSCRIPT project.
Q: What is the ugliest/scariest part of this project?
A: The browse/grid thing. Even with HTML5 new features, making a good data grid using HTML/CSS/JavaScript, is a big tragedy
Q: Which could be the goals for a first version?
A: Basic support for the following GUI objects:
- Window
- Button
- Combobox
- ListBox
- TextBox
- Label
- Image
- EditBox
- Grid
And (perhaps):
- GetProperty
- SetProperty
But we could do the jump and get ride of this functions going to OO.
Objects are pretty simple and intuitive in JavaScript, so, it should be not a problem.
Q: Fantastic... when will be the first version ready?
I don't know!.
This is what I wish to do, but I have no time for it.
So, to solve my work problem in the next week, maybe I'll do some work on the server and go to use plain JavaScript in the client. Again, I have no time even to start a new open source project.
There is lots of capable people here.
If you decide to start this project, I could help a little with some code or guidance.
I've wrote these posts because I'm sure that this is the way for HMG programmers to not being confined along Windows+Intel platform and go for ANY device.
I hope that someone likes these ideas and start a project. There is a lot of JavaScript code and documentation out there.