Page 1 of 3
It is not ready yet, but...
Posted: Tue Mar 29, 2016 1:35 am
by Roberto Lopez
Hi All,
I'm facing a new project: A web app.
My obsession since I've started coding web apps, is to use the same code for desktop and mobile browsers.
HMGSCRIPT (back-end agnostic) is (basically) for desktop and HMGWEB (Harbour-CGI) is (basically) for mobile devices.
So, I've created a new little library called JMG.
The 'J' stands for Javascript (I'm sure that you can imagine the meaning of M and G

)
This is (currently) just an idea (a concept) but I'm sure that (humbly) is really promising
It must be considered as pre-alpha. So, anything can change.
The main demo app is 'main.js'.
You can test simply double clicking 'index.html' file, excepting for AJAX sample. For it, you need to install any AMP server, copy the files to the web root and create the required MySql table.
No docs or help by now...
https://sourceforge.net/projects/jmg/
Enjoy!
Re: It is not ready yet, but...
Posted: Tue Mar 29, 2016 2:38 am
by andyglezl
Fantastico !
Probé el "index.html", Adelante por favor.
Re: It is not ready yet, but...
Posted: Tue Mar 29, 2016 3:10 am
by esgici
andyglezl wrote:Fantastico !
Yes,
Fantastic 
( As always )
Thanks maestro

Re: It is not ready yet, but...
Posted: Tue Mar 29, 2016 4:14 am
by Steed
Thanks
Re: It is not ready yet, but...
Posted: Tue Mar 29, 2016 4:46 am
by Rathinagiri
Roberto , it is really promising in these days of web.
jQuery is the best option and it has many widgets.
IMHO, it is better to send the whole query to php and we need not write any PHP code.
Thanks for sharing.
It will be better if we create a separate area in our forum for JMG also.
Re: It is not ready yet, but...
Posted: Tue Mar 29, 2016 12:37 pm
by Roberto Lopez
Rathinagiri wrote:IMHO, it is better to send the whole query to php and we need not write any PHP code.
It could be good, but creates a problem: The source (Javascript) is downloaded to client devices, so, it is available for the users, then, using a generic PHP procedure, capable of doing any query received from the clientes, could be extremely dangerous.
By the other hand, coding all in the same language and in the client app only, could be fantastic... so I'm open to ideas to achieve that.
Rathinagiri wrote:
It will be better if we create a separate area in our forum for JMG also.
Yes, of course.
Re: It is not ready yet, but...
Posted: Tue Mar 29, 2016 2:21 pm
by serge_girard
Thanks for sharing Roberto !
Serge
Re: It is not ready yet, but...
Posted: Tue Mar 29, 2016 3:06 pm
by EduardoLuis
Hi Roberto:
Excellent, this will make HMG grow up.-
Thanks for your effort and share with us.-
With regards.
Eduardo
Hola Roberto:
Excelente !!, esto hará crecer HMG aun mas.-
Gracias por tu esfuerzo y por compartilo con nosotros.-
Cordialmente.
Eduardo
Re: It is not ready yet, but...
Posted: Tue Mar 29, 2016 3:24 pm
by Rathinagiri
It could be good, but creates a problem: The source (Javascript) is downloaded to client devices, so, it is available for the users, then, using a generic PHP procedure, capable of doing any query received from the clientes, could be extremely dangerous.
Yes. It is a valid point I have missed out. But, except the query part, all the informations passed on as parameters are known to the users (via javascript) and they can do harm using that also. IMHO, a proper and better password and session management system can solve this problem.
By the other hand, coding all in the same language and in the client app only, could be fantastic... so I'm open to ideas to achieve that.
This is what I mean. Otherwise, we have to maintain our project in both PHP and JMG.
PHP 5.0 comes with SQLite by default and it might be also a choice if our application is used by less number of people and we use 'select' query most of the time.
I have created JMG forum and moved this topic inside that forum.
Re: It is not ready yet, but...
Posted: Tue Mar 29, 2016 5:32 pm
by Roberto Lopez
Rathinagiri wrote:
Yes. It is a valid point I have missed out. But, except the query part, all the informations passed on as parameters are known to the users (via javascript) and they can do harm using that also. IMHO, a proper and better password and session management system can solve this problem.
You left me thinking...
Maybe... a generic PHP script for each basic SQL command (SELECT, INSERT, UPDATE and DELETE) and a very carefully assigned permissions for each user in every table could work...
Moreover, the fact that the user could (eventually) manipulate the source code, creates a lot of potentially unwanted scenarios, but, we can try it...
Rathinagiri wrote:
PHP 5.0 comes with SQLite by default and it might be also a choice if our application is used by less number of people and we use 'select' query most of the time.
PHP includes from some time ago PDO. It allows to code once and switch database drivers.
Please, take a look at this:
http://wiki.hashphp.org/PDO_Tutorial_fo ... use_PDO.3F