Wednesday, 19 of June of 2013

Tag » software

Small footprint desktop applications for Windows 8

One of the problems in producing low cost Windows 8 devices is that the hardware required often brings the cost of the device too high. Why this problem ? Because a good bit of software does not run well unless you have a good bit of horsepower in the computer. It really should not be so and let me explain why.

The typical developer PC

The mainstream development tools (aka. Visual Studio) require so much horsepower that the typical software developer has a far above average PC. I downloaded Visual Studio Express and it took a good 2 1/2 gigabytes of diskspace just to install it. I doubt very much the average developer could use an Atom powered PC with just 2 gig ram for their primary development PC. Now if the development tools need so much power, what about the software created with it ? Do developers even fully appreciate how limited the average consumer PC is compared to what they develop on ? It is a valid question.

PowerBasic and EZGUI, tiny by comparison

I used the PowerBasic compiler to build my GUI tools. My current development PC is a Vista Home PC, which I upgraded to a Pentium D CPU and 2 gigabytes ram. The only reason I am still not using my Windows XP PC for development is that it crashed a couple of times and was not reliable any more, so I switched PC’s. My Vista computer was upgraded not for the benefit of my development tools, but because I used it for some early testing of Windows 8 (swapped out the harddrive and installed Windows 8 Build Preview on it). I am back to Vista now though.

When working on my XP computer I only had a Intel Celeron CPU with an upgrade to 768 megabytes ram. I actually worked on that PC for some years with only 256 meg ram. Before that I actually was developing on a Windows 95 (yes, 95) PC which I souped up to big 256 meg ram (a lot for 95).

My current development tools, the PowerBasic compiler and my GUI engine (EZGUI 5.0) only require about 20 megabytes of disk space. Imagine developing on a PC and only needing 20 megabytes to install the development tools and only needing 256 megabytes of ram to work with it. I could run my development tools on any PC from Windows XP to Windows 8.

The entire GUI engine (DLL’s) I built is only about 1 megabyte in size. The Visual Designer I created with it for as a RAD development tool only requies about another 1 megabyte of space. The rest is documentation and sample code.

Compile time when using the PowerBasic compiler is only a few seconds for the largest source code file I need to compile. The EZGUI runtime is only about 45,000 lines of code, not counting all the Windows API headers required to compile it.

Add to this, when an application uses the WIN32 API, it does not need any dot.net runtimes. For 3D, I use OpenGL and it is supported even on legacy PC’s. No large operating system frameworks required.

So this is why I work with the WIN32 API and use PowerBasic. Small footprint applications means they run on even the most minimal of hardware. If more software was like this, then Windows 8 devices (PC’s, tablets) could be less expensive requiring less powerful hardware.

 

For more information about PowerBasic see:   http://www.powerbasic.com

 

For more information about EZGUI 5.0 Professional see:   http://cwsof.com/ezgui5promain.html


Comments Off

Windows 8 and the Desktop requires more dynamic software

With all the emphasis on the Windows Store (aka. Metro) side of Windows 8, one may wonder what about the desktop ? Can the desktop be a viable platform for future touch enabled applications, especially for tablets ?

The answer is yes, but software must change in how it is designed for the desktop side of Windows 8. It is not enough to simply make software scalable or even touch ready. What is needed is dynamic, hybrid software, capable of dealing with a variety of devices, as well as a variety of versions of Windows.

How do I plan on doing this, you may ask ?

Smart software

I have for a long time been a strong supporter of backward compatibility. Software needs to be able to run on older computers, as well as newer ones. Software needs to be able to know not only what version of Windows it is running on and then adapt, but it also needs to be able to know what hardware it is running on, for example a desktop with a large display or a tablet with a smaller sized display and with touch and then also be able to adapt. This means the user interface must be dynamic and changable as the need requires. What works with a mouse and a large screen may not work with a tablet, touch and a smaller screen. What do you do if you connect a tablet to a larger external display ? Software needs to be dynamic. But with all the dependence upon complex drag and drop development tools, do developers know how to make their software dynamic ?

Hand coded, customized software

An interesting thing has happened with my customer base. While most prefer a drag and drop Visual Designer for development, some actually prefer to hand code their applications without any Designer at all. Hand coding is likely unheard of today for many programmers, especially those who are using todays studio development environments. Hand coding though is not only possible, it also can provide more opportunities for developing dynamic software like I mention above.

