February 2016
Volume 31 Number 2
[Don't Get Me Started]
VB6: Waking a Sleeping Giant
By David Platt | February 2016
This issue begins my seventh year stirring up trouble in this space. To celebrate the occasion, I’m going to kick over my all-time favorite hornets’ nest: the developers who continue to love Visual Basic 6, and those who love to hate it and them.
I’ve written twice (msdn.com/magazine/jj133828 and msdn.com/magazine/dn745870) about the unique place VB6 occupies in today’s software development world, likening it to a cockroach, a bus and a knuckleball. I got more responses to these columns than anything else I’ve ever written. Today I’m going to exceed my usual pouring of oil on troubled fires. I’m about to set off a nuclear explosion, the radiation from which will mutate VB6 into immortality. Don’t believe me? Read on, my friend.
I was having lunch with a client some weeks ago. He has a Silverlight-based solution that displays video from security cameras. But Microsoft has now deprecated Silverlight, encouraging developers to switch to HTML5 instead. “That’s a pain in the ass,” complained my client. “I was doing fine with what I had. Now I have to go learn another language and migrate all my code. My app isn’t all that complicated, just a few video streams and some buttons. I wish there was some way to make that really easy.”
Then it hit me: This is exactly what VB6 does with its current target of unmanaged Windows apps. How about we develop a version of VB6 that produces HTML5? The output would then run in any browser, on any OS, on any platform, desktop or mobile.
I wrote last May (msdn.com/magazine/dn973019) about the smallpox virus and how it managed to jump hosts—from human to computer—just before the last of the virus died in its final human victim. Here’s the chance for VB to jump from its unmanaged Windows host and burst out and infect the entire software world; to do what Java promised and never delivered—writing code once, running absolutely everywhere. A true Universal app. From humble, old VB6. Who’d-a thunk it? Because it will go anywhere, I’ll call the new language VB*.
The VB* programming model would conceptually resemble the ASP.NET Web Forms model, in which controls render their content as HTML. But that rendering requires ASP.NET on the server side, and VB* needs to avoid depending on any particular server. Therefore, VB* will compile down to independent pages of HTML5 elements and JavaScript code, just as VB6 compiles down to x86 assembler with Windows function calls. You’ll be able to slap the page onto any HTML5 server and access it from any HTML5 client.
VB* will use the VB6 ultra-simple syntax and organization. We’ll deliberately omit sophisticated functionality in return for easiest programming of simple cases. We probably won’t, for example, surface threads into the VB* language. If it turns out that our VB* apps need background operations, some hot-shot programmer will write a background operation control that handles all those grotty details, as happened in VB6.
Therefore, VB* will need a design that supports two tiers of developers—the uber-geeks who write the controls, and the application programmers who consume them. We’ve done that twice before, with VBX controls and then OCX controls, so we can doubtless do it again.
How could we develop and finance and release and support VB*? Open source? Maybe some tool vendor wants to take it on? How about a consortium? I’d love to help, for a fee of course. (Student: “Plattski, is it true you’re a cynical, mercenary bastard who’s only in this for the money?” Me: “How much will you pay me if I tell you?”) I’ve even snagged the Web address vbstar.org to get things started.
I can hear the VB haters tuning up their chorus now: “It’s not a real language! They’re not real programmers! You should be shot for even suggesting it. VB* will never be able to do [this], or [that], or [the other].”
Maybe it won’t. But as I wrote previously, “… the rapid (and therefore cheaper) development of limited (and therefore cheaper) applications by lower-skilled (and therefore cheaper) personnel is an important solution to a very large class of problems.” If it’s done right, VB* will become that solution.
Long live VB*!
David S. Platt teaches programming .NET at Harvard University Extension School and at companies all over the world. He’s the author of 11 programming books, including “Why Software Sucks” (Addison-Wesley Professional, 2006) and “Introducing Microsoft .NET” (Microsoft Press, 2002). Microsoft named him a Software Legend in 2002. He wonders whether he should tape down two of his daughter’s fingers so she learns how to count in octal. You can contact him at rollthunder.com.