Can GAMBAS be an alternative to Visual Basic (or maybe Visual Foxpro)?

Post your Gambas programming questions here.
Mudassir
Posts: 13
Joined: Monday 5th February 2024 11:10pm

Can GAMBAS be an alternative to Visual Basic (or maybe Visual Foxpro)?

Post by Mudassir »

Classic Visual Basic is (was) among one of the most loved and widely used programming languages. MS stopped supporting it's last version (VB 6) on 28 April, 2008. But after almost 16 years, Visual Basic (Classic) stands strong at Rank 23 at TIOBE Index - Feb 2024.

Talking about another (one of the best) RAD tools for data-centric applications, Visual FoxPro... Last version 9, was released in December 2004 and got SP2 patch in October 2007. Support ended in Jan 2010 and ext. support in Jan 2015. The language still stands at rank 27 at TIOBE Index - Feb 2024.

No wonder why (many) programmers used to work in these languages still flooding forums with the question "What is the alternate to Visual Basic or Visual FoxPro". Where to port running applications, and how? Is there any language with similar syntax those people are used to? C, C++, Java, Python, Php, Go, Electron or some SASS like thing? No, something as easy as VB and as quick to develop data-centric applications as VFP... some powerful RAD framework to achieve tasks with graphical UI designer and ability to bind codes on events. There are really too many powerful tools to make web based applications but who want to run a web server and database server on client's computer? And how much do small-to-medium sized businesses pay to write some code for them?

So, the question is: Can GAMBAS be an alternative to Visual Basic or Visual FoxPro (with easy-to-access database system)? Can it compile applications for Windows? Yes, it can be a great alternative to those languages. I read the objective of it's developer and I know he almost achieved his target. Just a bit more work... GAMBAS has a lot of potential and a bright future.

I've been using and coding on MS operating systems since 1998.. basically doing data-centric desktop applications. My coding journey goes from dBase III Plus >> FoxPro (Dos) >> Visual FoxPro. With a bit of work in VB Script and Visual Basic Classic. For website and apps I use Php + SQL. Recently, I switched on Linux and started looking for some powerful native framework to make cross platform applications. I tested GAMBAS, liked it too much.. I mean really TOO MUCH.. I like the neat interface, offer a good collection of controls / widgets, the language structure is well known.. code editor is too good, compiler is fast.. but... sorry to say, it require more database systems embedded and ability to compile applications for widely used platforms.

For now, I have to move on with FreePascal + Lazarus IDE as it make me enable to compile my code for desired platforms. Database support is great, strong community, and UI designer is very well built. But the language 'Pascal' is too different for me or anyone used to work in VB or VFP. I would personally like to go with GAMBAS, as it feels like home but... may be some time soon in future.

I don't know if the message here could even reach the developers or even if any of the project developer would even to through this thread. Got no Idea but here I would like to express what I feel I should... and yeah it's not about starting any kind of flame-war.
Mudassir
Posts: 13
Joined: Monday 5th February 2024 11:10pm

Re: Can GAMBAS be an alternative to Visual Basic (or maybe Visual Foxpro)?

Post by Mudassir »

In reference to my post above, I would like to add that: The only Con I find in GAMBAS is that I can't compile my applications for Windows (if it's considered a drawback). Everything else is too good, I mean it's too good overall. I can't make a compiler, but write code in GAMBAS, make controls work as I want and write functions / procedures to achieve what I want to achieve.
User avatar
BruceSteers
Posts: 1578
Joined: Thursday 23rd July 2020 5:20pm
Location: Isle of Wight
Contact:

Re: Can GAMBAS be an alternative to Visual Basic (or maybe Visual Foxpro)?

Post by BruceSteers »

You can use gambas in Windows if you use WSL2

There's a post here about using gambas in Windows..
https://forum.gambas.one/viewtopic.php?p=5127#p5127
But gambas is coded for linux so needs a linux layer like wsl2 provides.

Is gambas an alternative to microsift basic,, Yes absolutely. But for linux machines.

Is it a compatible clone with code that can be simply be used on a different language/system platform?
No it is very different to ms vb and how window$ works.

