VB versus Java
John asks a question that gets me thinking about it.
John Pusatera wrote to me with this question, "I am not a professional programmer, but I always wondered how the professional community viewed Visual Basic compared to Java."
A “professional developer” has one rule that overrides all the others: “Do what the boss wants done.” If the boss needs Java development, that’s what you do. If the boss needs VB, do that instead. The most significant project I ever managed used a technology that I knew, in advance, was going nowhere. (At the time, it was branded PacBase. It’s been absorbed by IBM now and doesn’t really exist anymore.) We used PacBase because people who were in authority before I got the project responsibility had committed the company. I didn’t have any real choice. I hated it. I almost went insane. But we finished the project. That’s what “professionalism” is all about.
Update!! A Java "true believer" posted a comment after this blog was written. Like a sports fan who is willing to paint his body and stand almost naked in freezing weather to demonstrate devotion, the technology bigot is a "type" that has to be experienced to be believed. If you've never run into one before, don't miss the comments to this blog.
But getting back to my original blog .....
If you’re talking about just having fun, it’s VB all the way for me. I think the syntax is much easier to understand and you can “get on with the show” and think about the programming problem instead of the language. .NET has made the “power” of all the .NET languages equal now so it's mainly a choice about what you like.
The comparison of .NET to Java, however, is more one of guessing about what the future may bring. Microsoft charges a lot of money for .NET technology and Java is less expensive to acquire. Microsoft pretty much just runs on Windows and Java runs on everything. (Although the Mono project is bringing .NET to the non-Windows environments right now. That's an interesting trend that bears watching.)
So why use .NET?
I like to think in terms of analogies. It helps me to contemplate how is this decision is like something more familiar. An analogy that comes to mind is a decision about investing in real estate. It may sound like it doesn’t fit but hear me out on this.
One way to classify real estate investments is to decide whether you’re going to go for a relatively cheap piece of property and hope it turns into something grand; or buy something that is already pretty grand and expect it to get even better. Say, a house in a middle class neighborhood where there are few zoning restrictions or a house in a gated community where you pay taxes and community assessments but the streets are kept in perfect condition. In the gated community, you can be sure that nobody will ever open a liquor store next door. But if you put a plastic flamingo on your lawn, they'll probably fine you. Either one might turn into the better investment, but I’d rather live in the second place – if I can afford it. I can see good arguments for both.
To me, Java is like the cheap, but affordable property and .NET is like the … ahem … “Gated” community.
Java has been around a bit longer – long enough to be tied into the architecture that was current when it was invented. .NET is much newer and the architecture was guided by the best software geniuses that money could buy including Anders Hejlsberg, creator of Delphi at Borland.
Although Java “belongs” to Sun Microsystems, they have essentially given up control over the language to the developer community. That can be a good thing or a bad thing and will probably be both at different times. Sun doesn’t disclose how much (if any) profit they make on Java, but it’s pretty clear that they believe their future is in hardware and operating systems, not Java. Companies like IBM may invest more in Java than Sun does. Microsoft, on the other hand, is still a software company and they know their future depends on .NET. You can bet that they will do everything in their power to keep it as good as they can make it.
And (Mono nothwithstanding) .NET is tied into Windows and Java isn’t. If you believe in Windows, .NET is a better pick. If you don’t, pick Java. Since Vista seems to be stumbling a bit right now, that concerns me. But the “Vista” cycle is still young. It was easy to find experts who predicted that IBM’s OS/2 would crush Windows 3.1 when it was first introduced.
For my part, I have a comfortable view lot in the .NET Gated community and I’m enjoying life.
What's your opinion?


Comments
I say, always use the right tool for the job. This may be java, or .net, depending on the job.
i agree that Windows will remain the dominant platform for the foreseeable future, but nevertheless i do still think it is shortsighted to choose a development platform that by default excludes Mac and Linux.
I come we can work in a language which we are not interested, is this means we shouldn’t have any personal interest if we
are a professional
If you want to be tied to Microsoft’s marketing department, go with .NET. If you want engineers and developers in charge, go Java. That’s the real answer.
.NET is, has always been, and will always be nothing but a marketing strategy (just as everything else is at Microsoft). The engineers created something interesting, then gave it to marketers, which destroyed it.
Another thing to consider is that there is very little innovation going on in the .NET world. Most of the real innovations (meaning the ones which you’re actually likely to use) are happening in Java or other languages. Things like ORM that works, DI, Aspect-oriented programming, EIP, all of these were created and developed in the Java space (some, like Hibernate and Spring, are now being ported to .NET). Microsoft keeps creating new products, but few of their ideas are actually crossing over.
Most enterprise-level development is done in Java. .NET is not really used for mission-critical apps, except for old VB shops who felt they had no choice but to follow where Microsoft leads them. Web development is still dominated by Java and PHP; ASP.NET tends to be far too heavy for the Internet at large, relying on catastrophically large stateful data.
No one every got fired for buying IBM; I’d say the same thing is true of Java.
PS: Mono is not a real option. It’s currently far behind the official .NET release, and will remain in that state forever; Microsoft will make sure of that. It’s also quite buggy, and it’s reason for being disappeared when Java was opened.
Denis,
I was really hoping that a Java true believer would comment. There’s no way I could describe the intense emotion of a technology missionary like the real thing does it. Thanks very much for posting.
Just as English has become the de facto international language of business, Microsoft Windows has become the de facto international OS of computing. English didn’t become the de facto international language of business because it was voted as the ‘best’ all-purpose language. In fact, it is culturally biased, idiosyncratic, and nationalistic par excellence. Like English, VB.NET is also culturally biased (Microsoft), idiosyncratic, and nationalistic (proprietary) par excellence. Java, on the other hand, would be the equivalent of Esperanto: a modern new language which was developed to be culturally neutral, globally accepted, and well ‘behaved’. So, how many people do you know, speak Esperanto?
For better or for worse, Microsoft Windows won’t be going away anytime soon. Programming languages, like spoken ones, are not popular by merit. They are popular by power (not inherent power, but the power derived from being hosted by the most powerful countries/companies). When the countries/companies which host them (England, North America, Australia, etc./Microsoft) weaken, so will their pervasiveness. Until then, I will bank my programming needs on the language which will give me the maximum benefit from the biggest market, with the least expenditure of time and energy. Sorry, but Java doesn’t even come close. Maybe from a pure programming perspective, Java is ‘better’ than VB, but as long as Microsoft rules, VB.NET rules.
Glenn –
I LOVE a good analogy and your’s is great! An analogy is never completely true or false, but like a spotlight in a dark room, it reveals one part of something with penetrating brilliance.
Thanks for posting!
Speaking as an absolute novice.
I am learnig to program in using the express version of Visual Basic, I chose this because I had a feeling it would do what I wanted, enable my computer to “speak to” various I/O devices, and because I am acustomed to using QB45, and most of all because it was free.
I Have seen many really impressive Web pages that use Java applets and I would love to be able to produce applets like those available from “Anfy” but
MY UNDERSTANDING is that Java is for the web, or games on mobile phones, if you want to run it on a computer you have to run it in a bowser where as visual basic is for “real World” applications, perhaps more suited to “screen” input/output rather than control of external machinery but it can be used for external control.
No doubt there are those who will cringe at my ignorance about Java but I have struggled with tutorials from Sun and Borland and various other offerings that people have taken the time to write and publish on the web, The one thing they all seem to point to is that Java is for the web.
Where as after just one of Mr Mabbutts tutorials on VB express and a bit of research on the web I was able to interface to Various “Sensors” and process the information from them.
In summary, TO ME it seems that If you want Web based applications you would use Java where as if you want Computer Desktop applications you would use VB the addition of the “.net” would suggest to me that VB is now evolving to allow web based applications to be written, possibly doing away with the need for a seperate Browser, so why would I want to learn Java at all, unless of course Java evolves to do what VB did.
Reading phils comment got me curious, so I went and asked our resident web/java geek.
Lo and behold, JAVA is not used to write desktop apps. or if it is neither of us could come up with one, he stated that he has in the past done some things for the desktop, but as he put it the were HIDEOUS.
If i want to write something for the desktop my users will enjoy and keep using, i use VB. If i want cross platform (i.e. Mac or linux builds of something, I use realbasic, if I want games I use DARKBasic.)
Lets face it they are all tools, and in their respective environ’s darned good ones, but to blanketly state that only JAVA is good for the enterprise level development structure, I suppose I should then pull all my state wide app’s down because they are just not good enough for the 15-20000 employees who rely on them daily because we wrote them in VB.NET and not JAVA!!!
I really don’t know much about java but i do know that i really like vb.net. I’m just starting with programming and it suprises me that it is quite easy to learn . I hope vb.net will be a multi OS langueage so i can run my new apps on more pc’s
I do agree that, for good or bad, Windows will probably be the dominant platform for quite some time. Java definitely does not integrate as well into Windows as does .Net, but if this is the criteria to choose a development environment it’s clear that Delphi wins hands down!
I have nothing against .Net (I have to use it a fair amount of the time because of a “Microsoft only” attitude of some clients). It is a capable environment with many nice features. It’s just that the Delphi is so much better at getting the job done in either the .NET or Win32 environment.
I know an About.com site guide who would enthusiastically agree with you. Zarko really stands with his technology.
But … just out of curiosity … Isn’t it reasonable to think that the guy who created Delphi for Borland (Anders Hejlsberg) might have done an even better job when he created .NET for Microsoft after that?
Zarko rocks! Dan’s pages are also very good.
Mr. Hejlsberg and Microsoft did a good job with C#, but it seems like the VM environment makes the development seem a bit clunky and sluggish compared to Delphi Win32 (Delphi.Net shares the same characteristics, which leads me to believe the problem is in the platform rather than the language design). The stand-alone Win32 executables are also much more nimble and snappier than the .Net equivalents.
Again, I have nothing against .Net (I use it a good amount of the time), but if ease of Windows development is the criteria Delphi is tough to beat. I also have used VB since v1, and continue to do so with VB6 and .Net, although I tend to use C# more than VB when given the choice(it seems like the VB.Net syntax is often forced and takes away from the original intent of VB’s simple and forgiving syntax).
As far as “creating .Net for Microsoft” check out this…
Now, I have worked with Visual basic for a while, and I have not even completed a single month of a JAVA course.
But on the first day I relized a major fault in JAVA, All the buttons refer to one procedure.WTF!?! the programmer has to figure out which button was pressed with if/ifelse/else/then statements. To me that sounds rather ill-concived. and organizationally a mess. Why make the computer do all thoose unnessicary comparasions?
And secondly everything GUI related in JAVA is percentage based, so you really need to know what the form is going to look like before you start, or realigning things is going to get real old real quick.
The only defense JAVA has is that it does take a while to learn all the tricks to VB.NET. But I’d rather have more complicated code that works harder for me, then have simple code that doesn’t do much.
***Plus on a personal note: I have NEVER seen the use in making a language cAsE-sEnSiTiVe. Visual Studio corrects your capitilization for you.
~Vitus
Yeah, Zarko does a good job on his site. Glad you liked it. Zarko is an enthusiastic advocate for his technology choice.
It seems we can all agree on one thing … .NET is a great technology. The various implementations of .NET are more equal than they are different, however. I continue to like VB but I don’t treat it like a religion.
As for conspiracy. Possibly. I wrote in my original blog that .NET was created by, “the best software geniuses that money could buy.”
But Zarko doesn’t bring out anything that is illegal or even even actually “conspiratorial”. Whether they like Microsoft’s technology or business practices or not, just about everybody gives them a lot of credit for being deadly competitors. This is just more of the same.
And like Zarko said at the end, “What happened, happened.”
Economy size economics
Hey Dan…
I can’t see any comparison between Java and VB, as one is geared to sell to many people and the other is for devotees. They both appeal to somewhat different “markets”. As an outsider who knows very little programming (a little web programming .. actionscript, php etc) I look at this world without blinkers and believe that Microsoft do well economically because they make good sense to a lot of people who use their products (a little bridge burning helps this out by locking you in to MS once in).
If you’ve got a product that does what the MS product does and it’s free and has a next to nil learing curve … it’ll catch on, big time.
I really don’t think that programmers are a major part of IT’s or even MS’s largest income stream. There’s a lot more to getting music to the ears than just playing an instrument although without the musician there would be no industry at all.
Perhaps Google will erode MS out of the game by buying up everything else, but where business is concerned, it’s stability that defeats the unpredictable almost every time.
Terrible terrence.
Welcome to the other side, TT!
(Terrence came to this site from an online class that I instruct for Hewlett Packard.)
Interesting point of view, but a bit narrow. There are huge systems coded by giant DP departments in major corporations that are done in Visual Basic … just like other programming languages. And Visual Basic actually goes back a good bit farther than Java or even C++. So “catching on” really has nothing to do with it. We’re really a couple of hundred laps into this race already and the question is whether VB, Java, or one of the many new languages like Ruby has what it takes to become the new leader.
Your point about “stability” is really good, however. Microsoft has been rocking the boat a lot there recently. They totally destroyed any customer loyalty in their VB 6 customer base when they pulled the rug out from under them in the move to .NET. And they’re making the VBA customers very nervous right now with VSTO. But on the other hand (and this would be their argument in their defense) it’s difficult to move into the new OOP and online world without doing these things.
So it’s a fascinating question. Thanks for contributing.
java vs vb net i like java lot and its great language. Java is harder than vb net. That why i think its unfair peoples hwo train c++ or java. Becose vb programmers job is lot easier
Hi,
Is it possible to write in vb.net and compile for mac?
If not, how easy is it to change the vb.net code so as I can compile it to run an a mac?
I hope you understand the question!
Thanks Glenn
I know exactly what you mean.
The key element is the .NET Framework. Someone has to create that huge body of code in the Mac environment. To my knowledge, no one has.
So … you can write “Basic” programs for the Mac, but if you want to run the same .NET source code … ummm …. I’d say you’re in for some conversion work.
This page has an excellent directory of Basic programming environments for different architectures.
http://www.classicteck.com/codedev/macprog.html
One of the most interesting is the Mono project. This has created a version of .NET - minus the proprietary Microsoft enhancements - for Linux.
Hey folks,
I’ve been studying software engineering at university level in Perth, West Australia, for quite some time, and have had the opportunity of learning java, vb6 through to .net.
I must say that java is way more pedantic that .net. Java is very unforgiving, and even the simplest of tasks become ridiculously hard and time consuming.
There is also the issue of formatting, ie, telling where something starts and ends, java fails in this regard completely.
To tell you the truth, I’m amazed that java got of the ground in comparison, but I take an important message from previous posts … a professional just gets on with the job no matter what.
Thanks guys.
James
You have think about these things in a historical context, James. Back when Java was first introduced, it had some huge innovations for the time, such as garbage collecting. The present success of .NET owes a lot to the pioneering work done by Java, both in showing what worked and what didn’t.
I started to read this blog after being told I was crazy for signing up for a Java course and a VB course at the same time at Miami University. After reading the blog and reading ahead in the course material I can see it might be a challenge. I will make another entry after the semester and leave what a virgin programmer thinks about trying to learn both at the same time.
I just stumbled across this article and realize I am late, however… I program in both, I use Java and VB pretty much consistently. I have done this for around 22 years, and Java and VB are both applications languages for quick development and turnaround. Both good (excellent) in their niche. There’s more running on Java in windows than you would think.
1) Desktop apps in Java… OpenOffice under windows for one, I use it everyday. Runs good. looks great. I use an editor called JGrasp, I wrote a noise analysis program in Java for cross platform compatability. Completely written in Java.
2) VB is good, although I agree with the 6 to .net conversion. It is great as a teaching language, although the studio environment is a bit flaky sometimes. I am much happier with 2005/8 than I was with .net and 6, it’s actually usable if you save a lot.
3) you will find NO mission critical apps written in VB. Can’t be done. You simply cannot verify the code, it’s too ambiguous.
4) I have never heard of a mission critical app written in Java, though it probably could be done.. the core language is small enough. I have seen verified code written in a language like Ada and translated to Java, but that’s stretching the Mission critical definition to its limit. But there are people who write MC software in core ‘C’ (an absurd idea) so I guess anything is possible.
Both languages are controlled by a single core company, which I find frightening. Both languages extensively implement libraries of enormous magnitude, and come with IDEs that are useable.
Java is pedantic, and it’s trying to implement a better OO interface than c++ which, frankly, isn’t difficult but comes with all the baggage of the dialect. It’s a VM which means pointers are impossible. It’s slow. But… what I write will do exactly what I want.
On the other hand, I can turn out an app in VB in a weekend, and it will work pretty well. Normally I’ll spend about half my time figuring out some bizarre ADO syntax. And sometimes some weird Windows/VB interaction will ruin my day.
For rapid development if you want or need portability, use Java. If you only want windows use VB. If you have a beef about either use something else. In the end it all becomes machine code.