Updating the Comparison between Java and VB. NET In the past six years two languages have emerged on the computer scene and have quickly risen to dominating positions in software development - those languages are Sun's Java and Microsoft's Visual Basic.
But what makes Java and Visual Basic compelling? Visual programming and components are the advantages of both systems. Visual Basic was one of the first languages along with Paradox and Dbase designed to take advantage of GUI interfaces with visual programming in mind. You build the menus, forms and reports of a program by visual drag and drop operations.
Then complete the coding by filling in the skeleton programs developed during prototyping of the programs interface. The developers of Java IDE-Interactive Development Environments see Figure1 have carried this a step further with interaction wizards automatically generating the large portions of the Java code required for a system.
But some major trends in program usage may obsolete all this. One critical trend is the exploding use of the Net where the browser becomes the interface of choice. A second trend is continuing migration to packaged software starting with the Office Suites but extending into every corner of work. The question is - so what if Java and VB are emerging as the top of the programming heap.
Who needs to program when packaged programs deliver the goods with increasing ease of use and comprehensive coverage? Is programming as we have known it for the past years going to become reserved to a small group of geek-like idiot savantes? The crucial fact to know is that programming is changing quite dramatically.
There are three major trends which are changing why and how programming is done. First Two Trends in Programming First, the last remaining heights of programming complexity are being successfully scaled right now. The Internet and web development have meant that toughest programming problem - distributed processing over WAN-Wide Area Networks is finally falling out of the realm of high-risk, specialist-only development into a demanding but doable task.
Sure such challenges such as AI-artificial intelligence, multithreaded parallel programming, and adaptive programming - automated code that detects and then fixes problems and bugs will remain as major challenges. But n-tier multiple active servers and programs , heterogeneous acting simultaneously on many different hardware, operating systems and database platforms and distributed acting in concert by communicating over one or more networks is not just hard to describe but also has been, until open Internet-inspired programming tools and routines including Java became available - darn hard to do.
The second major trend is OO-Object Oriented programming. OO programming does three things for programming. It brings a new emphasis on reliable coding by deliberately hiding data and code except through controlled access points. OO also has built in strong typing and reference checking.
Second, program development is speeded up and made more reliable by OO's inheritance. Unlike subroutine re-use, inheritance goes further by specifing exactly what data and routines will be changed or added to when borrowing and re-using classes think of classes as code modules with data attached. Reuse of classes through inheritance is remarkably clever and has been used for quite some time by programmers in an ad-hoc fashion. OO just standardizes and automates the process.
The third innovation that OO languages bring to programming is polymorphism and dynamic linking. This is the ability of an OO language to allow for the same method or subroutine to carry very different parameters and the runtime system will invoke the right subroutine including a possible error recovery routine.
For example, ScreenDraw Circle, xx, yy and ScreenDraw Hexagon, xx, yy dynamically invokes automatically two different ScreenDraw routines depending on the parameter passed. This may seem trivial but a great programming house of cards may come crashing down trying to use ad-hoc methods to solve this problem. It is important to note that Java and Visual Basic have taken two profoundly different approaches to OO programming.
From the start, Java was designed as an OO language. You cannot write a Java program without using OO techniques. Visual Basic has taken the slowly but surely approach. So OO techniques and methods have been slowly incorporated into the language. Polymorphism and dynamic linking followed by encapsulation and hiding were added in VB3 through VB5. The bottom line is that Visual Basic is a hybrid OO language-for better, for worse. We invite you to decide for yourself in our upcoming tutorials on VB and Java.
Visual Programming and Components As noted previously, visual programming and the use of components is one of the pioneering strengths of Java and Visual Basic. OO methods make GUI and general program development using components even easier to do. But these techniques have been spawned by a two very real needs. N-tier distributed processing has brought two real benefits - isolated islands of information and inefficient use of data and program resources are being eliminated.
With intranets and online processing, users can reach into every nook and cranny of an organization to get at the data and information they need to solve a problem. But the cost as noted is the much greater complexity of distributed programs - even ones that use web browser front ends.
However a second pressing need is to develop software so much faster. For over 30 years two of the major complaints against IT departments has been that systems cannot be developed fast enough the year backlog of IT projects and then when delivered changes and updates to programs cannot be done on a timely basis. But with the huge repository of computer systems built up over the last 30 years and with the availability of complete backbone office systems from major ERP vendors, programming has been turned upside down.
Reuse and interfacing to new ERP backbones as well as legacy systems are the new marching orders for IT development teams at small as well as large businesses. In effect, all programming has become maintenance programming.
Very few programs are built from scratch. Programs have to interface with legacy databases or web systems. Many have to link to or just become a customized user called procedure of some ERP or other packaged program. What better way to create these component systems? Bingo - visual programming and component development with Java and Visual Basic. The Essential Advantages of Java and Visual Basic Without a doubt one of the essential advantages of both Java and Visual Basic is that programmers can develop a wide range of programs so much faster than other language.
So called 4GLs fourth generation languages like Focus, PowerBuilder and Uniface once held an advantage in ease and speed of development but at the cost of poor runtime performance.
But 3GL-3rd Generation Languages and especially Java and Visual Basic with their visual programming, components and use of clever wizards or third party design tools have matched if not surpassed 4GL for speed of development and have superior runtime performance.
EXEs, components, servlets and applets; -superior visual programming development environs with many 3rd party suppliers of tools and components. Finally, Java in particular but also Visual Basic can be used to deliver web programs. On the Web, Java and Visual Basic can be used as servlets - web applications sitting on a server and sending down dynamically created HTML and scripts to your browser.
Java with its great cross platform portability can also be used to develop applets that run directly on any PC or client browser. With new ADSL and cable modems running 20 times faster than current 56K modems, look for even more exciting and secure Java applets coming to your web browser. Perhaps even more important are OO methods and componentized code which can be stand alone or linked to existing programs and data sources in a variety of ways - servlet, downstream application, application server or web applet.
It is this versatility in deployment that makes both languages so attractive. Over the next years the proliferation in programming languages should subside. But the current balance of comprehensive APIs, rapid development for a variety of deployment modes and competitive runtime performance make Java and Visual Basic compelling choices for many business applications. So expect programming languages to gravitate towards the specialties that they serve well: Both are comparatively easy to learn and fast to develop with due to appoachibility - that means it is comparatively easy to get started and develop useful small programs in each language.
In addition both have very comprehensive APIs with the latest in web and n-tier developments. Indeed if you cant find it directly in the language, both have a wealth of 3rd party tools, utlities and components available to complete their effectiveness. Finally, both languages have the critical advanatge of many modes of deployment. This is why Java and Visual Basic should emerge as the dominant programming languages over the next years. However there are three major differences between the two languages.
First, as noted previously, Java has been built from the ground up as an object oriented language while Visual Basic is gradually acquiring complete OO capabilities. Second, Java has a number of security and reliability features sandlot security model, strong typing, simplified memory model, integrity checking, etc built right into its core design.
But perhaps the critical difference is that Java is cross platform - running on just about any combination of hardware and operating system while Visual Basic is master of Windows. However, Visual Basic no longer supports the Windows 3. If we compare Java and Visual Basic in detail, there are 4 major criteria by which we can evaluate the two languages.
The first is ease of development. It is here Visual Basic would appear to have an advantage - after all it is Basic. More telling, in order to accomodate new OO and other functionality, VB has had to expand its basic syntax by dozens of commands. Even worse the documentation for VB has deteriorated with recent releases. Quick examples of how to use VB's numerous commands and functions are declining even in the electronic documentation.
Java is only slightly better. Fortunately, Java's huge API is organized into comprehensive references. But like VB users have to look to 3rd parties for documentation with quick examples of Java code.
The fundamental problem is this - although both languages have worked hard to make themselves easy to approach and learn, the sheer size and scope of their functionality make both languages difficult to thoroughly master. Stability and Reliability Traditionally, programming languages have had very good records for stability and reliability for both the development systems and the program code they produce.
However, in the rush to get newest versions and features out the door, both Java and Visual Basic let down developers. Part of this may be inevitable - rapid changes in web and programming standards mean that some code and APIs gets obsoleted - as for example when many AWT classes were quickly superseded by the new event-listener classes and Swing GUI components and interfaces. In VB a similar pattern has seen two or three data access methods proliferate into over a dozen.
Unfortunately, performance, reliability, and functionality trade-offs among the competing access methods make choosing an approach in VB, even with the new OLE-DB standard, a daunting task. But perhaps the worst problem is the lacunae of bugs in both languages. To an extent bugs come with rapid change and huge APIs. But for the last 3 versions of VB, users have had to wait for two or even three service packs to be able to get reliable code for some new features either in the development system or in the language.
Yes, most of the old code works. Yes, most of the bugs are clustered around new features.