The name "Basic" is sadly not a particular defined language structure that is automatically compatible across platforms. they are mostly quite different.
The gambas basic interpreter works very differently to microsoft basic runtimes.
BASIC = (Beginners' All-purpose Symbolic Instruction Code)

The developers (developer) have heard it all a million times before. people saying it should be compatible with vb, cross platform, etc.
the gambas wiki wrote: Will you port Gambas to Windows™ ?
I won't, but I will help any people trying to do that.

Gambas already runs under Cygwin and WSL2. Note that there is a lot of things to port, if you want to do a native port: process management, gb.qt4 component, and so on... This is a huge job. The most promising compiler target would be Mingw-w64, which also allows cross compilation on a unix-like system.

Gambas does a lot of database stuff https://gambaswiki.org/edit/comp/gb.db

Gambas is just not comparable with microsoft basic.
vb and gambas are just both basic (simplified) interpreters but for very different platforms.

You say the Con with gambas is you cannot compile your gambas application for windows.
Well to be fair you cannot compile your ms vb applications in linux/gambas either.
The code is Basic code designed for a different language/interpreter/platform.

I think it is best to understand what gambas is at it's core.
It is a basic language and complete development environment designed by Benoit Minisini that he uses personally to earn a living. (i'm not sure how) but at it's core it is built for his personal needs.

It became so complete and good that he kindly shared it with the world and now we have it too.

So at it's core its what "he" needs it to be.
He simply has never needed it to be a vb clone or to work on windows. so it does not.

A lot of the additional components that make gambas do extra things other than what the main developer needed have been added by other people as gambas is set up to be able to simply add components. I think this was the main developers answer to all the requests of can gambas do this or that. He made it so you can make it do that if you want and he won't have to.

To make it port to windows will take a whole lot of work.
Nobody is prepared to do it.

So it is an Alternative yes , not a compatible replacement for code written for other platforms.
If at first you don't succeed , try doing something differently.
BruceS
Mudassir
Posts: 13
Joined: Monday 5th February 2024 11:10pm

Re: Can GAMBAS be an alternative to Visual Basic (or maybe Visual Foxpro)?

Post by Mudassir »

Good to have your input Bruce. Thanks for the detailed response and time. I (as said already) appreciate your dedication and efforts to support GAMBAS. I installed it just a few days back and had a quick look.. If I can say I loved (not liked) it.. I appreciate everything about it. The post is not about what it could not be/do but.. what if it could...
BruceSteers wrote: Sunday 11th February 2024 12:49pm You can use gambas in Windows if you use WSL2
But gambas is coded for linux so needs a linux layer like wsl2 provides.
Is gambas an alternative to microsift basic,, Yes absolutely. But for linux machines.
Yes, I had a quick look at the post. I said if it could run natively on Windows, not through some compatibility layers / VM.
Is it a compatible clone with code that can be simply be used on a different language/system platform? No it is very different to ms vb and how window$ works.
Never said it's a clone of something. I just see it as the best alternative for a lot of people used to work with (discontinued) Classic VB.
The developers (developer) have heard it all a million times before. people saying it should be compatible with vb, cross platform, etc.
the gambas wiki wrote: Will you port Gambas to Windows™ ?
I won't, but I will help any people trying to do that.
There's a whole lot of things to deal with.. not just a compiler, mostly legal. Very unfortunate.
Gambas does a lot of database stuff https://gambaswiki.org/edit/comp/gb.db
Yes, it support many db systems. I was talking about this
Gambas is just not comparable with microsoft basic. vb and gambas are just both basic (simplified) interpreters but for very different platforms.
Nope, its much better... very neat ui.
You say the Con with gambas is you cannot compile your gambas application for windows. Well to be fair you cannot compile your ms vb applications in linux/gambas either.
Sorry, that was not the answer to what I said. I know the developer is capable to do that... I know the project has potential.. but as I said already, there is much more to deal with.
It is a basic language and complete development environment designed by Benoit Minisini that he uses personally to earn a living. (i'm not sure how) but at it's core it is built for his personal needs. It became so complete and good that he kindly shared it with the world and now we have it too. So at it's core its what "he" needs it to be.
And he did it very well.
To make it port to windows will take a whole lot of work. Nobody is prepared to do it.
This is exactly what I wanted to say.

This was never to have any sort of debate... it was about what you said in second last statement of your response.

I can not deploy my applications to clients machines with it but would love to use it for personal stuff or maybe for some Linux-only program. So, we will have continued interaction but not on this topic. And yeah you're awesome :)

My words about GABMAS:
1. This is the easiest platform for software development.
2. IDE is so neat, great code editor, compiler is very fast.
3. Language Structure: It's BASIC, very well know to almost every programmer
4. It has a lot of potential
User avatar
BruceSteers
Posts: 1578
Joined: Thursday 23rd July 2020 5:20pm
Location: Isle of Wight
Contact:

Re: Can GAMBAS be an alternative to Visual Basic (or maybe Visual Foxpro)?

Post by BruceSteers »

Ahh i see.

Well I was no different from you many years back :)
An experienced vb programmer moving to linux. i searched and tried many different IDE choices.

When I found gambas it was a godsend. way better than anything else. I did not take long to learn the , er , basics :)

By far the most complete and feature rich IDE around.

For personal use it's the absolute best. the IDE and many of the components are written in gambas and if you download the source and install using the autotools method you are free to modify the IDE and/or components as you wish.

My gambas IDE has many extra features like...
A Keystroke recorder, record and playback keystrokes to modify many lines of code.
External tools , works like Pluma external tools plugin and lets you create scripts to modify code.
Inhibits shutdown if unsaved documents are open

Here is my gambas preferences page that looks a little different to anyone else's..
Untitled.jpg
Untitled.jpg (83.91 KiB) Viewed 2188 times
My fork of gambas is here https://gitlab.com/bsteers4/gambas
There is an incomplete list of changes.
I made no changes to components only the IDE so my programs are compatible with other gambas users, only my personal IDE is modified.

Gambas is a great adventure.
Learning all the tricks and possibilities of what you can do is great fun.
If at first you don't succeed , try doing something differently.
BruceS
Mudassir
Posts: 13
Joined: Monday 5th February 2024 11:10pm

Re: Can GAMBAS be an alternative to Visual Basic (or maybe Visual Foxpro)?

Post by Mudassir »

Great to know about you.. at least we did not end up disagreeing :)