EZGUI 5.0 professional (see:  http://cwsof.com/ezgui5pro.html  ), the latest version of my EZGUI development tool, was designed specifically with the hand coder in mind with many features geared towards building more dynamic software. I also have plans to work on an update (version 5.1) to improve its functionality specifically on Windows 8 (ie. add touch specific features, etc.). While EZGUI has a Visual Designer, I find that customers who are hand coders are able to create more dynamic and unique software than those who depend upon the Visual Designer/Code Generator. My goal is to improve the designer experience so it provides a little more of the flexiblity that hand coders currently experience.

Dynamic Customization

One of the advantages of EZGUI is its customization features. For hand coders, one has more options for dynamically customizing user interfaces. For example, EZGUI has a strong ownerdraw engine for customizing controls. One can easily write code which dynamically changes controls based on current need. Hand coders also can write dynamic code for control creation, so a forms controls can change as needed for the circumstance. It is the customization features which I feel are one of EZGUI’s greatest strengths. EZGUI was designed so you can even customize the common dialogs, like the open file dialog, to change how they look and even function. It is this ability to dynamically customize applications which can make the biggest difference in developing desktop software which can change as needed depending upon the hardware it is run on.

Windows Store applications can only run on Windows 8. Imagine software which can change as needed when run on a tablet, but morphs into something different when run on a legacy Windows XP or Vista computer. Smart software, you might call it. Not only would this be a good idea, but it is quite doable.

EZGUI and customization

EZGUI was designed with customization in mind. Not only does it have an ownerdraw and customdraw engine for customizing controls, but how it handles coordinates for user interfaces also makes a big difference. EZGUI uses a unique character based scalable coordinate system, rather than pixels. Unlike Dialog Units which is built into the Windows Dialog API’s, EZGUI’s character units are floating point so they can accurately define exact positions and sizes to the pixel level. You can change the character unit size dynamically, which will scale all forms and controls created after. EZGUI can also link the creation of fonts to this character unit, rather than to the system DPI settings (small fonts, large fonts on older systems). Fonts are defined via an indexing system, so rather than a fixed font for each control, you can have a fixed font index, but you can dynamically create any font you want for that index, before the controls are created so you can change an entire applications fonts on the fly.

Especially when hand coding an application, one can actually have multiple code blocks for the creation of the forms controls, but use only a single set of event routines for all of them. For example, you could dynamically determine what kind of hardware your application is running on and then when a form is created, select a different control definition routine depending upon what is needed. The different control definition routines, could all use the exact same event routines, so you only change how the controls are created, their properties, colors, fonts and position, but use only one set of event code for different layouts. Because EZGUI is not object oriented, you don’t have to create objects and work with their own event routines. Controls are created using simple function/procedure calls which can be dynamically changed, but all the events are sent to a different set of routines, no matter how the control was created. As long as the control ID matches, it does not matter how the control was created, the event routine can process the events for a specific control based on its ID.

Customization also is important to define the look and feel of an application. For example maybe on Windows 8 you would like a more flat appearance, but on Windows 7 or earlier you would like a more themed look or even something custom. Using ownerdraw to customize controls dynamically allows you to do this. Maybe you don’t like the flat appearance of desktop apps on Windows 8 and want your app to look the same on all versions of Windows or at least similar. EZGUI’s customizing features makes this more possible, at least to make them more similar than would be otherwise.

Working with more universal features

One problem one has when designing software for the latest version of Windows is that some times one may use features which only exist on the latest version. This makes designing software which works similarly on multiple versions of Windows very difficult. EZGUI was designed to add special features, but still within the confines of what exists in multiple Windows platforms. For example, EZGUI has its own proprietary 2D Sprite engine which   works on nearly all versions of Windows from Windows 95 to Windows 8. No DirectX is used and no special hardware is required. Even EZGUI’s 3D Canvas control was designed to use a more universal OpenGL 2.0 specification, so that the majority of Windows computers will support it.  By using a GUI framework which was designed for a larger range of Windows platforms, one can build software designed for the majority of Windows PCs in use today. EZGUI even dynamically loads some operating system dynamic link libraries and tests for the existance of some API’s before using them so the runtime libraries run well on most versions of Windows, but can take advantage of features which possibly may only exist in later versions of Windows. Even the GUI framework itself is dynamic.

Dynamic, Smart software is possible

So software developers should be able to create such dynamic, smart software so it runs well on a variety of devices (x86) from tablets, netbooks to full blown desktops. This how I designed EZGUI to work, to be dynamic, customizable.


Comments Off

Windows Blue should not mean the end of the desktop !

Tech journalists are talking about what Windows Blue will mean for the future of Windows. Actually, no matter what anyone suggests, only Microsoft really knows what it has planned for future versions of Windows. What really is important though is how changes in Windows will affect software developers, plus businesses, and why considering this may be far more important in the long run.

Windows means more than browsing the web, watching videos and visiting facebook.

In recent years we have seen the over consumerization of computers, in particular the shift from desktop PCs to tablets and other portable devices. Everything seems to be all about mobile today. But is mobile and touch the future of computers ?

What we are seeing is not the shift from desktop computers to mobile, but a significant split between business and consumers. When I started programming in the late 80′s and early 90′s, computers were business tools, not consumer products. A computer with a 20 meg harddrive, RGB monitor and 640 KB of memory could cost you $2,000 to $3,000. A computer was a business investment and productivity was vital to make it worth the investment. In time the prices of computers dropped significantly, so much so that consumers (average people) began to buy computers. The strange thing about this though was the consumers didn’t know what to do with their computers, they looked for software which provided some kind of entertainment value. Consumers played games. They listened to music. With the coming of the internet, they browsed the web, did their shopping online, emailed friends and family. A powerful tool had become a toy, an entertainment device. Many of these same consumers who were watching videos online, buying stuff at Amazon, didn’t have the slightest idea of key functionality built into their computer. Many didn’t know how to create folders, copy files, delete files, etc. Many consumers never realized that they needed to purchase a new subscription to the antivirus software which came with their computer, after 90 days. It became obvious that consumers were using a tool which they barely knew anything about. Having been a computer consultant and programmer for a number of years, time after time I found myself again and again suggesting to consumers I dealt with that maybe they should buy a book about Windows and learn a little more about it and what it can do.

I had come to the conclusion that the average person (consumer) was being sold more than they really needed. Then along came MP3 players, smart phones and tablets. Consumers didn’t need a keyboard, they simply touched the device. They didn’t have to learn all the complexities of a full blown computer. They finally were purchasing what they wanted all along. Something which did a specific task and that is it. So now we see computer sales slowing down significantly. Manufacturers should have seen this coming. The computer market has made the shift that all should have expected. But there is a problem here. Windows means more than browsing the web, watching videos and visiting facebook. Windows is part of another key market and that is the business computer market, not just consumer devices. Computers started out as tools, not toys. They still are tools and very important ones. So where does Windows 8 come in ?

Windows 8 is not the end of the desktop but it bridges the gap between consumer devices and business tools.

The Metro (or Modern UI or Windows Store) side of Windows 8 is all about two things. Consumerization of electronic devices and touch. These two aspects are not necessarily the same thing. Touch has a big value in consumerization, but it can also be a useful tool in the right situation. Touch though is more meaningful for consumer devices because that is what consumers want and need. Touch is useful for business, but it is not the end all. It has a place, but is also has its limits and why many don’t see this is confusing. Businesses can’t make their decisions about tools by watching fancy TV commercials with everybody dancing around and touching their computer screens. Businesses can ill afford to waste their money on mobile devices if they don’t have a real purpose to their business. A tablet PC is only valuable if it really increases productivity for a business. There are some cases where it will and there are many cases where it simply won’t. Just putting a tablet PC in an employees hand won’t automatically improve a business. Put a tablet PC into the right employees hand and with the right software and for the right reason and then it may make a difference. Computers cost money and like any business tool they must be used in the right way and the right situation, otherwise they are a waste of money.

Having written software for a variety of businesses from local mom and pop stores to manufacturing environments, I can appreciate how important computers are, but only when they are used effectively. Journalists like to talk about software like Office suites and how once Microsoft Office is ported to Metro, the desktop is no longer needed. The real question is though, how much do they really know about how computers are really being used today in business ? Many people may not appreciate that a significant portion of business software is custom designed for a specific task or for a specific vertical market. Large corporations likely spend millions, if not billions of dollars in development costs of custom software specific to their business alone. Every time there is a change in how an operating system works and rewrites of their software become necessary, huge sums of money have to be spent just to keep up. The less a company has to redo things which currently work fine, the more money they save (and that is important today). Why do you think so many companies are still using Windows XP ? The old adage “if it is not broke, don’t fix it” means saving money in the long run.

So, as far as the consumer side of things, maybe Windows could do away with the desktop. But as far as businesses are concerned, to do away with the desktop could mean the loss of millions, if not billions of dollars. But wouldn’t Microsoft recognize this ? I can’t speak for them, but I would have to venture a guess that they do. So how does one create a totally new operating system which solves the needs of the consumer, while satisfying the needs of businesses ? The answer, merge a new operating system into the existing one and have the best of both worlds. That is what Windows 8 does.

If the desktop were not important, it would have been broken already in Windows 8.

If the desktop had no value, I would venture to say that Microsoft would already have broken a lot of it already in Windows 8. Guess what ? They didn’t. Actually they did a really good job in making sure they didn’t break it. One of the first things I had to do when I first got my hands on the build version of Windows 8 was to test it to see how well it supported the core WIN32 API’s which have been around since Windows 95/98. I was expecting a lot of things to possibly be broken, since Windows 8 was so different, but amazingly it all worked and very well. Now I was not testing just some simple user interface stuff which one would expect to work. I was testing quite a lot of lower level stuff. I was testing things like the Windows DIB engine, OpenGL, subclassing, superclassing, ownerdraw, customdraw, GDI drawing, MDI, MCI, complex window regions, custom window classes, drag and drop and more. I wanted to know right at the start, was Windows 8 going to break a lot of my code ? But it didn’t. I had only one little problem and even that was fixed in a later preview version of Windows 8.

Now if Microsoft has taken the same care with things like dot.net as it has with the core WIN32 API’s, then developers should feel confident that the desktop is well and alive in Windows 8. So why all this effort to maintain what some may refer to as legacy technology ? Because it is important, no vital, to businesses. I can understand Microsofts need to promote the new UI stuff in Windows 8. It is important to the consumerization of computers and to mobile. But the desktop surely is not dead yet and hopefully it will be with us for a good time longer.

Touch and the Modern UI don’t fit all business needs.

Another reason the desktop needs to stick around for some time is that touch is not the solution to everything. Touch is great in the right situations. It may even be preferred by consumers. But touch is not going to replace the mouse anytime soon. Productivity is vital in business and remember, for a business, a computer is a tool. No touch screen can replace a real keyboard for fast character input. This is so obvious I can not see how anyone could even suggest otherwise. As a programmer the speed of typing is so critical to me that I still use a 20 year old IBM keyboard because few modern keyboards come even close to the quality of my old IBM keyboard. IBM learned how to make some of the best keyboards ever and mine is key to my own productivity. The mouse is far superior to touch for fine tuned accuracy in pointing. Actually a mouse can do some things touch can not (trust me its true). Not even a touchpad on a laptop comes close to the accuracy of a real mouse and that is surely better than touch alone. The beauty of the mouse comes from its ability to separate movement from a touch action (a click for a mouse), plus its accuracy. Many business applications require a real keyboard, a real mouse and yes a real desktop environment (aka. the Windows Desktop).

A lot of software is boring.

Most consumers get excited about the latest fad in software. It has to look pretty. It has to be exciting (ie. touch). It has to be new ! Not so with business. Actually a lot of business software is quite boring and that is a good thing. The so called modern UI look of Metro is meaningless for some software. It doesn’t matter whether the look is flat or 3D. What matters is the job the software does. Many tasks a computer is used for are simply boring. It is the work they do which is important. Does it solve a problem ? Does it make critical calculations a business may depend upon ? Does it interface with some machine ? Does it do the job it was intended to do ? The whole reason many started using computers was that computers don’t mind doing boring jobs, unlike people who do mind. For many businesses software is just a tool and the tool has to do its job and do it right. Some companies spend a lot of money developing such boring software, because it does the job and does it right. What businesses need to know though is that all the efforts to create such software is not in vain. A lot of money is lost by companies trying to “build a better mousetrap” as they say, only to find that the originally application worked fine and it wasn’t worth the effort to recreate it as something new. What businesses need is backward compatibility in the operating systems they use. They don’t want to have to rewrite every application they use just because they bought some new computers. That is not cost effective. To them the computer is a tool and they don’t need a new tool which can’t do what the old did.

Do we need the desktop anymore ?

Absolutely ! How long it will stay with us, I can not say and won’t even try guessing. But for now, there is a good reason why Windows 8 provides all the necessary desktop features we require. If it wasn’t necessary, it wouldn’t be there in Windows 8.


Comments Off