Home About us Products Services Contact us Bookmark
:: wikimiki.org ::
Java Programming Language

Java programming language

Java is an object-oriented programming language developed initially by James Gosling and colleagues at Sun Microsystems. Initially called Oak (named after the oak trees outside Gosling's office), it was intended to replace C++, although the feature set better resembles that of Objective-C. Sun Microsystems currently maintains and updates Java regularly. Specifications of the Java language, the Java Virtual Machine (JVM) and the Java API are community-maintained through the Sun-managed Java Community Process. Java was developed in 1991 by Gosling and other Sun engineers, as part of the Green Project. After first being made public in 1994, it achieved prominence following the announcement at 1995's SunWorld that Netscape would be including support for it in their Navigator browser. Java is often confused with JavaScript, with which it shares only a similar C-like syntax.

History

syntax

Early history

The Java platform and language began as an internal project at Sun Microsystems in December of 1990. Patrick Naughton, an engineer at Sun, had become increasingly frustrated with the state of Sun's C++ and C APIs (application programming interfaces) and tools. While considering moving to NeXT, Patrick was offered a chance to work on new technology and thus the Stealth Project was started. The Stealth Project was soon renamed to the Green Project with James Gosling and Mike Sheridan joining Patrick Naughton. They, together with some other engineers, began work in a small office on Sand Hill Road in Menlo Park, California to develop a new technology, aimed at programming next generation smart appliances such as microwaves, which Sun expected to be a big application of future technology. The team originally considered C++ as the language to use, but many of them as well as Sun's chief scientist, Bill Joy, found C++ and the available APIs problematic for several reasons. Their platform was an embedded platform and had limited resources. Many members found that C++ was too complicated and that developers often misused it. They found C++'s lack of garbage collection a problem, as well as its lack of portable facilities for security, distributed programming, and threading. Finally, they wanted a platform that could be easily ported to all types of devices. According to the available accounts, Bill Joy had ideas of a new language combining the best of Mesa and C. In a paper called Further, he proposed to Sun that its engineers should produce an object-oriented environment based on C++. Initially, Gosling attempted to modify and extend C++, which he referred to as C++ ++ -- , but soon abandoned that in favor of creating an entirely new language, which he called Oak after the tree that stood just outside his office. Like many stealth projects working on new technology, the team worked long hours and by the summer of 1992, they were able to demonstrate portions of the new platform including the Green OS, the Oak language, the libraries, and the hardware. Their first attempt focused on building a PDA-like device named Star7 having a highly graphical interface and a smart agent called "Duke" to assist the user. It was demonstrated on September 3, 1992. In November of that year, the Green Project was spun off to become FirstPerson, Inc, a wholly owned subsidiary of Sun Microsystems, and the team relocated to Palo Alto. The FirstPerson team was interested in building highly interactive devices, and when Time Warner issued an RFP for a set-top box, FirstPerson changed their target and responded with a proposal for a set-top box platform. However, the cable industry felt that their platform gave too much control to the user and FirstPerson lost their bid to SGI. An additional deal with The 3DO Company for a set-top box also failed to materialize. Unable to generate any interest within the TV industry for their platform, the company was rolled back into Sun.

Java meets the Internet

In June and July of 1994, after a three-day brainstorming session with John Gage, James Gosling, Bill Joy, Patrick Naughton, Wayne Rosing, and Eric Schmidt, the team re-targeted its efforts yet again, this time to use the technology for the Web. They felt that with the advent of the Mosaic browser, the Internet was on its way to evolving into the same highly interactive vision that they had had for the cable TV network. As a prototype, Patrick Naughton wrote a small web browser, WebRunner, later renamed HotJava. It was also in 1994 that Oak was renamed Java. A trademark search revealed that the name Oak had already been taken by a video adaptor card manufacturer, so the team searched for a new name. The name Java was coined at a local coffee shop frequented by some of the members. It is not clear whether the name is an acronym or not. Most likely it is not, although some accounts claim that it stands for the names of James Gosling, Arthur Van Hoff, and Andy Bechtolsheim, or Just Another Vague Acronym. Lending credence to the idea that Java owes its name to the products sold at the coffee shop is the fact that the first 4 bytes of any class file spells out the words CAFE BABE if read in hexadecimal. In October of 1994, HotJava and the Java platform was demonstrated for Sun executives. Java 1.0a was made available for download in 1994, but the first public release of Java and the HotJava web browser came on May 23, 1995, at the SunWorld conference. The announcement was made by John Gage, the Director of Science for Sun Microsystems. His announcement was accompanied by a surprise announcement by Marc Andreessen, Executive Vice President of Netscape, that Netscape would be including Java support in its browsers. In January of 1996, the JavaSoft business group was formed by Sun Microsystems to develop the technology.

Recent history

After several years of popularity, Java's place in the browser has steadily eroded. Its usage for simple interactive animations has been almost completely supplanted by Macromedia Flash, and as of 2005 it tends only to be used for more complex applications like Yahoo! Games. It has also suffered from opposition by Microsoft, which no longer plans to ship a Java platform with new versions of Internet Explorer or Windows. By contrast, on the server-side of the Web, Java is far more popular than ever, with many websites using JavaServer Pages and other Java-based technologies in their front-ends. On the desktop, stand-alone Java applications remain relatively unusual because of their large overhead. However, with the great advances in computer power in the last decade, along with improvements in VM and compiler quality, several have gained widespread use, including the NetBeans and Eclipse IDEs, Limewire and the Azureus BitTorrent client. Also, Matlab's latest versions (at least from 6.0 and onwards) heavily depend on Java for rendering their user interface and part of their calculation functionalities.

Version history

user interface by clicking a desktop icon or a link on a website.]] The Java language has undergone several changes since JDK 1.0 as well as numerous additions of packages to the standard library:
- 1.0 (1996) — Initial release.
- 1.1 (1997) — Major additions, most notably the extensive retooling of the event model, as well as the introduction of inner classes.
- 1.2 (December 4, 1998) — Codename Playground. Major changes were made to the API (reflection was introduced, the Swing graphical API was integrated into the core classes etc) and to Sun's JVM (which was equipped with a JIT compiler). These had little impact on the language itself, however: the only change to the Java language was the addition of the keyword strictfp. This and subsequent releases were rebranded "Java 2", but this had no effect on any software version numbers.
- 1.3 (May 8, 2000) — Codename Kestrel. The most notable changes were: ([http://java.sun.com/j2se/1.3/docs/relnotes/features.html Full list of changes])
  - HotSpot JVM introduced
  - RMI was changed to be based on CORBA
- 1.4 (February 13, 2002) — Codename Merlin. As of 2004, the most widely used version. Changes included: ([http://java.sun.com/j2se/1.4.2/docs/relnotes/features.html Full list of changes])
  - assert keyword.
  - regular expressions modeled after Perl regular expressions
  - exception chaining allows an exception to encapsulate original lower-level exception
  - unblocking NIO (New IO)
  - logging API
  - image IO API for reading and writing images in formats like JPEG and PNG
  - integrated XML parser and XSLT processor
  - integrated security and cryptography extensions (JCE, JSSE, JAAS)
- 5.0 (September 29, 2004) — Codename Tiger. (Originally numbered 1.5, which is still used as the internal version number.) Added a number of significant new language features. One in particular, annotations, has been argued to be modeled on Microsoft's C#, which was itself modeled on earlier versions of Java:
  - Generics — Provides compile-time type safety for collections and eliminates the need for most typecasts.
  - Autoboxing/unboxing — Automatic conversions between primitive types (such as int) and wrapper types (such as Integer).
  - Metadata — also called annotations, allows language constructs such as classes and methods to be tagged with additional data, which can then be processed by metadata-aware utilities
  - Enumerations — the enum keyword creates a typesafe, ordered list of values (such as Day.MONDAY, Day.TUESDAY, etc.). Previously this could only be achieved by non-typesafe constant integers or manually constructed classes (typesafe enum pattern).
  - Enhanced for loop — the for loop syntax is extended with special syntax for iterating over each member of an array or Collection, using a construct of the form: for (Widget w: box) This example iterates over box, assigning each of its items in turn to the variable w, which is then printed to standard output.
- 6.0 (currently in development, estimated release date 2006) — Codename [https://mustang.dev.java.net/ Mustang]. An early development version of the Java SDK version 6.0 (internal version number 1.6) was made available in November 2004. New builds including enhancements and bug fixes are released on a regular basis.
- 7.0 — Codename Dolphin. As of 2005, this is in the early planning stages.[http://weblogs.java.net/blog/editors/archives/2004/09/evolving_a_lang.html] In addition to the language changes, much more dramatic changes have been made to the Java class library over the years, which has grown from a few hundred classes in version 1.0 to over three thousand in Java 5.0. Entire new APIs, such as Swing and Java2D, have been introduced, and many of the original 1.0 classes and methods have been deprecated.

Language characteristics

There were five primary goals in the creation of the Java language:
- It should use the object-oriented programming methodology.
- It should allow the same program to be executed on multiple computer platforms.
- It should contain built-in support for using computer networks.
- It should be designed to execute code from remote sources securely.
- It should be easy to use and borrow the good parts of older Object Oriented languages like C++. Especially for the latter part, however, extensions are sometimes required, like CORBA or OSGi.

Object orientation

The first characteristic, object orientation ("OO"), refers to a method of programming and language design. Although there are many interpretations of OO, one primary distinguishing idea is to design software so that the various types of data it manipulates are combined together with their relevant operations. Thus, data and code are combined into entities called objects. An object can be thought of as a self-contained bundle of behavior (code) and state (data). The principle is to separate the things that change from the things that stay the same; often, a change to some data structure requires a corresponding change to the code that operates on that data, or vice versa. This separation into coherent objects provides a more stable foundation for a software system's design. The intent is to make large software projects easier to manage, thus improving quality and reducing the number of failed projects. Another primary goal of OO programming is to develop more generic objects so that software can become more reusable between projects. It is easy to see why a generic "customer" object, for example, should in theory have roughly the same basic set of behaviors between different software projects, especially when these projects overlap on some fundamental level as they often do in large organizations. In this sense, software objects can hopefully be seen more as pluggable components, helping the software industry "erect" projects largely from existing and well tested pieces, thus leading to a massive reduction in development times. However, the reality of software reusability has met with mixed results, mostly due to two difficulties: the design of truly generic objects remains a poorly-understood art, and a methodology for broad communication of reuse opportunities eludes the science. Some open source communities are now emerging whose primary mission is to help ease the reuse problem by providing authors with ways to disseminate information about generally reusable objects and object libraries.

Platform independence

components is independent of the platform it is running on]] The second characteristic, platform independence, means that programs written in the Java language must run similarly on diverse hardware. One should be able to write a program once and run it anywhere. This is achieved by most compilers by compiling the Java language code "halfway" to bytecode—simplified machine instructions specific to the Java platform. The code is then run on a virtual machine (VM), a program written in native code on the host hardware that interprets and executes generic Java bytecode. Further, standardized libraries are provided to allow access to features of the host machines (such as graphics, threading and networking) in unified ways. Note that, although there's an explicit compiling stage, at some point, the Java bytecode is interpreted or converted to native machine instructions by the JIT compiler. There are also implementations of Java compilers that compile to native object code, such as GCJ, removing the intermediate bytecode stage, but the output of these compilers can only be run on a single architecture. Sun's license for Java insists that all implementations be "compatible". This resulted in a legal dispute with Microsoft after Sun claimed that the Microsoft implementation did not support the RMI and JNI interfaces and had added platform-specific features of their own. Sun sued and won both damages (some $20 million) and a court order enforcing the terms of the license from Sun. In response, Microsoft no longer ships Java with Windows, and in recent versions of Windows, Internet Explorer cannot support Java applets without a third-party plugin. However, Sun and others have made available Java run-time systems at no cost for those and other versions of Windows. The first implementations of the language used an interpreted virtual machine to achieve portability. These implementations produced programs that ran more slowly than programs written in C or C++, so the language suffered a reputation for poor performance. More recent JVM implementations produce programs that run significantly faster than before, using multiple techniques. The first technique is to simply compile directly into native code like a more traditional compiler, skipping bytecodes entirely. This achieves good performance, but at the expense of portability. Another technique, known as just-in-time compilation (JIT), translates the Java bytecodes into native code at the time that the program is run. More sophisticated VMs use dynamic recompilation, in which the VM can analyze the behavior of the running program and selectively recompile and optimize critical parts of the program. These latter two techniques allow the program to take advantage of the speed of native code without losing portability. Portability is a technically difficult goal to achieve, and Java's success at that goal has been mixed. Although it is indeed possible to write programs for the Java platform that behave consistently across many host platforms, the large number of available platforms with small errors or inconsistencies led some to parody Sun's "Write once, run anywhere" slogan as "Write once, debug everywhere". Platform-independent Java is, however, very successful with server-side applications, such as web services, servlets, or Enterprise Java Beans - and meanwhile also with Embedded systems based on OSGi, using Embedded Java environments.

Automatic garbage collection

One possible argument against languages such as C++ is the burden of having to perform manual memory management. In C++, memory is allocated by the programmer to create an object, then deallocated to delete the object. If a programmer forgets or is unsure when to deallocate, this can lead to a memory leak, where a program consumes more and more memory without cleaning up after itself. Even worse, if a region of memory is deallocated twice, the program can become unstable and will likely crash. In Java, this potential problem is avoided by automatic garbage collection. Objects are created and placed at an address on the heap. The program or other objects can reference an object by holding a reference to its address on the heap. When no references to an object remain, the Java garbage collector automatically deletes the object, freeing memory and preventing a memory leak. Memory leaks, however, can still occur if a programmer's code holds a reference to an object that is no longer needed—in other words, they can still occur but at higher conceptual levels. But on the whole, Java's automatic garbage collection makes creation and deletion of objects in Java simpler and potentially safer than in C++. It should be noted, however, that programmers have access to garbage collection in C++ via smart pointers, such as the ones provided by the Boost library or as specified in the C++ committee's technical report TR1 which will be incorporated into the next C++ ISO standard. It should also be noted that garbage collection in Java is virtually invisible to the developer. That is, developers may have no notion of when garbage collection will take place as it is not necessarily a function of the code they themselves write.

Interfaces and classes

One thing that Java accommodates is creating an interface which classes can then implement. For example, an interface can be created like this: public interface Deleteable This code says that any class that implements the interface Deleteable will have a method named delete(). The exact implementation and function of the method are determined by each class. There are many uses for this concept; for example, the following could be a class: public class Fred implements Deleteable Then, in another class, the following is legal code: public void deleteAll (Deleteable [] list) because any objects in the array are guaranteed to have the delete() method. The Deleteable array may contain references to Fred objects, and the deleteAll() method needn't differentiate between the Fred objects and other Deleteable objects. The purpose is to separate the details of the implementation of the interface from the code that uses the interface. For example, the Collection interface contains methods that any collection of objects might want to implement, like retrieving or storing objects, but a specific collection could be a resizeable array, a linked list, or any of a number of different implementations. The feature is a result of compromise. The designers of Java decided not to support multiple inheritance because of the difficulty of C++'s multiple inheritance, but interfaces give some of the benefit of multiple inheritance with, arguably, less complexity, but at the price of code redundancy (since interfaces only defines the signature of a class but cannot contain any implementation, every class inheriting an interface must provide the implementation of the defined methods, unlike in multiple inheritence, where the implementation is also inherited). Java interfaces behave much like the concept of the Objective-C protocol.

Input/Output

Versions of Java prior to 1.4 only supported stream-based blocking I/O. This required a thread per stream being handled, as no other processing could take place while the active thread blocked waiting for input or output. This was a major scalability and performance issue for anyone needing to implement any Java network service. Since the introduction of NIO (New IO) in Java 1.4, this scalability problem has been rectified by the introduction of a non-blocking I/O framework (though there are a number of open issues in the NIO API as implemented by Sun). The non-blocking IO framework, though considerably more complex than the original blocking IO framework, allows any number of "channels" to be handled by a single thread. The framework is based on the Reactor Pattern.

APIs

Sun has defined three platforms targeting different application environments and segmented many of its APIs so that they belong to one of the platforms. The platforms are:
- Java 2 Platform, Micro Edition — targeting environments with limited resources,
- Java 2 Platform, Standard Edition — targeting workstation environments, and
- Java 2 Platform, Enterprise Edition — targeting large distributed enterprise or Internet environments. The classes in the Java APIs are organized into separate groups called packages. Each package contains a set of related interfaces, classes and exceptions. Refer to the separate platforms for a description of the packages available. The set of APIs is controlled by Sun Microsystems in cooperation with others through its Java Community Process program. Companies or individuals participating in this process can influence the design and development of the APIs. This process has been a subject of controversy. In 2004, IBM and BEA publicly supported the notion of creating an official open source implementation of Java but as of 2005, Sun Microsystems has refused that.

Hello World example

For an explanation of the tradition of programming "Hello World", see Hello world program. // The source file must be named WorldGreeting.java public class WorldGreeting The above example merits a bit of explanation for those accustomed to languages with inherently relaxed security, weak typing, and weak object orientation.
- Everything in Java is written inside a class, including stand-alone programs.
- Source files are by convention named the same as the class they contain, appending the mandatory suffix .java. Classes which are declared public are required to follow this convention. (In this case, the class is WorldGreeting, therefore the source must be stored in a file called WorldGreeting.java).
- The compiler will generate a class file for each class defined in the source file. The name of the class file is the name of the class, with .class appended. For class file generation, anonymous classes are are treated as if their name was the concatenation of the name of their enclosing class, a $, and an integer.
- Programs to be executed as stand-alone must have a main() method.
- The keyword void indicates that the main() method does not return anything.
- The main method must accept an array of strings. By convention, it is referenced as "args" although any other legal variable name can be used.
- The keyword static indicates that the method is a class method, associated with the class rather than object instances. Main methods must be static.
- The keyword public denotes that a method can be called from code in other classes, or that a class may be used by classes outside the class hierarchy.
- The printing facility is part of the java standard library: The System class defines a public field called "out". The "out" object provides the method println() for displaying data to the screen (standard out).
- Standalone programs are run by giving the Java runtime the name of the class whose main() method is to be invoked. For example, at a Unix command line java -cp . WorldGreeting will start the above program (compiled into WorldGreeting.class) from the current directory. The name of the class whose main method is to be invoked can also be specified in the MANIFEST of a Java archive (jar) file.

International and worldwide use

The language distinguishes between bytes and characters. Characters are stored internally using UCS-2, although as of Java 5, the language also supports using UTF-16 via surrogates. Java program source may therefore contain any Unicode character. The following is thus perfectly valid java code; it contains Chinese characters in the class and variable names as well as in a string literal: public class 你好世界

Miscellaneous

Although the language has special syntax for them, arrays and strings are not primitive types: they are reference types that can be assigned to java.lang.Object.

Criticism

Java was intended to serve as a novel way to manage software complexity. Most consider Java technology to deliver reasonably well on this promise. However, Java is not without flaws, and it does not universally accommodate all programming styles, environments, or requirements.
- Not all projects or environments require enterprise-level complexity, such as stand-alone websites or sole-proprietorship programmers. Such individuals find Java's self-enforcing complexity management to be overkill.
- Java is often a focal point of discontent for those who are not enthusiastic about object-oriented programming.
- Java can be considered a less pure object-oriented programming language than for instance Ruby or Smalltalk because it makes certain compromises (such as the fact that not all values are objects) for performance reasons.
- As an established technology, Java inevitably invites comparison with contemporary languages such as C++, C#, Python, and others. Commenting upon Java's proprietary nature, supposed inflexibility to change, and growing entrenchment in the corporate sector, some have said that Java is "the new COBOL". Many consider this to be a somewhat hyperbolic assertion, although it does allude to some legitimate concerns with Java's prospects for the future.

Language issues


- The division between primitive types and objects is disliked by programmers familiar with languages such as Smalltalk and Ruby where everything is an object.
- Conversely, C++ programmers can become confused with Java because in Java primitives are always automatic variables and objects always reside on the heap, whereas C++ programmers are explicitly given the choice in both cases by means of pointers.
- Java code is often more verbose than code written in other languages due to its frequent type declarations.
- Java is predominantly a single-paradigm language. Historically, it has not been very accommodating of paradigms other than object-oriented programming. As of version 5.0, the procedural paradigm is somewhat better supported in Java with the addition of the ability to import static methods and fields so that they can be used globally as one could do in, for example, C.
- Java is a single inheritance language. This causes consternation to programmers accustomed to multiple inheritance, which is available in many other languages. However, Java employs interface classes, which are argued to address certain issues with multiple inheritance while retaining some of its benefits.
- Java does not support user-definable operator overloading, unlike C++.
- Versions of Java before 5.0 required many explicit casts to be written due to the lack of generic types.
- Java's support of text matching and manipulation is not as strong as languages such as perl or PHP, although regular expressions were introduced in J2SE 1.4.

Library issues

The look and feel of GUI applications written in Java using the Swing platform is often different from native applications. While programmers can choose to use the AWT toolkit that displays native widgets (and thus look like the operating platform), the AWT toolkit is unable to meet advanced GUI programming needs by wrapping around advanced widgets and not sacrificing portability across the various supported platforms, each of which have vastly different APIs especially for higher-level widgets. The Swing toolkit, written completely in Java, avoids this problem by reimplementing widgets using only the most basic drawing mechanisms that are guaranteed available on all platforms. The drawback is that extra effort is required to resemble the operating platform. While this is possible (using the GTK+ and Windows Look-and-Feel), most users do not know how to change the default Metal Look-And-Feel to one that resembles their native platform, and as a result they are stuck with Java applications that look radically different from their native applications. Of note however, Apple Computer's own optimized version of the Java Runtime, which is included within the Mac OS X distribution, by default implements its "Aqua" Look-And-Feel, giving Swing applications instant familiarity to Mac users. Some parts of the standard Java libraries are considered excessively complicated, or badly designed, but cannot be changed due to the need for backward compatibility.

Performance issues

Java has obtained a reputation for slow performance, primarily because most users have targeted the Java virtual machine rather than compiling the language directly to native machine code. Using a JVM imposes a fairly large speed penalty, either spread throughout the whole program (if using an interpreter JVM) or imposed once at class loading time (if using a JIT-compiling JVM). In the latter case, the penalty is particularly noticable in programs which run for only a short time. Whether or not modern implementations of Java are significantly slower than other languages is still hotly debated. Many argue that this is a misconception based on old benchmarks and information produced by competitors. Nevertheless, use of Java for major desktop applications still remains rare, and for highly CPU-intensive applications the language is not used at all. A number of language features unavoidably harm performance and memory usage, even if native compilation is used:
- Garbage collection
- Array bounds checking
- Run-time type checking Java was designed with an emphasis on security and portability, so low-level features like hardware-specific data types and pointers to arbitrary memory were deliberately omitted. In low-level applications which require these features, they must be accessed by calling C code using the Java Native Interface (JNI), which can itself be a performance bottleneck.

Java Runtime Environment

The Java Runtime Environment or JRE is the software required to run any application deployed on the Java platform. End-users commonly use a JRE in software packages and plugins. Sun also distributes a superset of the JRE called the Java 2 SDK (more commonly known as the JDK), which includes development tools such as the Java compiler, Javadoc, and debugger. ;Components of the JRE
- Java libraries - which are the compiled byte codes of source developed by the JRE implementor to support application development in Java. Examples of these libraries are:
  - The core libraries, which include:
    - Collection libraries which implement data structures such as lists, dictionaries, trees and sets
    - XML Parsing libraries
    - Security
    - Internationalization and Localization libraries
  - The integration libraries, which allow the application writer to communicate with external systems. These libraries include:
    - The Java Database Connectivity (JDBC) API for database access
    - Java Naming and Directory Interface (JNDI) for lookup and discovery
    - RMI and CORBA for distributed application development
  - User Interface libraries, which include:
    - The (heavyweight, or native) Abstract Windowing Toolkit (AWT), which provides GUI components, the means for laying out those components and the means for handling events from those components
    - The (lightweight) Swing libraries, which are built on AWT but provide (non-native) implementations of the AWT widgetry
    - APIs for audio capture, processing, and playback
- A platform dependent implementation of Java virtual machine (JVM) which is the means by which the byte codes of the Java libraries and third party applications are executed
- Plugins, which enable applets to be run in web browsers
- Java Web Start, which allows Java applications to be efficiently distributed to end users across the Internet
- Licensing and documentation

Extensions and related architectures

Extensions and architectures closely tied to the Java programming language include:
- J2EE (Enterprise edition)
- J2ME (Micro-Edition for PDAs and cellular phones)
- JMF (Java Media Framework)
- JNDI (Java Naming and Directory Interface)
- JSML (Java Speech API Markup Language)
- JDBC (Java Database Connectivity)
- JDO (Java Data Objects)
- JAI (Java Advanced Imaging)
- JAIN (Java API for Integrated Networks)
- JDMK (Java Dynamic Management Kit)
- Jini (a network architecture for the construction of distributed systems)
- Jiro
- Java Card
- JavaSpaces
- Java Modeling Language (JML)
- JMI (Java Metadata Interface)
- JMX (Java Management Extensions)
- JSP (JavaServer Pages)
- JSF (JavaServer Faces)
- JNI (Java Native Interface)
- JXTA (Open Protocols for P2P Virtual Network)
- J3D (A high level API for 3D graphics programming)
- JOGL (A low level API for 3D graphics programming, using OpenGL)
- OSGi (Dynamic Service Management and Remote Maintenance)
- SuperWaba (JavaVMs for handhelds)

See also


- Java virtual machine
- Java applet
- Comparison of Java to C++
- Optimization of Java
- Java Platform Debugger Architecture
- Join Java programming language
- List of Java-programs
- Java User Group
- Java XML
- Java Servlet
- Java 2 Platform, Standard Edition (J2SE)
- List of Java scripting languages
- Javapedia
- Java Community Process
- JavaOS
- Java keywords
- zAAP (Java processor)
- Microsoft J++

References


- Jon Byous, [http://java.sun.com/features/1998/05/birthday.html Java technology: The early years]. Sun Developer Network, no date [ca. 1998]. Retrieved April 22, 2005.
- James Gosling, [http://today.java.net/jag/old/green/ A brief history of the Green project]. Java.net, no date [ca. Q1/1998]. Retrieved April 22, 2005.
- James Gosling, Bill Joy, Guy Steele, and Gilad Bracha, The Java language specification, second edition. Addison-Wesley, 2000. ISBN 0201310082.
- James Gosling, Bill Joy, Guy Steele, and Gilad Bracha, The Java language specification, third edition. Addison-Wesley, 2005. ISBN 0321246780.
- Tim Lindholm and Frank Yellin. The Java Virtual Machine specification, second edition. Addison-Wesley, 1999. ISBN 0201432943.

Notes

# The device was named Star7 after a telephone feature activated by
- 7 on a telephone keypad, which enabled users to answer the telephone anywhere.

External links

Sun


- [http://java.sun.com/ Official Java home site]
- [http://java.sun.com/docs/books/jls/ The Java Language Specification, Third edition] Authoritative description of the Java language
- [http://java.sun.com/j2se/1.5.0/docs/api/ J2SE API reference, v5.0]
- [http://java.sun.com/docs/books/tutorial/ Sun's tutorial on Java Programming]
- [http://java.sun.com/docs/white/langenv/ Original Java whitepaper], 1996
- [http://www.java.com/en/download/help/testvm.xml Test your Java VM]

Alternatives


- [http://www.blackdown.org Blackdown Java] for Linux, includes Mozilla plugin

Books


- [http://www.computer-books.us/java.php Computer-Books.us] A collection of Java books available for free download
- David Flanagan, [Java in a Nutshell, Third Edition]. O'Reilly & Associates, 1999. ISBN 1565924878
- [http://www.bruceeckel.com/ Thinking in Java], by Bruce Eckel
- [http://www.vias.org/javacourse/ Java Course] The well-known book of A.B. Downey as an HTMLHelp based eBook

General


- Newsgroup [news:comp.lang.java comp.lang.java] ([http://groups.google.com/groups?group=comp.lang.java Google Groups link]), and its [http://www.ibiblio.org/javafaq/javafaq.html FAQ]
- [http://wiki.java.net/bin/view/Javapedia/ Javapedia project]
- [http://wiki.java.net/bin/view/Main/WebHome The Java Wiki]
- [http://mindprod.com/jgloss/jgloss.html A Java glossary]
- [http://www.cookienest.com/content/manual-javabasics.php Java Basics Manual]
- [http://en.pure-java.de/ Java-API with examples]
- [http://www.whizlabs.com/jwhiz.html Java Exam Preparation]
- [http://ei.cs.vt.edu/~history/Youmans.Java.html Java: Cornerstone of the Global Network Enterprise]
- [http://www.inesystems.com Sun Certification Resource ]

Historical


- [http://java.sun.com/features/1998/05/birthday.html Java(TM) Technology: The Early Years]
- [http://java.sun.com/people/jag/green/ A Brief History of the Green Project]
- [http://www.cs.umd.edu/users/seanl/stuff/java-objc.html Java Was Strongly Influenced by Objective-C]
- [http://www.wired.com/wired/archive/3.12/java.saga.html The Java Saga]
- [http://ei.cs.vt.edu/~wwwbtb/book/chap1/java_hist.html A history of Java]

Criticism


- Paul Graham, [http://www.paulgraham.com/javacover.html Java's Cover]. Paulgraham.com, April 2001.
- Simson Garfinkel, [http://www.salon.com/tech/col/garf/2001/01/08/bad_java/ Java: Slow, ugly and irrelevant]. Salon.com, January 8, 2001.
- [http://www.gnu.org/philosophy/java-trap.html Free But Shackled — The Java Trap], by Richard Stallman, April 12, 2004. ([http://today.java.net/jag/page7.html#59 James Gosling's response])
- [http://www.idinews.com/darkside.pdf The Dark Side of Java] (PDF), by Conrad Weisert, August 29, 1997. ([http://www.google.com/search?q=cache:www.idinews.com/darkside.pdf View as HTML])
- [http://www.jwz.org/doc/java.html java sucks], by Jamie Zawinski, 2000.
- [http://www.pobox.com/~schwern/papers/Why_I_Am_Not_A_Java_Programmer/why.html Why I Am Not A Java Programmer], by [http://mungus.schwern.org/~schwern/resume/resume.pdf Michael G. Schwern].

Portals, magazines, etc.


- [http://www.3java.net/ 3java.net] A comprehensive directory of Java open source software
- [http://javaopen.net/ Open Source Java] Open source Java/J2EE roundup
- [http://www.esus.com Esus.com] A site containing thousands of categorized links and Q&A's
- [http://www.jexamples.com JExamples.com] A site to find examples of Java API's
- [http://www.java-tips.org Java Tips] A site containing hundreds of categorized tips about Java API's
- [http://www.theserverside.com/ TheServerSide.com] A popular Java J2EE portal
- [http://www.javalobby.org/ Javalobby] A popular forum for Java discussions
- [http://www.java.net/ Java.Net] A site for Java articles and upcoming projects
- [http://www.onjava.com/ OnJava.com] An O'Reilly site for Java with many good articles
- [http://www.indicthreads.com/ IndicThreads.com] An upcoming portal for Java and J2EE
- [http://www.javapro.com/ JavaPro magazine] A popular Java magazine
- [http://www.java.sys-con.com/ Java Developer's Journal] Online edition of a popular Java magazine
- [http://www.javaworld.com/ JavaWorld magazine] A popular Java magazine
- [http://www.JavaKB.com/ Java KB] Offers Java discussions, news, articles, and an open source project directory.
- [http://www.javasight.com/ JavaSight.com] Java news and books.
- [http://www.javarss.com/ JavaRSS.com] A Java portal of Java websites rich in Java & J2EE News, Articles, Blogs, Groups and Forums.
- [http://www.javagamedevelopment.net/ Java Game Development] Daily news and articles on Java game development
- [http://JavaToolbox.com JavaToolbox] List of the available development tools and libraries for Java/J2EE
- [http://www.javaranch.com JavaRanch] A friendly place for Java greenhorns
- [http://www.javafree.org JavaFree] A popular Java community
- [http://www.javabeat.net JavaBeat] Java Certifications Site
- [http://www.techbookreport.com/JavaIndex.html TechBookReport] Java book and software reviews Category:Programming languages Category:C programming language family Category:Java platform Category:Java programming language Category:Sun Microsystems ko:자바 프로그래밍 언어 ja:Java言語 th:ภาษาจาวา

Object-oriented

In computer science, object-oriented programming, OOP for short, is a computer programming paradigm. The idea behind object-oriented programming is that a computer program is composed of a collection of individual units, or objects, as opposed to a traditional view in which a program is a list of instructions to the computer. Each object is capable of receiving messages, processing data, and sending messages to other objects. Object-oriented programming is claimed to give more flexibility, easing changes to programs, and is widely popular in large scale software engineering. Furthermore, proponents of OOP claim that OOP is easier to learn for those new to computer programming than previous approaches, and that the OOP approach is often simpler to develop and to maintain, lending itself to more direct analysis, coding, and understanding of complex situations and procedures than other programming methods.

Fundamental concepts

Object-oriented programming (OOP) emphasizes the following concepts:
- Class — the unit of definition of data and behavior (functionality) for some kind-of-thing, a class (for example, Dog) is the basis of modularity and structure in an object-oriented computer program. A class should typically be recognizable to a non-programmer familiar with the problem domain, and the code for a class should be coherent and decoupled (as should the code for any good pre-OOP function). With such modularity, the structure of a program will correspond to the aspects of the problem that the program is intended to solve.
- Object — an instance of a class, an object (for example, "Rin Tin Tin" the Dog) is the run-time manifestation of a particular exemplar of a class. Each object has its own data, though the code within a class is shared for economy.
- Encapsulation — a type of privacy applied to the data and some of the methods (that is, functions or subroutines) in a class, encapsulation ensures that an object can be changed only through established channels (namely, the class's public methods). Each object exposes an interface — those public methods, which specify how other objects may read or modify it. An interface can prevent, for example, any caller from adding a list of children to a Dog when the Dog is less than one year old.
- Inheritance — a mechanism for creating subclasses, inheritance provides a way to define a (sub)class as a specialization or subtype or extension of a more general class (as Dog is a subclass of Canidae); a subclass acquires all the data and methods of all of its superclasses, but it can add or change data or methods as the programmer chooses. Inheritance is the "is-a" relationship: a Dog is-a Canidae. This is in contrast to composition, the "has-a" relationship, which user-defined datatypes brought to computer science: a Dog has-a mother (another Dog) and has-a father, etc.
- Abstraction — the ability of a program to ignore the details of an object's (sub)class and work at a more generic level when appropriate; For example, "Rin Tin Tin" the Dog may be treated as a Dog much of the time, but when appropriate he is abstracted to the level of Canidae (superclass of Dog) or Carnivora (superclass of Canidae), and so on.
- Polymorphism — polymorphism is behavior that varies depending on the class in which the behavior is invoked. For example, the result of bark() for a Dog would differ from the result of bark() for a Jackal; and in a more sophisticated animal-emulation program, bark() would differ for a Chihuahua and a Saint Bernard. Polymorphism shows the advantage of object orientation most clearly: given a list of animals in a Zoo, raiseRuckus() can loop through the list and ask each animal to bark() — and each animal will bark() appropriately, without raiseRuckus() needing to examine the subclass of each animal. An object-based language is a language that has most of the properties of an object-oriented language, but lacks inheritance.

OOP as a new paradigm, point of view or marketing term

OOP is subject to much contention as to its precise definition or its principal ideas. In the most general terms, OOP is the practice of writing program text decomposed in modules that encapsulate the representation of one data type per module, instead of collections of functions that call each other, or clauses that trigger each other. They have been brought together, with associated terminology, to create a programming framework. Together the ideas behind OO are said to be so powerful they create a paradigm shift in programming. Other paradigms such as functional and procedural programming focus primarily on the actions, and logical programming focuses on the logical assertions that trigger execution of program code. OOP arose independently out of research into simulation system oriented languages, with SIMULA 67, and out of research into highly secure system architectures, with capability based OS and CPU architectures. Some experts say that the original definition of Object-oriented came from the object in grammar. The requirements for the software is always subject-oriented and since the requirements for the subject is often complicated, monolithic complicated programs were created. Some of the researchers at that time started thinking in an object-oriented way, which was a paradigm shift from the usual subject-oriented thinking. According to the object-oriented principles, the verb is attached to the object and logic associated to the requirement is handled in the object. The following are some examples of the ways by which a subject oriented requirement is translated into object oriented thinking:
- Subject oriented: The Sales Application saves the Transaction
- Object oriented: The Transaction saves itself upon receiving a message from the Sales Application
- Subject oriented: The Sales Application prints the Receipt
- Object oriented: The Receipt prints itself upon receiving a message from the Sales Application One distinguishing feature of OOP is the handling of subtypes of data types. Objects' data are generally required to satisfy programmer-defined constraints (i.e. class invariants). A datatype restricted with such constraint is a subtype of the same datatype without the constraint. These constraints are then both relied on and preserved by the actions (methods) defined for the data. These constraints may either be explicitly declared or implicitly assumed by the programmer. Object-oriented languages provide mechanisms for ensuring that such assumptions are local to one part of the program. They are usually part of documentation of object-oriented programs. OOP itself has been used to market many products and services and the actual definitions and benefits attributed to OOP have often been colored by commercial marketing goals. Similarly, many programming languages have a specific view to OOP that is less general in certain aspects from the more general definition. Widely-used terminology distinguishes object-oriented programming from object-based. The former is held to include inheritance (described below), while the latter does not. The exact definitions of these have some variation depending on point of view. In particular, languages with static typing often have slightly different views of OO than languages with dynamic typing, caused by focus on compile-time vs. run-time properties of the programs. Notes: Abstraction is important to but not unique to OOP. Reusability is the benefit most often claimed for OOP. However, that is sometimes disputed as being a large or primary benefit. The ability to maintain a program once written, the ability to do localized debugging, and the ability to do much larger parallel development efforts are all cited as more significant reasons to use an OOP language. OOP is often called a paradigm rather than a style or type of programming to emphasize the point that OOP can change the way software is developed, by changing the way that programmers and software engineers think about software. The paradigm of OOP is essentially not that of programming but one of design. A system is designed by defining the objects that will exist in that system, the code which actually does the work is irrelevant to the object, or the people using the object, due to encapsulation. The challenge in OOP therefore is of designing a sane object system. It should be noted that there are distinct parallels between the object-oriented paradigm and Systems theory. OOP focuses on objects as units in a system, whereas systems theory focuses on the system itself. In between, one may find software design patterns or other techniques that use classes and objects as building blocks for larger components. Such components can be seen as an intermediate step from the object-oriented paradigm towards the more "real-life oriented" models of systems theory.

Actor model

OOP is a decomposition paradigm for program code, not a model for computation. OOP is often confused with the Actor model of computation. In response to a message that it receives, an Actor can make local decisions, create more Actors, send more messages, and determine how to respond to the next message received. Almost all OOP languages and systems, including all the major ones such as SIMULA, Smalltalk, C++, Java, Python and C# have message passing programming capabilities. See Actor model implementations for a discussion on implementations of the Actor model. In OOP the emphasis is not on how computation is organized, but on how program text is decomposed into modules, because it is this decomposition that matters as to the program text's comprehensibility and maintainability. OOP is based on the assumption that the program text's comprehensibility and maintainability is improved by decomposing it into modules, and that the best way to decompose it into modules is to minimize dependencies among modules and the cohesion of functions inside the module, and that this is best achieved by encapsulating the representation of a data type in each module.

Subparadigms

There are several distinct styles of object-oriented programming. The distinctions between different styles occur because different programming languages emphasize different aspects of object-oriented facilities and combine with other constructs in different ways.

OOP with procedural languages

In procedural languages, OOP often appears as a form where data types are extended to behave like a type of an object in OOP, very similar to an abstract data type with an extension such as inheritance. Each method is actually a subprogram which is syntactically bound to a class.

Static typing with the object-oriented paradigm

Many object-oriented programming languages, such as C++ and Java, have a static type system, that can be used to check and enforce constraints of object-oriented design to some extent at compile-time, i.e. statically. Object-oriented facilities combine with static typing in various ways. Classes are types of objects. Many object-oriented languages provide mechanisms for statically checking the type of method parameters, types of private and public data members, types of object references and check the correctness of inheritance and subtyping relationships. Static type checking can also check API compatibility, enforce data constraints on the users of libraries created with object-oriented methods and reduce the number of type checks performed at run-time for various forms of method dispatch. Some object-oriented languages, such as Eiffel, supplement the type system with assertions specifying and documenting invariants of classes and the contracts of methods, though current Eiffel compilers only check these at run-time, i.e. dynamically. See Class-based OOP.

Prototype-based models

Other than using classes, prototyping is another, less popular, means of achieving object-oriented behavior sharing. After an object is defined, another similar object will be defined by referring to the original one as a template, then listing the new object's differences from the original. Perhaps the most popular prototype-based language is JavaScript, which is an implementation of ECMAScript; Self, a programming language developed by Sun Microsystems is another instance of a language that uses prototyping for behavior sharing rather than classification. NewtonScript, Act1, Io and DELEGATION are other examples. Hybrid and Exemplars use both prototyping and classification. In prototyping systems, objects themselves are the templates, while classification systems use classes as templates for objects. The classification approach is so predominant in OOP that many people would define objects as encapsulations that share data by classification and inheritance. However, the more generic term "behavior sharing" acknowledges alternate techniques such as prototyping. See Prototype-based programming.

Object-based model

Object-based programming is centered around the creation of objects and their interactions, but may not have some of the key features of the class-based object-oriented paradigm such as inheritance. Such object-based systems are usually not regarded as object-oriented, because inheritance (viewing delegation as a form of inheritance) is typically identified as the core feature of OOP.

Multimethod model

In this model, the "receiver" argument to a message is not given special status in message dispatch. Instead, the runtime values of all arguments to message are consulted to determine which method should be executed at runtime. This is related to double or multimethod dispatch. Note that some feel that set theory or predicate logic is better suited to tackle this kind of complexity.

Possible programming mistakes

There are several common mistakes which programmers can commit in object oriented programming. For example, checking the type of an object instead of its membership is a common antipattern that counteracts the benefits of inheritance and polymorphism.

Critique

Hierarchical taxonomies often do not match the real world and real-world changes according to some critics, and should be avoided. However, many OOP proponents also suggest avoiding hierarchies and instead using OO techniques such as "composition". A simple way of avoiding over-specification of hierarchies when modeling the real world is to consider the most specific types of objects and model relationships between those. Also, many feel that OOP runs counter to the philosophy of relational modeling and relational databases, returning to the navigational database arrangements of the 1960s. It is not clear that this is the fault of OOP, since database modeling is based fundamentally on different premises than object-oriented modeling. In any case, relational database tables map to associations in object-oriented models, and the differences seem to be purely due to differences in focus. There is a history of misinterpretation of the relationship between object-oriented and relational modeling, which may muddy this issue. Also, there are variances in opinions about the roles and definitions of each. For example, some feel that OOP unnecessarily will copy noun relationship information from the database, when "once and only once" (no duplication) mantra dictates that such is bad practice. Others, in contrast, feel that OOP does not require this duplication, even though some existing OOP-to-relational database products mistakenly take this view, confusing object's data with relationship data. These people would also argue that strict distinctions should be made between data associated with the modelled objects, data associated with the roles and data associated with associations; in particular, object's data should not be (directly) stored in databases by this view, because databases are not a suitable storage for objects, the object already has some mechanism for storing its private information, and storage in database would require unnecessary replication between the object's image in its own storage and the database. The impedance mismatch between databases and OOP is caused by difference of scale between operations performed by objects and databases; database transactions, the smallest unit of work performed by databases, are much larger than any operations provided by OOP objects. Instead, by this view, databases are good for storing relationships between objects and the references to objects that are associated with roles that those relationships are built on; objects' data could only be stored in databases after collecting and summarising data from groups of objects. Object's private representation details have no place in databases. Needless to say, the "proper" relationship between OOP and databases is a complex and contentious topic which currently has no consensus solution. While it is claimed that OOP is better for "large applications", others feel that large applications should instead be reduced to many small applications, such as event-driven procedures that "feed" off of a database and declarative programming-based user interface frameworks. The bottom line of the conflict seems to be that OOP is mostly a behaviorist view of software design which conflicts with the data-centric, declarative view. In the first, the "interfaces" are primarily behaviors, and data is grouped into objects. In the second the interfaces are primarily data (declarations) and behaviours are grouped into functions, such as "tasks", or "events". The tradeoffs of each approach are complex and often delve deep into human psychology theories. Sometimes both are used, such that OOP is used to build platform facilities and functional or declarative method is used to build applications for the platform. Some feel that past criticisms leveled against procedural techniques are based upon poor languages, poor coding practices, or lack of knowledge about how to properly use databases instead of code to manage state and "noun models". It is recognized that OOP does not necessarily mean lack of complexity. Meta class programming for example is a demanding skill, and OOP programs can have a complex web of shared or distinct responsibilities, attributes and methods. It can be challenging to distribute responsibility over objects, or classes—one of many popular implementation schemes.

Formal definition

There have been several attempts on formalizing the concepts used in object-oriented programming. The following concepts and constructs have been used as interpretations of OOP concepts:
- coalgebraic datatypes
- existential quantification and modules
- recursion
- records and record extensions
- F-bounded polymorphism Attempts to find a consensus definition or theory behind objects have not proven very successful, and often diverge widely. For example, some definitions focus on mental activities, and some on mere program structuring. One of the simpler definitions is that OOP is the act of using "map" data structures or arrays that can contain functions and pointers to other maps, all with some syntactic and scoping sugar on top. Inheritance can be performed by cloning the maps (sometimes called "prototyping").

OOP in scripting

In recent years, object-based programming has become especially popular in scripting programming languages, with abstraction, encapsulation, reusability, and ease of use being the most commonly cited reasons, (the value of inheritance in these languages is often questioned). Smalltalk is probably the first language that fits into this category. Python and Ruby are relatively recent languages that were built from the ground up with OOP in mind, while the popular Perl and PHP scripting languages have been slowly adding new object oriented features since versions 5 and 4, respectively. The ability of objects to represent "real world" entities is one reason for the popularity of JavaScript and ECMAScript, which is argued to be well suited to representing the Document Object Model of HTML and XML documents on the Internet. See also: dynamic language

History

The concept of objects and instances in computing had its first major breakthrough with the PDP-1 system at MIT which was probably the earliest example of capability based architecture. Another early indication was Sketchpad made by Ivan Sutherland in 1963, however this was an application and not a programming paradigm. Objects as a programming entities were first introduced in Simula 67, a programming language designed for making simulations, created by Ole-Johan Dahl and Kristen Nygaard of the Norwegian Computing Centre in Oslo. (Reportedly, the story is that they were working on ship simulations, and were confounded by the combinatorial explosion of how the different attributes from different ships could affect one another. The idea occurred to group the different types of ships into different classes of objects, each class of objects being responsible for defining its own data and behavior.) The Smalltalk language, which was developed at Xerox PARC, introduced the term Object-oriented programming to represent the pervasive use of objects and messages as the basis for the computation. Smalltalk creators were influenced by the ideas introduced in Simula 67, but Smalltalk was designed to be a fully dynamic system in which objects could be created and modified "on the fly" rather than having a system based on static programs. The ideas in Simula 67 were also used in many other languages, from derivatives of Lisp to Pascal. Object-oriented programming developed as the dominant programming methodology during the mid-1980s, largely due to the influence of C++, an extension of the C programming language. Its dominance was further cemented by the rising popularity of Graphical user interfaces, for which object-oriented programming is allegedly well-suited. An example of a closely related dynamic GUI library and OOP language can be found in the Cocoa frameworks on Mac OS X, written in Objective C, an object-oriented, dynamic messaging extension to C based on Smalltalk. OOP toolkits also enhanced the popularity of "event-driven programming" (although this concept is not limited to OOP). At ETH Zürich, Niklaus Wirth and his colleagues had also been investigating such topics as data abstraction and modular programming. Modula-2 included both, and their succeeding design, Oberon included a distinctive approach to object orientation, classes, and such. The approach is unlike Smalltalk, and very unlike C++. Object-oriented features have been added to many existing languages during that time, including Ada, BASIC, Lisp, Fortran, Pascal, and others. Adding these features to languages that were not initially designed for them often led to problems with compatibility and maintainability of code. "Pure" object-oriented languages, on the other hand, lacked features that many programmers had come to depend upon. To bridge this gap, many attempts have been made to create new languages based on object-oriented methods but allowing some procedural features in "safe" ways. Bertrand Meyer's Eiffel was an early and moderately successful language with those goals. In the past decade Java has emerged in wide use partially because of its similarity to C and to C++, but perhaps more importantly because of its implementation using a virtual machine that is intended to run code unchanged on many different platforms. This last feature has made it very attractive to larger development shops with heterogeneous environments. Microsoft's .NET initiative has a similar objective and includes/supports several new languages, or variants of older ones. More recently, a number of languages have emerged that are primarily object-oriented yet compatible with procedural methodology, such as Python and Ruby. Besides Java, probably the most commercially important recent object-oriented languages are Visual Basic .NET and C# designed for Microsoft's .NET platform. Just as procedural programming led to refinements of techniques such as structured programming, modern object-oriented software design methods include refinements such as the use of design patterns, design by contract, and modeling languages (such as UML).

Learning

In the past, there have been many disputes as to the best language to begin with when first learning object oriented programming. There are two different approaches most take when beginning object oriented programming. The first is the idea that it is best to start with a simpler language such as Java, where the learner's focus on object-orientation is not distracted by complex language semantics. Still, others reason that it is best to start off with a more complicated language such as C++, which more accurately supports all the structures and capabilities as prescribed by the Unified Modeling Language (UML). Note that there is no known language which inherently supports the full set of capabilities prescribed by UML.

Further reading


-
-
-
-
-
-
-
-
-
-
-

See also


- Object-oriented programming language
- Aspect-oriented programming
- Programming paradigm
- Software componentry
- Interface description language
- Distributed programming
- List of object-oriented programming terms
- Design pattern (computer science)
- Refactoring
- CORBA
- Globus
- DCOM

External links


- [http://www.objectfaq.com/oofaq2/ Object-oriented programming FAQ]
- [http://okmij.org/ftp/Computation/Subtyping/#Problem Example of the subtyping problem]
- [http://xahlee.org/Periodic_dosage_dir/t2/oop.html What are OOP's Jargons and Complexities]
- [http://www.eventhelix.com/RealtimeMantra/Object_Oriented/ Object Oriented Design Principles]
- The report [http://www.interaction-design.org/mads/articles/object_orientation_redefined.html "Object Orientation Redefined"] outlines how OO has been considered a thinking tool, i.e. "we view the world in objects", and how such an approach may further our understanding of object-oriented formalisation.
- [http://objectdiscovery.com/papers/roles/index.html Modeling Roles : A practical series of Analysis Patterns ] How to easily identify a Role problem and precisely determine which Role analysis pattern is best to model it.

Criticism


- [http://www.geocities.com/tablizer/oopbad.htm OOP Myths/Criticism]
- [http://dreamsongs.com/ObjectsHaveFailedNarrative.html Objects Have Failed]
- [http://c2.com/cgi/wiki?ArgumentsAgainstOop Arguments Against OOP (C2 wiki discussion)]
- [http://www.devx.com/opinion/Article/26776 OOP Better in Theory than in Practice]
- [http://www.paulgraham.com/noop.html Why Paul Graham is Creating a New Language Not Especially Object-Oriented] Category:Object-oriented programming ms:Pengaturcaraan Berorientasikan Objek ja:オブジェクト指向 th:การเขียนโปรแกรมเชิงวัตถุ

James Gosling

James Gosling (born May 19, 1955 near Calgary, Alberta, Canada) is a famous software developer.

Career

Since 1984, James Gosling has been with Sun Microsystems. He is currently (as of 2005) the CTO of the developer products group.

Contributions

He is generally credited as the inventor of the Java programming language in 1994. He did the original design of Java and implemented its original compiler and virtual machine. For this achievement he was elected to the United States National Academy of Engineering. He has also made major contributions to several other software systems such as NeWS and Gosling Emacs.

Programming

He is known to do most of his engineering on his PowerBook.

External links


- [http://blogs.sun.com/roller/page/jag James Gosling's weblog]
- [http://www.javarss.com/java-blogs/ James Gosling and other Java Blogs]
- [http://www.apple.com/pro/science/gosling/ A profile of James on apple.com] Gosling, James Gosling, James Gosling, James Gosling, James Gosling, James Gosling, James Gosling, James Gosling, James th:เจมส์ กอสลิง

Sun Microsystems

:SUN redirects here, for other meanings see SUN (disambiguation). Sun Microsystems, Inc. is a vendor of computers, computer components, software, and information-technology services, founded in 1982 and headquartered in Santa Clara, California, in Silicon Valley. Sun's manufacturing facilities are located in Hillsboro, Oregon and Linlithgow, Scotland. Sun's products include computer servers and workstations based on its own SPARC and AMD's Opteron processors, the Solaris operating system, the NFS network file system, and the Java platform. From June 2005, Sun also produces laptops called Ultra 3 Mobile Workstation [http://www.technewsworld.com/story/44210.html]. The pioneering OpenLook (Sun's own graphical user interface) was very stable but would now be considered minimalistic. A wide choice of windowing systems are now offered, including Open source contributions. Sun Microsystems is headquartered on the west campus of Agnews Developmental Area in Santa Clara, California, which was formerly an asylum.

Brief history

The initial design for Sun's UNIX workstation was conceived when the founders were graduate students at Stanford University in Palo Alto, California. The company name SUN originally stood for Stanford University Network (which is reflected in the company's stock symbol, SUNW, which now stands for Sun Worldwide). The company was incorporated in 1982 and went public in 1986. Its founders were Vinod Khosla, Scott McNealy, Bill Joy (a primary developer of BSD Unix), and Andy Bechtolsheim; McNealy and Bechtolsheim remain at Sun. Other Sun luminaries include early employees John Gilmore and James Gosling. Sun was an early advocate of Unix-based networked computing, promoting TCP/IP and especially NFS, as reflected in the company's motto "The Network Is The Computer". James Gosling led the team which developed the Java programming language. Most recently, Jon Bosak led the creation of the XML specification at W3C. Sun's logo, which features four interleaved copies of the word sun, was designed by professor Vaughan Pratt, also of Stanford University. The initial version of the logo had the sides oriented horizontally and vertically, but it was subsequently redesigned so as to appear to stand on one corner.

Hardware

Sun originally used the Motorola 68000 CPU family for the Sun 1 through Sun 3 computer series. Starting with the Sun 4 line (SPARCstation 1 onwards), the company used its own processor family, SPARC, which employs an IEEE standard RISC architecture. Sun has implemented multiple high-end generations of the Sparc architecture, including Sparc-1, SuperSparc, UltraSparc-I, UltraSparc-II, UltraSparc-III, and currently UltraSparc IV. Sun has developed several generations of workstations and servers, including SPARC Station series, Sun Ultra Series and the Sun Fire series. Sun also has a second line of lower cost processors meant for low-end systems which included the MicroSparc-I, MicroSparc-II, UltraSparc-IIe, UltraSparc-IIi, and UltraSparc-IIIi. Sun has had a difficult time keeping up with its competitors' processors' clock speed and computing power, but its customer base has been fairly loyal due to the popularity, and legendary stability, of its SunOS (and later Solaris) versions of Unix. Unix] For the first decade of Sun's history, the company was predominately a vendor of technical workstations, competing successfully as a low-cost vendor during the Workstation Wars of the 1980s. For a short period in the mid-1980s, 51% of Sun stock was held by AT&T as a partner in their computer business AT&T Computer Systems. Plans for UNIX System V Release 4 were made at this time, but the AT&T partnership later fell apart when the rival group OSF (Open Software Foundation) appeared. See UNIX wars. For a short period in the late 1980s, they sold an Intel 80386–based machine, the Sun 386i. An x86 port of Solaris has been available since then. Currently, Sun is again selling x86 hardware and has introduced a version of Solaris for AMD64. In the mid-1990s, Sun acquired Diba and Cobalt Networks with the aim of building network appliances (single function computers meant for consumers). Sun also marketed a network computer (diskless workstation, as popularized by Oracle Corporation CEO Larry Ellison). None of these business initiatives were particularly successful. In the late-1990s, as Sun's workstations were lagging in performance when compared to that of their competitors and especially to Wintel Personal Computers, the company successfully transformed itself to a vendor of large-scale Symmetric multiprocessing servers. This transition was enabled by technology that was acquired from Silicon Graphics and Cray Research. The Cray CS-6400 server line was transformed into the very successful Sun Enterprise 10000 mainframes. Driven by the increased prominence of web-serving database-searching applications, blade servers (high density rack-mounted systems) were also emphasized.

The Bubble and Sun's subsequent struggle for survival

During the dot-com bubble, Sun experienced dramatic growth in revenue, profits, share price, and expenses. Some part of this was due to genuine expansion of demand for web-serving cycles, but another part was synthetic, fueled by venture capital-funded startups building out large, expensive Sun-centric server presences in the expectation of high traffic levels that never materialized. The share price in particular increased to a level that even the company's executives were hard-pressed to defend. In response to this business growth, Sun expanded aggressively in all areas: head-count, infrastructure, and office space. The bursting of the bubble in 2001 was the start of a period of poor business performance for Sun. Sales dropped as the growth of online business failed to meet predictions. As online businesses closed and assets auctioned off a large amount of high-end Sun hardware was available very cheaply. Much like Apple, Sun relied a great deal on hardware sales. Multiple quarters of substantial losses and declining revenues have led to repeated rounds of layoffs, executive departures, and expense-reduction efforts. In 2002 the share price returned to the 1998 pre-bubble level, a pattern of escalation and decline comparable to other companies in the sector, and has hovered in the single digits since then. In mid-2004, Sun ceased manufacturing operations at their Newark, California facility and consolidated all of the company's US-based manufacturing operations to their Hillsboro, Oregon facility, as part of continued cost-reduction efforts. Many companies (like E
- Trade
and Google) chose to build Web applications based on large numbers of the less expensive PC-class Intel-architecture servers running Linux, rather than a smaller number of high-end Sun servers. They reported benefits including substantially lower expenses (both acquisition and maintenance) and greater flexibility based on the use of open-source software. Higher level telecom control systems such as NMAS and OSS service predominantly use Sun equipment. This use is due mainly to the company basing its products around a mature version of the Unix operating system and the support service that Sun provides.

Present focus

In 2004, in common with the trend of specialisation in the electronics industry, Sun cancelled two major processor projects which were emphasizing high instruction level parallelism and high operating frequency. Instead, the company chose to concentrate on processor projects emphasizing multi-threading and multiprocessing, such as the UltraSPARC T1 processor (formerly known as "Niagara"). The company also announced a collaboration with Fujitsu to use the Japanese company's processor chips in some future Sun computers. Finally, it has a strategic alliance with AMD to produce market-leading x86/x64 servers based on AMD's Opteron processor. To this end, it acquired Kaelia, a startup founded by original Sun founder Andy Bechtolsheim, which had been focusing on high-performance AMD-based servers. In February 2005, Sun announced the [http://www.sun.com/service/sungrid/overview.html Sun Grid], a grid computing deployment on which it offers utility computing services priced at $1 (US) per CPU/hour for processing and per GB/month for storage. This offering builds upon an existing 3,000-CPU server farm used for internal R&D for over 10 years, of which Sun claims to be able to achieve 97% utilization. In August 2005, the first commercial use of this grid was [http://www.sun.com/smi/Press/sunflash/2005-08/sunflash.20050824.2.html announced] for financial risk simulations. This deal apparently did not materialize, and Sun admitted in October 2005 that after nearly a year, the Sun Grid service had yet to sign a single customer. Sun's software initiatives are increasingly making use of Open Source, most notably including Solaris via the OpenSolaris community. Sun's positioning includes a commitment to indemnify users of some software from intellectual property disputes concerning that software. The announced business model is the sale of support services on a variety of bases including per-employee and per-socket. In January 2005, Sun reported a net profit of $19 million for fiscal 2005 second quarter, for the first time in three years. This was followed by net loss of $9 million on GAAP basis for the third quarter 2005, as reported on April 14, 2005. On June 2, 2005, Sun announced it would purchase Storage Technology Corporation ("Storagetek") for US$4.1 billion in cash, or $37.00 per share. If approved, the merger would create a company with approximately 39,000 employees. On June 26, 2005, Sun announced it would produce laptops. The laptop, called Ultra 3 Mobile Workstation, is based on Sun's Ultrasparc processor and running Solaris operating system. [http://www.technewsworld.com/story/44210.html] On September 12, 2005, Sun unveiled a [http://www.sun.com/nc/05q3/videos/index.jsp?exec=3 new range] of Opteron based servers, the Galaxy X4100 and X4200 servers, and the Aquarius X2100 server. These have been designed from scratch by the team led by Bechtolsheim to address heat and power consumption issues commonly faced in datacenters and are the first servers to display Sun's new brushed aluminium design. On November 30, 2005, Sun's president and Chief Operating Officer, Jonathan Schwartz, announced the source-code opening of all its software under CDDL. Schwartz said that the objective was to eliminate the barrier represented by the initial investment in software licenses.

Software

Operating systems

All Sun systems have been based on Unix systems which are well known for system stability and a consistent design philosophy. Unix The Sun 1 was shipped with Unisoft V7 Unix. Later in 1982 Sun provided a customized 4.1BSD Unix called SunOS as an operating system for its workstations. In 1992, along with AT&T, it integrated BSD Unix and System V into Solaris, which as a result is based on System V Release 4. Sun offered a secure variant of Solaris called Trusted Solaris for releases before the current Solaris 10, which includes the same capabilities as part of the basic offering. Sun is also known for community-based and open-source licensing of its major technologies. Though a late adopter, it has included Linux as part of its strategy, following several years of difficult competition and loss of server market share to Linux-based systems. Blastwave compiles and packages open source software for Solaris machines, and has automated software consistency tracking, upgrading and completing dependencies as part of the upload process. Recently, Sun has offered Linux-based desktop software called Java Desktop System (originally code-named "Madhatter") for use both on x86 hardware and on Sun's Sun Ray thin-client systems. It has also announced plans to supply its Java Enterprise System (a middleware stack) on Linux. It has already released its newest OS, Solaris 10, under the open-source Common Development and Distribution License.

Java platform

The Java programming language took the best features from the industry standard language C++ and removed nearly all of its more difficult or unsafe features, such as pointers. Backed with a massive class library, Java programs can call upon a large set of GUI, mathematical and Internet access code that is tried and proven. The Java platform, developed in the early 1990s was specifically developed with the objective of allowing programs to function regardless of the device they were used on, sparking the slogan "Write once, run everywhere". While this objective has not been entirely achieved (prompting the riposte "Write once, debug everywhere"), Java is regarded as being largely hardware- and operating system-independent. Java was initially promoted as a platform for client-side applets running inside the web browser. This positioning was never very successful and while browser-based applications have had considerable success in displacing compiled applications on the desktop, Java has never been an important part of the web-browser experience. The platform consists of three major parts, the Java programming language, the Java Virtual Machine (JVM), and several Java Application Programming Interfaces (APIs). The design of the Java platform is controlled by the vendor and user community through the Java Community Process (JCP). The Java programming language is an object-oriented programming language. Since its introduction in late 1995, it has become one of the world's most popular programming languages. In order to allow programs written in the Java language to be run on (virtually) any device, Java programs are compiled to byte code, which can be executed by any JVM, regardless of the environment. The Java APIs provide an extensive set of library routines. The Standard Edition (J2SE) of the API provides basic infrastructure and GUI functionality, while the Enterprise Edition (J2EE) is aimed at large software companies implementing enterprise-class application servers. The Micro Edition (J2ME) is used to build software for devices with limited resources, such as mobile devices.

Office suite

In 1999, Sun acquired the German software company StarDivision and with it StarOffice, which it released as the office suite OpenOffice.org under both GNU LGPL and the SISSL (Sun Industry Standards Source License). OpenOffice.org is designed to be compatible with Microsoft Office, is available on many platforms and widely used in the open source community. The current StarOffice product is a closed-source product based on OpenOffice.org. The principal differences between StarOffice and OpenOffice.org are that StarOffice is supported by Sun, it is available as either a single-user retail box kit or as per-user blocks of licensing for the enterprise, it includes a wider range of fonts and document templates and what Sun claims to be an improved dictionary and thesaurus. StarOffice also contains commercially licensed functions and add-ons - in OpenOffice.org these are either replaced by open-source or free variants, or not present at all. Whilst new releases of OpenOffice.org are relatively frequent, StarOffice follows a more conservative release schedule supposedly more suited to enterprise deployments.

Notable persons


- [http://blogs.sun.com/roller/page/jonathan Jonathan Schwartz], President and Chief Operating Officer of Sun
- Bryan Cantrill, of 2005 Technology Review "Top 35 Young Innovators"
- Whitfield Diffie, Chief Security Officer, co-inventor of public key cryptography
- Robert Drost, of 2004 Technology Review "Top 100 Young Innovators"
- John Gage, Chief Researcher
-