I don't want to make changes to the IDE but if possible.. I would like to add this, IDK how as I don't know how to write 'c' in C. Please guide through if it's possible. Most of my applications are written in VFP and I've to deal a lot with DBF tables.

Also it would be so helpful if there's some guide or tutorial on writing / editing components (controls).
User avatar
thatbruce
Posts: 168
Joined: Saturday 4th September 2021 11:29pm

Re: Can GAMBAS be an alternative to Visual Basic (or maybe Visual Foxpro)?

Post by thatbruce »

I'd say your best chance is to find an OBCD driver for dbase and use that. (Actually, I'd really say dbase? Is that still around? and if so why?)
Having said that let me now say "ODBC" is the worst possible way to access a database."
You could learn how to write Gambas code to access the referenced api, but I doubt there would be anyone who would care enough about a dBase interface to help.
Sorry, but best of luck.
the other bruce
Have you ever noticed that software is never advertised using the adjective "spreadable".
Mudassir
Posts: 13
Joined: Monday 5th February 2024 11:10pm

Re: Can GAMBAS be an alternative to Visual Basic (or maybe Visual Foxpro)?

Post by Mudassir »

thatbruce wrote: Saturday 17th February 2024 7:19am I'd say your best chance is to find an OBCD driver for dbase and use that. (Actually, I'd really say dbase? Is that still around? and if so why?)
Having said that let me now say "ODBC" is the worst possible way to access a database."
You could learn how to write Gambas code to access the referenced api, but I doubt there would be anyone who would care enough about a dBase interface to help.
Sorry, but best of luck.
the other bruce
Thanks for the input Bruce. I've checked several options... looks like porting existing dbf tables to sqlite is best bet.
User avatar
Technopeasant
Posts: 144
Joined: Saturday 13th July 2019 6:50pm
Location: Stony Plain, Alberta, Canada
Contact:

Re: Can GAMBAS be an alternative to Visual Basic (or maybe Visual Foxpro)?

Post by Technopeasant »

VisualFBEditor can be used on Windows and Linux as it uses the same component system as Lazarus.

https://github.com/XusinboyBekchanov/VisualFBEditor

https://pigalore.miraheze.org/wiki/Runn ... in_Windows
Technical director,
Piga Software
http://icculus.org/piga/
Mudassir
Posts: 13
Joined: Monday 5th February 2024 11:10pm

Re: Can GAMBAS be an alternative to Visual Basic (or maybe Visual Foxpro)?

Post by Mudassir »

Technopeasant wrote: Thursday 7th March 2024 4:13am VisualFBEditor can be used on Windows and Linux as it uses the same component system as Lazarus.

https://github.com/XusinboyBekchanov/VisualFBEditor

https://pigalore.miraheze.org/wiki/Runn ... in_Windows
That must be a lot of research behind this two line post... Thank you very much for sharing!
Will check VisualFBEditor for sure.
Post Reply