HBuGUI

Issues and Discussions related to Harbour

Moderator: Rathinagiri

User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: HBuGUI

Post by Roberto Lopez »

apais wrote: Wed Jul 03, 2019 11:37 pm mod-harbour is doing so
Antonio has done various (very good) attempts.

I hope that this, be the one driving xBase to mainstream again.

AFAIR you can't install a new Apache module on standard web hosting providers. Is this true?
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: HBuGUI

Post by Roberto Lopez »

apais wrote: Wed Jul 03, 2019 11:37 pm mod-harbour is doing so
In the case someone missed:

https://fivetechsoft.github.io/mod_harbour/
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: HBuGUI

Post by Roberto Lopez »

apais wrote: Wed Jul 03, 2019 11:37 pm mod-harbour is doing so
I really hope so.

But (like many other attempts) at least, at this time on development, it requires to know one o more supplementary technologies to create even a simple application.

Look at this mod_harbour example fragment:

Code: Select all

function page_home()

	HTML
	<html>
		<head>
			<meta charset="utf-8">
			<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
			<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
			<title>Harbour for Web</title>
		</head>
		<body style="padding:100px;">

			<div class="jumbotron">
			<h1 class="display-4">Welcome to the future!</h1>
			<p class="lead">New mod_harbour for Apache!</p>
			<hr class="my-4">
			<p>Let's move on to the future together!</p>
			<p>It's harbour for Apache!</p>
			<a class="btn btn-primary btn-lg" href="form.prg" role="button">Back to login</a>
			</div>

		</body>
	</html
	ENDTEXT

return nil
You must "construct" the client interface using HTML (eventually css and Javascript too). This could be intimidating for many (most?) xBase programmers.

There is another sample that emulates basic @ SAY GET functionality, but the missing big step required, is a responsive GUI abstraction layer. This is a huge challenge, since if you want responsiveness, you must forget about screen coordinates.

This is possible. HDroidGUI made a great approach:

Code: Select all

   INIT WINDOW oWnd

    BEGIN LAYOUT oLayV SIZE MATCH_PARENT,MATCH_PARENT

   TEXTVIEW oText0 TEXT "HDroidGUI Demo" SIZE MATCH_PARENT,32
   oText0:nAlign := ALIGN_VCENTER

   BROWSE oBrw ARRAY aSamples SIZE MATCH_PARENT, MATCH_PARENT ;
      BACKCOLOR "#C7C7C7" 

   END LAYOUT oLayV

   ACTIVATE WINDOW oWnd
Only this kind of simplicity, will attract new users (and the old ones :D) to Harbour web based development tools.

Just my humble opinion.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
apais
Posts: 440
Joined: Fri Aug 01, 2008 6:03 pm
DBs Used: DBF
Location: uruguay
Contact:

Re: HBuGUI

Post by apais »

Roberto:

Until now, for a web app you minimally need to know: html, css, javascript and php or node.js (server side avascript).
Minimum 4 languages + many frameworks + many deployment/mantaining/testing tools.

mod habour takes away the need of the server side (alien for us) php language and/or node.js

WIN: 1 language less to master + code investment protection (you can reuse all you harbour data handling and server side code base ).
There is another BIG win but I will keep it for myself. (Roberto you can whatsapp me if you like.)

What's the best development approach in this scenario?
Separating gui from data logic and heavy use of templates + strtran() + harbour scripting (mod harbour).
You can even hire a GUI developper ( designer ) and fill those htmls with you data server side. Team work.

What would be an ideal next step ?
Solving the client side need for javascript and substituting it with harbour.

Well, there is an open door but it is very small as today: WebAssembly + emscripten

Emscripten is a source-to-source compiler that runs as a back end to the LLVM compiler and produces a subset of JavaScript known as asm.js. It can also produce WebAssembly. This allows applications and libraries originally designed to run as standard executables to be integrated into client side web applications. asm.js can be compiled by browsers ahead of time meaning that the compiled programs can run much faster than those traditionally written in JavaScript.

Emscripten has been used to port Unreal Engine 3, SQLite, MeshLab, Bullet physics, AutoCAD, and the Qt application framework, among others.

It would require to chande the harbour compiler form generating ansi c compatible PCODE to generate WebAssembly compatible PCODE or at least asm.js PCODE.

I remember early versions of harbour where capable of create java PCODE.

