Going Native ! A better way to build apps for Windows tablets.
Now I am not talking about Windows store apps here, but real Windows desktop applications. Going native or writing directly to the Windows API (WIN32) using a compiler designed for building small and fast applications can produce software which will run not only on the latest Windows 8 tablets, but also on Windows 7 tablets and Windows XP, Vista , 7 and 8 desktop PC’s.
This is why I personally prefer to use the PowerBasic compiler. PowerBasic has a number of advantages in my opinion. First, it is Basic. Basic is a programming language which has a more natural syntax to it. Simply put, it is more readable than other languages. Second, applications written using PowerBasic require minimal resources.
A compilers effectiveness means more than simply generating fast machine code for loops and calculations. It has more to do with the overall richness of the language and its ability to solve problems. For example one of PowerBasic’s strengths is its rich string command set and how it uses the Windows OLE engine (API’s) for implimenting variable lengths strings. Manipulating strings is a vital task when writing software. But PowerBasic goes further. It is also very low level. For example, one could build fixed data types within a variable length string using pointers to structures or even define arrays within a string using the DIM AT (dimension at) command to define an array within any existing block of memory, even a string.
PowerBasic handles all the memory management for you (and fast), so you don’t have to worry about allocating and deallocating memory for variables. One thing I like about PowerBasic is that even though it supports Object Oriented Programming using its own classes command set or even COM objects, you don’t have to use any OOP if you don’t want do. You can write apps using 100% procedurally based code.
I have found that procedurally based code can produce amazingly small and compact executables, which is what is needed for writing software which can push the limits of a Windows tablet computer.
Now, learning the Windows API can be a challenge, so PowerBasic provides a simple GUI command set called DDT (Dynamic Dialog Tools) which makes coding user interfaces much easier. For those who want more, this is why I developed my product EZGUI 5.0 Professional. The idea is to make GUI development faster, easier and more powerful. Yet, I designed EZGUI so it can easily be extended using the Windows API, so one can go beyond its feature set to tap directly into the Windows operating system.
EZGUI itself though, was written using PowerBasic using purely native code. The native API’s are so rich with features not often tapped into by programmers that a creative developer can do all sorts of things and not feel limited. True, it took me years to learn many of the secrets of the WIN32 API’s, but it was worth it. One of my favorite sets of API’s are the DIB (device indepent bitmaps) API’s. They have been in Windows, since Windows 95, yet they offer a programmer an amazing ability to work low level with pixels. I wrote EZGUI’s 2D sprite engine using DIB’s. EZGUI 5.0 Pro has 22 image filters, based on the DIB engine. Another great feature in the native API’s is owner draw. Owner Draw allows you to custom draw how a control looks. It opens up all sorts of possiblities. I implimented EZGUI’s 3D colored buttons using owner draw. I created two custom controls (Files Listbox and Property Listbox) using owner draw (and superclassing).
Actually, some of EZGUI’s most powerful capabilities comes from providing direct access to a number of low level features of the native API’s, such as subclassing, superclassing, DIB’s, ownerdraw, customdraw, threading and more.
I am convinced that tapping into the native API’s allows programmers to build small, faster, more powerful applications.