Why I created EZGUI and how Powerbasic made it possible

There is an old saying, “jack of all trades , but master of none”. What does that have to do with PowerBasic ?

Some programmers prefer to learn as many different programming languages as possible. That may be fine for them, but not for me. I am a BASIC programmer. I started with Basic back in 1975 on a terminal connected via a phone to a college mainframe computer in an advanced math class in high school. Some years later I bought my first computer, a TI-99 home computer. Then came an Atari 400 and then my favorite the Commodore 64. With the C64 I used the Abacus Basic compiler (yes a real native code compiler). With that compiler I even wrote my own minimal Basic compiler, optimized for producing very fast programs.

I started doing commercial programming for local businesses , first on CPM computers and then IBM compatible computers, and yes using Basic. From there I gravitated to Quick Basic 4.0, PDS 7.1 and later Visual Basic. Ok, I think you get the point. I am a Basic programmer and Basic is my language of choice. I find working with a single language (abeit different variations over time) works best for me because it allows me to literally think in that language. I would rather master just one language, than to be a so, so programmer in multiple languages. Code comes easy because of this. Basic is easy to remember. It is a natural language. But Powerbasic is also a powerful low level language. I like to be closer to the machine when programming. I think about bits and bytes so things like pointers come natural to me. I want performance too and Powerbasic provides me with as good performance as many other languages. Powerbasic compiles very fast so little time is wasted.

But for me, something was missing. I started with PowerBasic when it was viewed more as a DLL compiler (as an addon to Visual Basic) than an application compiler. I was working with Powerbasic version 5.0, which had no GUI command set, no graphics, no print command set. I had to learn the Windows API from scratch to do anything with it. But for me, I am appreciate the value of modular design and the need to write quality library code. So I created EZGUI as an inhouse tool so I could build GUIs faster. I designed it to be easy to use, but also to be powerful in areas which I felt were important. It eventually became a commercial product, a GUI engine for PowerBasic.

I really don’t think I could have written something like EZGUI with any other language.  But in the process I found something interesting about Windows. There was a great deal of powerful features one could tap into when using the WIN32 APIs. Sadly, the API documentation does not do a very good job of teaching you how to tap into all that power. But I found some good books and began to learn as much as I could. What amazed me though was that Windows was full of all sorts of low level APIs which allowed you to customize the look and feel of applications in almost endless ways. Unlike Visual Basic programmers (classic VB) who often relied on third party OCX controls to add features, I found that I could build a library which was designed for customization right from the start. If I wanted something different, I didn’t need to purchase a new custom control. I could build it myself. I could customize existing controls in all sorts of ways.

Customization is key. I created EZGUI, not only to make building GUIs easier, but so I could create unique GUIs, unlike other applications. I wanted a graphic control, so built my own Canvas control. But I wanted something which has almost endless ways to customize it, so I built in a low level DIB engine to it so I could manipulate pixels at a lower level and very fast. I wanted to be able to do animation and make the Canvas come alive, so built my own 2D sprite engine for it. I kept adding more and more graphic commands for the Canvas control so I could draw more complex images.

With EZGUI 5.0, I wanted even more powerful graphics, so I created my own 3D OpenGL based Canvas control. I build a superclass engine in EZGUI, so I could build the new control from the existing control and then add 3D on top of it. I used OpenGL because it allowed me to create a real custom control which can have multiple instances on the same form. Most OpenGL code you will see on the web is a single graphic window. I wanted a real control which could have multiple windows at the same time on the same parent form. OpenGL made this possible.

In every version of EZGUI I have tried to keep pushing the limits of GUI design. Even my Visual Designer is based on the EZGUI engine. Yes, all the work I did to build drag and drop features for my designer, I put into the runtime engine as well so it could be used over and over again. Have you ever noticed how many indie Basic programming languages found on the web today, while they make be decent compilers they usually are poor in the visual designer area ? They may have some kind of form designer, but they often are not very good. Why ? Because it is not easy to build a drag and drop visual designer. I not only built one, but I built that capability into the EZGUI runtime engine so anyone could build a visual designer (using PowerBasic and EZGUI).

I didn’t like the idea of having to depend upon a bunch of third party controls if I wanted a uniquely different user interface. So I tapped into the ownerdraw and customdraw engines in Windows so the EZGUI runtime was capable of customizing controls. Want something different ? Build it yourself and not from scratch, but using ownerdraw.

So while I listened to customers as far as features they wanted to see in EZGUI, I also listened to my own programming desires. I built into EZGUI what I wanted to see in a GUI engine. Even if only a few customers actually ever used some features, if I felt they were potentially useful I added them. If it was something I really felt a programmer should be able to do, I added it. Each new version of EZGUI added significant new features. And yet, despite the huge fetaure set now in EZGUI 5.0 Professional, the entire runtime is only about 1 megabyte in size. This is tiny in comparison to the feature set. Along with Powerbasic this allows one to build applications with an amazingly small footprint.

So, I use Powerbasic because it is Basic, and a good one at that.

I created EZGUI because it is what I want in a programming tool. I allows me to build a variety of user interfaces with unique features and quickly.