Very DOABLE. But today I don't see any harbour guru capable or willing to do it. This is waaaay above my level.
Pritpal has been doing some experiments, but we all know how he likes to complicate things ( oop for breakfast, lunch, dinner and colations too ).
So I wouldn't bet much money on that.

Antonio would be the only kickstarter I can imagine but he is full hands in mod harbour. It would be too much for just one person.
Who else knows enough about compilers, LLVM runtimes and the like, and is active in harbour community today ?

So for now my advice is to enjoy this small victory (mod harbour) and pray for a second miracle.

Regards/Saludos,

Angel
Angel Pais
Web Apps consultant/architect/developer.
HW_apache (webserver modules) co-developer.
HbTron (Html GUI for harbour desktop hybrid apps) co-developer.
https://www.hbtron.com
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: HBuGUI

Post by Roberto Lopez »

Angel,

Regarding the "wins", I agree with you. There is no doubt about that.

About the GUI thing, yours is an interesting alternative, but an xBase style GUI "constructor" could be a paradise for xBase programmers and non xBase programmers that could be attracted by the power and simplicity of this new web development tool.

I've forgot another another of my web concepts (HMGWEB). A Harbour-CGI developmet tool capable of generate jQuery Mobile (responsive) interfces. Maybe someone could give it a new use :D (https://sourceforge.net/projects/hmgweb/).

Code: Select all

#include 'hmg.ch'

Function Main()

	Define Form Header 'This is a Header' Footer 'This is The Footer' 

		// To make the link to the image file work, we must point it,
		// to the server document root ('/') where it is located (apache/htdocs).

		Define Image 'image_1'
			Value	'/hmg.jpg'
		End Image

		Define Text 'text_1'
			Value	'this is another text!!!'
			Label	'Input Text:'
		End Text

		Define Password 'pass_1'
			Value	'1234'
			Label	'Password:'
		End Password

		Define Flip 'flip_1'
			Value	.T.
			Label	'Flip!'
			Options	{'No','Yes'}
		End Flip

		Define Radio 'radio_1'
			Label	'Radio:'
			Options	{'Moe','Larry','Curly'}
			Default	1
		End Radio

		Define TextArea 'textarea_1'
			Value	'This is a TextArea'
			Label	'TextArea:'
		End TextArea

		Define Date 'date_1'
			Value	DATE()
			Label	'Enter Date:'
		End Date

		Define Number 'num_1'
			Min	1
			Max	10
			Value	5
			Label	'Input Number (1-10):'
		End Number

		Define Select 'select_1'
			Options	{'One','Two','Three'}
			Default	2
			Label	'Select an Option:'
		End Select

		Define CheckBox 'check_1'
			Value	.T.
			Label	'CheckBox!'
		End CheckBox

		* The function SetFormData(cName,cValue) allows to send a value to the server
		* procedure when a session is not active (character only).
		* The value can be retrieved via GetValue() function.
		* When a session is active, use SetGlobal / GetGlobal (any data type).

		SetFormData( 'testvar', 'Hello!' )

		Define Submit 'submit_1'
			Value	'Send Form Data To Server'
			Action	'bye.cgi'
		End Submit

		Define Reset 'reset_1'
			Value	'Undo Changes'
		End Reset

		Define Submit 'submit_2'
			Value	'Go To Demos Menu'
			Action	'menu.cgi'
		End Submit

	End Form

Return Nil	

Regarding emscripten thing... it is a huge job indeed and (as you said) main Harbour core developers are away from the project, so...

Maybe someone Harbour-related commercial services provider, like xHarbour or Antonio could be interested, but, I guess that the project, should be profitable in some way... I don't know... my brain is not good for such kind of thinking :D
apais wrote: Thu Jul 04, 2019 11:58 am There is another BIG win but I will keep it for myself. (Roberto you can whatsapp me if you like.)
I don't know your number, but I'll send you a mail... I'm a very curious person :D

PD: Nos dejaron injustamente fuera de la copa... A los dos! :D
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
bpd2000
Posts: 1207
Joined: Sat Sep 10, 2011 4:07 am
Location: India

Re: HBuGUI

Post by bpd2000 »

apais wrote: Thu Jul 04, 2019 11:58 am So for now my advice is to enjoy this small victory (mod harbour) and pray for a second miracle.
Regards/Saludos,
Angel
+1
BPD
Convert Dream into Reality through HMG
User avatar
bpd2000
Posts: 1207
Joined: Sat Sep 10, 2011 4:07 am
Location: India

