The Evolution of Object-Oriented Languages, Page 2
Visual Basic .NET
Visual Basic 6 is one of the most popular programming languages. The programming environment for VB6 has had a huge impact on state-of-the-art development environments. VB6 has evolved steadily towards the object-oriented model until it finally joined the list of object-oriented languages with the release of Visual Basic .NET. VB6 was not totally object-oriented; it did not implement inheritance completely. Remember that to be totally object-oriented, a language must implement encapsulation, polymorphism, and inheritance. Inheritance comes in two flavors, interface and implementation inheritance. VB6 implements interface inheritance but not implementation inheritance. I will discuss the various flavors of inheritance in future columns.
Supporting Object-Oriented Features
Many other languages that were originally non-O-O now support some degree of O-O features. This movement started soon after the emergence of E-Commerce. One movement of mainstream information technology toward object-technology (OT) was introduced by SAP around 2000, at that time the worldwide leader of client/server-based commercial application software. With Release 4.0 of SAP R/3, SAP introduced ABAP objects, thus bringing SAP's Fortune 500 client list into the O-O mainstream of commercial business applications.
Why Do New Languages Keep Coming Along?
It is interesting that O-O technologies keep getting so much industry attention. If you compared the number of programmers using object-oriented technologies before 2000 to those who were not, you would have wondered how O-O languages became popular at all. To answer this question, let me explain the motivations for the development of Java—the language that really started this O-O language revolution. When the beta versions of Java initially hit the streets, Y2K was still five years away. Thus, the emergence of Java paralleled the Y2K mania that in a large way fueled the tech boom. Why then did an object-oriented language like Java make such a big splash? More to the point—what features did Java provide that led the the industry to embrace is so well?
With this in mind, let me talk about some of the hype surrounding Java. How much is Java really being used in critical applications? I would venture to guess that the most-used language today would be COBOL. If you counted up all the lines of code in each programming language, COBOL would, most likely, reign supreme. People have been writing COBOL systems for at least 25 years, so it has a long history. Add, in all the other languages that are not O-O, such as C, Basic, Fortran, RPG, and so on, and you can see that by comparison, the O-O portion of the world is very small indeed.
Even if you consider the PC (most of the legacy code mentioned in the previous paragraph is on non-PC platforms such as mainframes), the languages of choice are C, C++, Visual Basic, and so on. Throw in fourth-generation tools, and O-O languages are still in the minority (a small minority). Although you can write O-O code in C++, it is considered a hybrid language. In reality, only Smalltalk and Java are widely used pure O-O languages (ADA is used by the government, so perhaps it can be considered part of the widely used category).
|Smalltalk and Java|
|Some people would not place Smalltalk into the widely used category. Also, remember that even though many people speak of Java as being an O-O language, the primitive data types (integers, floats, and so on) are not implemented as objects.|
Prior to the release of Java, Smalltalk was making some headway in the market. Smalltalk proponents played the pure O-O language card against the C++ camp. It was true that C++, being a hybrid, tended to be somewhat unwieldy. Because of its dependence on C and the fact that it had been extended multiple times, C++ was in many ways difficult to understand and use. Thus, Smalltalk experienced a bit of a revival. In fact, Smalltalk is a very powerful development environment and has a very loyal following. Smalltalk is still a force to be reckoned with and in many ways has always fought the battle of the best technology available not winning out in the marketplace.
However, the selling point that Smalltalk was the only true, pure O-O language diminished when Java emerged. In many ways, Java was the best of both worlds. It was considered a pure O-O language, and its syntax was based on C/C++.
What Makes a State-of-the-Art Language?
So, what makes up a current, state-of-the-art programming language? Java is the latest in the evolutionary cycle, but what does Java claim to provide? The initial Java white paper from Sun (circa 1995) stated that Java was simple, object-oriented, distributed, robust, secure, architecture neutral, portable, interpreted, high performance, multithreaded, and dynamic. That's saying a lot. Let me show you how Java attempted to back up these claims.
As already stated, Java eliminated some of the perceived complexity of C++, such as multiple inheritance, automatic type conversions, the use of pointers, and the C++ memory management scheme.
Whereas Smalltalk is a pure O-O, C++ is a hybrid language that supports O-O features. Interestingly, the O-O features of Java are essentially those of C++, but Java enforces the O-O paradigm.
The Internet and networking in general are pervasive in today's market, and Java supports TCP/IP protocols such as HTTP and FTP. Java also has native support for accessing URLs.
Java has a very strong emphasis on preventing problems in the first place and detecting them early if they do crop up. The major difference between Java and C++ in this area is that Java does not support pointers, which prevents much of the data corruption encountered when using C++. Basically, pointers give programmers just enough rope to hang themselves.
Because Java was developed as a language for networked and distributed environments, security was a primary concern from the start. For example, when using Java with a non-trusted applet, the applet cannot update system resources outside its process space. Applets have been expanded to a more general term called Java objects.
|When the browser can authenticate an applet, normally via a digital signature, the applet is considered a trusted applet and may be allowed to update certain system resources.|
Java produced bytecodes (not native machine code) that can be run on any platform that supports a Java Virtual Machine (JVM). This means that there is no system-dependent, native code. This is very important because the is no way of knowing whether a browser client accessing your site is running on a Mac, a PC, Linux box, and so on. Actually, the bytecodes are run by a software program called a Java Virtual Machine (JVM) that is integrated into the browser itself.
|The Java Virtual Machine|
|The JVM is an interpreter that inputs Java bytecodes and turns them into platform-dependent code. In this design, the bytecodes are portable and the programmer does not have to worry about writing system-dependent code. However, interpreters often suffer from performance issues, and one of the earliest criticisms of Java related to poor performance.|
There are, theoretically at least, no system-dependent aspects to Java. C and C++ have a lot of system-dependent aspects embedded in them. For example, an int in C and C++ can be 16 bits, 32 bits, or any other size, depending on the platform. An int in Java is always 32 bits.
Page 2 of 3