[ Pobierz całość w formacie PDF ]
.In parallel, several universities, companies, and individuals have already expressed their intention to duplicate the Java environment, based on the open API that Sun has created.Several other languages are even contemplating compiling down to Java bytecodes, to help support them in becoming a more robust and widespread standard for moving executable content around on the Net.Why It's a Powerful VisionOne of the reasons this brilliant move on Sun's part has a real chance of success is the pent-up frustration of literally a whole generation of programmers who desperately want to share their code with one another.Right now, the computer science world is balkanized into factions at universities and companies all over the world, with hundreds of languages, dozens of them widely used, dividing and separating us all.It's the worst sort of Tower of Babel.Java hopes to build some bridges and help tear down that tower.Because it is so simple, because it's so useful for programming over the Internet, and because the Internet is so “hot” right now, this confluence of forces should help propel Java onto center stage.It deserves to be there.It is the natural outgrowth of ideas that, since the early 1970s inside the Smalltalk group at Xerox PARC, have lain relatively dormant in the mainstream.Smalltalk, in fact, invented the first object-oriented bytecode interpreter and pioneered many of the deep ideas that Java builds on today.Those efforts were not embraced over the intervening decades as a solution to the general problems of software, however.Today, with those problems becoming so much more obvious, and with the Net crying out for a new kind of programming, the soil is fertile to grow something stronger from those old roots, something that just might spread like wildfire.(Is it a coincidence that Java's previous internal names were Green and OAK?)This new vision of software is one in which the Net becomes an ocean of objects, classes, and the open APIs between them.Traditional applications have vanished, replaced by skeletal frameworks like the Eiffel Tower, into which can be fitted any parts from this ocean, on demand, to suit any purpose.User interfaces will be mixed and matched, built in pieces, and constructed to taste—whenever the need arises—by their own users.Menus of choices will be filled by dynamic lists of all the choices available for that function, at that exact moment, across the entire ocean (of the Net).In such a world, software distribution is no longer an issue.Software will be everywhere and will be paid for through a plethora of new micro-accounting models, which charge tiny fractions of cents for the parts as they are assembled and used.Frameworks will come into existence to support entertainment, business, and the social (cyber-)spaces of the near future.This is a dream that many of us have waited all our lives to be a part of.There are tremendous challenges to making it all come true, but the powerful winds of change we all feel must stir us into action, because, at last, there is a base on which to build that dream—Java.The Java Virtual MachineTo make visions like this possible, Java must be ubiquitous.It must be able to run on any computer and any operating system—now, and in the future.In order to achieve this level of portability, Java must be very precise not only about the language itself, but about the environment in which the language lives.You can see, from earlier in the book and Appendix B, that the Java environment includes a generally useful set of packages of classes and a freely available implementation of them.This takes care of a part of what is needed, but it is crucial also to specify exactly how the run-time environment of Java behaves.This final requirement is what has stymied many attempts at ubiquity in the past.If you base your system on any assumptions about what is “beneath” the run-time system, you lose.If you depend in any way on the computer or operating system below, you lose.Java solves this problem by inventing an abstract computer of its own and running on that.This “virtual” machine runs a special set of “instructions” called bytecodes that are simply a stream of formatted bytes, each of which has a precise specification of exactly what each bytecode does to this virtual machine.The virtual machine is also responsible for certain fundamental capabilities of Java, such as object creation and garbage collection.Finally, in order to be able to move bytecodes safely across the Internet, you need a bulletproof model of security—and how to maintain it—and a precise format for how this stream of bytecodes can be sent from one virtual machine to another.(For more on security issues, see Chapter 40, “Java Security.”)Each of these requirements is addressed in this chapter.NOTEThis discussion blurs the distinction between the run-time and the virtual machine of Java.This is intentional but a little unconventional.Think of the virtual machine as providing all the capabilities, even those that are conventionally assigned to the run-time.This book uses the words “run-time” and “virtual machine” interchangeably.Equating the two highlights the single environment that must be created to support Java.Much of the following description is based closely on the latest “Virtual Machine Specifications” documents (and the 1.0 bytecodes, which had just emerged as of this writing), so if you delve more deeply into the details online, you should cover some familiar ground.An OverviewIt is worth quoting the introduction to the Java virtual machine documentation here, because it is so relevant to the vision outlined earlier:The Java virtual machine specification has a purpose that is both like and unlike equivalent documents for other languages and abstract machines.It is intended to present an abstract, logical machine design free from the distraction of inconsequential details of any implementation.It does not anticipate an implementation technology, or an implementation host.At the same time it gives a reader sufficient information to allow implementation of the abstract design in a range of technologies [ Pobierz całość w formacie PDF ]
  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • centka.pev.pl
  •