Re: HBuGUI

Post by bpd2000 »

Roberto Lopez wrote: Fri Jul 05, 2019 1:49 am I've forgot another another of my web concepts (HMGWEB). A Harbour-CGI developmet tool capable of generate jQuery Mobile (responsive) interfces. Maybe someone could give it a new use :D (https://sourceforge.net/projects/hmgweb/).
Roberto Sir, you are generous
But after the launch of a new project you stop development of said project [See https://sourceforge.net/projects/hmgweb/files/ last modified 2014/03/13]
Where as Antonio Linares is continuously improving the Harbour related project
BPD
Convert Dream into Reality through HMG
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: HBuGUI

Post by Roberto Lopez »

bpd2000 wrote: Fri Jul 05, 2019 5:03 am
Roberto Lopez wrote: Fri Jul 05, 2019 1:49 am I've forgot another another of my web concepts (HMGWEB). A Harbour-CGI developmet tool capable of generate jQuery Mobile (responsive) interfces. Maybe someone could give it a new use :D (https://sourceforge.net/projects/hmgweb/).
Roberto Sir, you are generous
But after the launch of a new project you stop development of said project [See https://sourceforge.net/projects/hmgweb/files/ last modified 2014/03/13]
Where as Antonio Linares is continuously improving the Harbour related project
I've created five open source projects:

- MiniGUI
- HMG
- HMGWEB
- HMGSCRIPT
- JMG

The difference between the first two and the others is that MiniGUI and HMG were successful.

A successful open source project is a team work. It require core developers, contributors, testers, etc.

In all cases, I have only sown the seeds. Sometimes they developed and sometimes not...

MiniGUI and HMG grew from my original work, because people were interested on the project and grouped around them.

I've created apps using HMGWEB, HMGSCRIPT and JMG for some of my customers. These libraries are fully functional and very useful. My preferred one now is JMG. In fact, I'm developing a mobile app for inventory control, using it right now.

In all cases, I've created fully functional GUI libraries. As I've said, some of them grew because they attracted contributors, some others, not.

I'm honored by the comparison with Antonio Linares, but I'm just an user/programmer that shared some of his code with others. Antonio is a genius.

Maybe my comment about mod_harbour was misunderstood.

Mod_harbour is a great thing and we all should thank Antonio for it. I'm just pointing, that, an abstraction layer for easy GUI creation, would be a great thing for it.

In fact, such layer could be created by anyone as a contribution and invoked as an include (or in any other way). I wasn't pointing Antonio for that, at all.

In 2002 (when started MiniGUI) my reasoning was: Harbour is a great thing, but needs an easy-to-use Windows GUI library. Such thinking wasn't against Harbour developers.

I hope I have been clear enough this time.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
bpd2000
Posts: 1207
Joined: Sat Sep 10, 2011 4:07 am
Location: India

Re: HBuGUI

Post by bpd2000 »

Roberto Lopez wrote: Fri Jul 05, 2019 11:10 pm I've created apps using HMGWEB, HMGSCRIPT and JMG for some of my customers. These libraries are fully functional and very useful. My preferred one now is JMG. In fact, I'm developing a mobile app for inventory control, using it right now.
Thank you, Sir, My aim was not to hurt anybody
Ok, right know your main focus is JMG, good
JMG on https://sourceforge.net/projects/jmg is last updated on 2016-10-28 [jmg.alpha.008]
I request for an updated / latest version for the community [It is your option to share or not]
Regards
BPD
Convert Dream into Reality through HMG
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: HBuGUI

Post by Rathinagiri »

Wow! Very interesting and timely topic. Thank you Roberto.

Actually I am developing a simple library (keeping the core HMG and JMG Principle - Simple) for creating a simple form, with various controls and Database connectivity with lesser JavaScript and HTML code known to the users using ModHarbour. It is for my own purpose. Whether it can be generalised and useful to others also I don't know. Once it gets to a shape, let me share.

For example:

Code: Select all

StartFormDefinition( cFormName, cSubmitPage )
TextBox( cTextBoxName, cDefaultText, cTextBoxType )
ComboBox( cComboBoxName, aItems, nDefault )
DatePicker( cDatePickerName, dDefaultDate )
Grid( cGridName, aHeader, aItems, lAllowSelect )
... Other control definitions
EndFormDefinition()
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
Post Reply