What Is Java?
Last updated Nov 2, 2007.
In 1995, Sun Microsystems made the first public version of Java available. It defined Java as
having the following attribute:
• Java is simple. That simplicity derives from syntax similar to C/C++ and the omission
of complex C/C++ features such as multiple implementation inheritance, pointers,
and operator overloading.
• Java is object-oriented. Java’s object-oriented nature encourages a developer to
think in terms of classes and objects rather than separate code and data. That
class/object focus results in code that is easier to write, easier to maintain, and easier
to reuse.
• Java is network-savvy. A TCP/IP library simplifies the development of programs that
communicate with HTTP, FTP, and other TCP/IP network processes. Furthermore,
the library’s use of the same stream-oriented mechanism for communicating with
remote network processes that file-oriented code uses to communicate with files on a
computer’s local hard drive helps a developer write network code faster.
• Java is interpreted. Java’s compiler translates source code into class files of
bytecode instructions. A virtual machine examines each instruction and uses that
instruction’s meaning to execute an equivalent sequence of platform-dependent
instructions. Interpretation speeds up the development process and simplifies
debugging.
• Java is robust. Errant programs do not crash the virtual machine or corrupt the
underlying (native) platform. Robustness is achieved, in part, by not supporting C/C+
+ pointers, by providing a garbage collector to automatically free up dynamically
allocated memory (instead of forcing the developer to accomplish that task), by
performing strict compile-time/runtime type checking, and by providing true arrays
with bounds checking.
• Java is secure. Java’s "sandbox" security model identifies sensitive operations (such
as file I/O) that a malicious program can exploit to harm the native platform, and
provides a mechanism for allowing or preventing access to those operations.
• Java is architecture-neutral. A compiled Java program’s bytecode instructions
operating systems, but as time moved forward, so did Java. Today, moving between modern
Java virtual machines, even from different vendors, is mostly transparent. No longer do you
have to think about if your application will run on Linux or Windows, if you choose to use Java
you get both for free, plus Macintosh, Sun, AIX, HP-UX, and any other operating system for
which there is a Java virtual machine.
The History of Java
Java’s abstraction of the underlying operating system, and hence the underlying network
infrastructure, can only be appreciated after a brief history lesson about how Java came to be.
In 1991, a research group at Sun Microsystems, as part of their "Green" project, was working to
develop software to control consumer electronic devices. The goal was to develop a
programming language that could be used to control and network "smart" devices, such as
televisions, toasters, and even buildings. These devices would all coexist and could
communication with one another.
The first prototype that Sun Microsystems developed was a device called the Star7 — a device,
similar to a remote control that could communicate with other Star7 devices. Now, the initial
intent was to use C++ to control the Star7, but as the result of frustration with C++, James
Gosling, a member of the Green project, developed a new language, called Oak, to control the
Star7. Why Oak you ask? Well, it is pretty technical, but here goes: rumor has it that the title
came from a tree that James could see out of his window while developing the language. Sun
later replaced the name Oak with Java because they found that Oak was already being used.
Anyway, as a result of Oak, or Java, being designed to run on small appliances, the language
had certain inherent benefits to it:
• It had to be small to run on the limited memory of small appliances
• It had to be efficient and reliable enough to function as a small appliance — we are
all used to crashes using computers, but what if your microwave oven changed its
power setting and cause your popcorn to catch fire?
• It had to be portable to run on different pieces of hardware
So what happened to Java after that? After graduating from the Green project, Java was used to
create one of the earliest Web Browsers in 1994, called HotJava, but Java came alive however,
in 1995 when Netscape licensed the Java programming language and included support for it in
community: a group of individuals dedicated to making your job easier. And as such, the Java
community projects allow you to focus on solving your business problems rather than spending
most of your time building an infrastructure to support your application. If you’re new to
programming or you’ve been programming for decades, Java can not only make you more
productive, but can help you enjoy programming!
Server
Last updated Jun 13, 2008.
There are multiple server technologies, into which I am grouping both web and enterprise
applications, but the industry is dominated by three primary technologies:
• Microsoft Windows .NET
• Enterprise Java Technologies
• LAMP (Linux Apache, MySQL, and PHP)
.NET and Java are actually more similar than you might think, at least in terms of capabilities.
Enterprise Java has been in existence longer than .NET and as a result is probably a little more
mature, but not enough so to sway your decision. The main difference between the two is in
their deployment platforms: .NET should be deployed to a Windows technology stack whereas
enterprise Java applications can not only deploy to Windows, but also to Unix, Linux, and even
Macintosh. The important differentiator is that very large scale applications can run in very
large Unix environments with hundreds of thousands of nodes or even on multimillion dollar
mainframes. My travels have taken me to Java customers ranging from banks on Wall Street to
large healthcare companies to huge telecommunications companies, and each of them was
successful in solving their business problems using Java.
One of the things that has truly made Java a powerful competitor in the web and enterprise
technology space has been the emergence of open source technologies. For example, if you are
building a web application, rather than starting from scratch with the technology alone, you can
analyze your needs and find a proven framework that best solves your business problems. And
most of these technologies are running in thousands of different environments across the world,
all developed and supported by volunteers whose only aim is to provide the best performing
and most robust solution to a domain of business problems. If it were not for this open source
community, Java would not be nearly the technology that it is today. As a point of reference,
Summary
Last updated Jun 13, 2008.
When choosing a technology to use to solve your business problems, you need to consider
many factors, including physical cost, development cost, performance, robustness, flexibility,
as well as your eventual deployment platforms. Java provides technologies to help you solve
small-scale as well as very large-scale business problems and everything in between. On top of
that, Java applications can run on different platforms, which means that you are never locked
into a single vendor. Finally, the open source communities and projects that have evolved
around the Java industry can provide you with best of breed infrastructure to allow you to focus
on solving your business problems. This is all to say that Java allows you to rapidly develop
robust software with the flexibility to deploy that software to a wider audience than any of its
competitors. And as such, Java deserves your serious consideration for any application you are
getting ready to write.
Java là gì?
Ngày cập nhật 2 tháng 11 năm 2007.
Năm 1995, Sun Microsystems, thực hiện các phiên bản đầu tiên công cộng của Java có
sẵn. Nó được định nghĩa Java như có thuộc tính sau:
• Java là đơn giản. Đó đơn giản xuất phát từ cú pháp tương tự như C / C + + và các thiếu
sót nào của phức tạp C / C + +, các tính năng như thừa kế thực hiện nhiều, con trỏ, và nhà
điều hành quá tải.
• Java là hướng đối tượng. Java hướng đối tượng thiên nhiên khuyến khích một nhà phát
triển để suy nghĩ về các lớp học và các đối tượng chứ không phải là mã riêng và dữ liệu. Đó
là lớp / đối tượng kết quả được tập trung trong mã được dễ dàng hơn để viết, để duy trì dễ
dàng hơn, và dễ dàng hơn để sử dụng lại.
• Java là mạng hiểu biết. Một TCP / IP, thư viện đơn giản hoá việc phát triển các chương