Page 1 of 2

HMG And The Web - Part V (Final)

Posted: Sun May 27, 2012 10:34 pm
by Roberto Lopez
So...

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.

Re: HMG And The Web - Part V (Final)

Posted: Sun May 27, 2012 11:52 pm
by Pablo César
Very very interesting ! Thank you Roberto to give us a idea what is it about.
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.
You are a visionary man ! Thank you !

Re: HMG And The Web - Part V (Final)

Posted: Mon May 28, 2012 2:49 am
by Rathinagiri
Wow. It will be a great transformation for HMG.

I am with you and I can contribute.

Re: HMG And The Web - Part V (Final)

Posted: Mon May 28, 2012 3:26 am
by Roberto Lopez
Thanks!

For all people interested:

For control creation:

http://viralpatel.net/blogs/2009/01/dyn ... cript.html

For Window creation:

http://raventools.com/blog/create-a-mod ... avascript/

Re: HMG And The Web - Part V (Final)

Posted: Mon May 28, 2012 1:17 pm
by Roberto Lopez
Roberto Lopez wrote:Thanks!

For all people interested:

For control creation:

http://viralpatel.net/blogs/2009/01/dyn ... cript.html

For Window creation:

http://raventools.com/blog/create-a-mod ... avascript/
Eventually, we could build our library on top of jQuery (a free JavaScript library) and its plugins.

Take a look at this:

http://speckyboy.com/2010/05/13/50-fund ... omponents/

Re: HMG And The Web - Part V (Final)

Posted: Mon May 28, 2012 1:23 pm
by Roberto Lopez
Roberto Lopez wrote: Eventually, we could build our library on top of jQuery (a free JavaScript library) and its plugins.

Take a look at this:

http://speckyboy.com/2010/05/13/50-fund ... omponents/
And dialogs based on jQueryui:

http://jqueryui.com/demos/dialog/

Re: HMG And The Web - Part V (Final)

Posted: Mon May 28, 2012 7:00 pm
by Rathinagiri
It looks very promising Roberto.

Re: HMG And The Web - Part V (Final)

Posted: Tue May 29, 2012 10:12 am
by Rathinagiri
I have gone through the demos in your above link Roberto regarding jQuery. They are amazing.

Hope they can be done using HMG oneday.

Re: HMG And The Web - Part V (Final)

Posted: Tue May 29, 2012 12:32 pm
by Roberto Lopez
rathinagiri wrote:I have gone through the demos in your above link Roberto regarding jQuery. They are amazing.

Hope they can be done using HMG oneday.
I've already have the two first functions of the new HMGSCRIPT.

One is the DefineWindow function, and the other the DefineButton function.

I've wrote in plain JavaScript and the source of the first user demo app has only two lines (one for the window definition and the other for the button).

It looks like as follows:
Image1.png
Image1.png (92.34 KiB) Viewed 8015 times

Re: HMG And The Web - Part V (Final)

Posted: Tue May 29, 2012 1:25 pm
by esgici
Roberto Lopez wrote:
I've wrote in plain JavaScript and the source of the first user demo app has only two lines (one for the window definition and the other for the button).

Fantastic :o

Please continue :arrow:

Best regards / Saludos cordiales

--

Esgici