Proprietary Evolution of Programming Languages Basic cycle of

Proprietary Evolution of Programming Languages • Basic cycle of improvement – Experience software difficulties – Theory - develop new concepts – Evaluation - build new languages • History – Machine language – Assembly language – FORTRAN, COBOL – Pascal, C, Smalltalk – Ada, C++, Java University of Houston-Clear Lake

Proprietary Java • • • Simple Object-oriented Distributed Interpreted Robust Secure Architecture neutral Portable High performance Multi-threaded Dynamic language University of Houston-Clear Lake

Proprietary Object-Oriented Languages • Abstraction • Encapsulation • Inheritance • Polymorphism University of Houston-Clear Lake

Proprietary Object-oriented Abstraction Real World Object Abstraction of the Object Color Price Options Position Velocity Forces Width Height Weight University of Houston-Clear Lake

Proprietary Object-oriented Encapsulation Data and Operations Access to object’s data is controlled University of Houston-Clear Lake

Proprietary Object-oriented Inheritance University of Houston-Clear Lake

Proprietary Object-oriented Polymorphism • Object-specific operations • Overloading of method names “abc” “de” “abcde” String 3 4 7 float String University of Houston-Clear Lake

Proprietary Distributed • High-level support for networking • URL and other classes from java. net package • Easy to read a remote file or other resource • Can invoke remote methods • Can download and run code from across the Internet University of Houston-Clear Lake

Proprietary Interpreted • Java compiler generates byte-code for the JVM – the Java Virtual Machine Java byte code Java Virtual Machine Computer XYZ University of Houston-Clear Lake

Proprietary Portable Architecture-Neutral and Portable • The Java byte-code is architecture neutral because it can be executed on any machine that supports the Java Virtual Machine • No implementation-dependent aspects to the language – size of each of the primitive data types is specified • Few platform dependencies • Write - Once - Run - Many University of Houston-Clear Lake

Proprietary Simple • Number of language constructs has been kept small • Language is similar to C and C++ • No header files • No preprocessor • No struct statement • No goto statement • No pointers • Automatic garbage collection University of Houston-Clear Lake

Proprietary Robust • Strongly-typed • Better compile-time error checking • No pointer-related bugs • No memory leaks • Support for exception handling • Explicit method declarations are required • Casts of objects are checked at compile time University of Houston-Clear Lake

Proprietary Secure • Several layers of security protection to protect against malicious code • Pointers cannot be forged • Memory cannot be accessed beyond the limits of an array or string’s dimensions • Byte-code verification prevents stack overflows and illegal byte-codes • Sandbox model - applets cannot access local file system • Support for digital signatures for untrusted code University of Houston-Clear Lake

Proprietary High-Performance • Although about 10 times slower than C coded applications, Java 1. 1 is about twice as Java 1. 0 • Common operations like string concatenation are in native code • Many interpreter systems include just-in-time compilers to allow code to run faster on a particular CPU • Faster than many other interpreted languages and than most scripting languages like Tcl or Perl University of Houston-Clear Lake

Proprietary Multi-Threaded • Multiple threads of execution are possible • Could have audio file playing, image file downloading, and graphical animation going on simultaneously • Java syntax support threads directly with synchronized keyword • Can easily start threads, stop threads, and assign priorities University of Houston-Clear Lake
- Slides: 15