User:Pat Palmer/My Sandbox: Difference between revisions

From Citizendium
Jump to navigation Jump to search
imported>Pat Palmer
imported>Pat Palmer
(→‎Java Background Notes: removing notes)
Line 49: Line 49:
==References==
==References==
<references />
<references />
==Java Background Notes==
<br>
===Introduction===
<ul>
<li>Java is a programming language dating from 1995 (the
year of Sun's
formal announcement)
<ul>
<li>general-purpose, object-oriented, and cross-platform</li>
<li>Java programs compile down to byte code (an intermediate language)</li>
<li>byte code is handled at runtime by the Java Virtual Machine (JVM)</li>
<li>Java programs are .jar (Java ARchive) files containing byte code and other
stuff</li>
<li>the JVM compiles byte codes into native machine instructions "on the fly"
(as needed)</li>
<li>Java programs execute as <i>applications </i>on a desktop or web server</li><li>
Java programs can execute as <i>applets</i> in a browser</li><li>for safety, applets
are "sandboxed" (restricted from changing the file system)</li></ul>
</li>
</ul>
===The programming language===
<ul>
<li>Java is a language that supports <i>object oriented programming</i>
<ul>
<li>the code in Java programs is always bundled into one or more ''classes''</li>
<li>a class may also contain methods--the ''operations'' of the
class (like functions or procedures in older languages)</li>
<li>a class may
contain data--the fields 
of the class (like variables in older programming
languages)</li>
<li>a class is the recipe, created by a programmer, for creating one or
more ''objects'' at runtime (like structs in C or C++)</li>
</ul>
</li>
<li>a Java program consists of cooperating objects of different
''types''<ul>
<li>some of the classes (''types'') are coded by the
application programmer</li>
        <li>some are precompiled, from the standard Java libraries
(written by Sun programmers)</li>
        <li>some are libraries that the programmer has
modified (extended)</li>
    </ul>
</li>
<li>Java version 1.5 adheres to the
<a href="http://java.sun.com/docs/books/jls/third_edition/html/j3TOC.html">Java
Language Specification</a>, 3rd Edition (<a href="http://java.sun.com/docs/books/jls/download/langspec-3.0.pdf">.pdf
version</a>)</li>
</ul>
===The Java virtual machine===
<ul>
<li>Java program execution is handled by a virtual machine called the Java Virtual
Machine (JVM) which has been implemented on all the common operating systems</li>
<li>the JVM runtime adheres to the <a href="http://java.sun.com/docs/books/vmspec/">The Java<sup>TM</sup>
Virtual Machine Specification</a>, Second Edition</li>
<li>some reasons for Java's commercial success include:<ul>
<li>Java makes all operating system platforms approximately alike to a
        programmer</li>
<li>Java makes application code more robust by eliminating direct
        pointer manipulation and by strong type checking at both
compile- and run-time</li>
</ul></li>
<li>Java programs are not substantially slower than native programs<ul>
<li>compared to native applications, Java programs "load" more slowly</li>
<li>the JVM uses JIT (just-in-time)
        compilation--methods are compiled to native code
        the first time they run (and only if they run), then are cached in
memory as
        native code so they need not be compiled a second time during the same
        program execution</li>
<li>Java programs run about as fast as native programs once they "warm
up"</li>
</ul></li>
</ul>
===The Java Class Libraries===
<ul>
<li>also called the Base Class Library, these libraries ("packages") are
    available to every program written in Java, regardless of operating system
    platform</li>
<li>~2500 reusable classes</li>
</ul>
===The Java platform===
<ul>
<li>the platform consists of the Java compiler (input: source code, output:
byte code for the JVM), the runtime that loads programs and JIT-compiles them at
runtime, and the libraries</li>
<li>the platform does not necessarily include an [[integrated development environment]]
([[IDE]]), although there is a version available from Sun that includes the NetBeans
IDE</li>
<li>although there are now a number of free IDE's available, a large percentage of Java software developers still use the open-source Eclipse IDE from IBM</li>
</ul>
===.jar files===
<ul>
<li>Java executables typically have an extension of .jar (Java ARchive) </li>
<li>.jar files contain byte codes, resources, metadata, and they <i>may</i>
even contain
    source code</li>
<li>when people say "component" or library, they usually mean a .jar file
that does not have an entry point--it has methods that we can call, but it
doesn't run "standalone"</li>
</ul>
===Java compared with .NET===
<ul>
<li>Java was the model
for Microsoft when it created C# in 2002<ul>
<li>Java and C# code look very similar; it is fairly easy to switch
between the two</li>
</ul>
</li><li>Java is cross-platform; .NET is cross-language:<ul>
<li>Java provides freedom from <i>all</i> OS differences, by making
necessary cross-platform compromises; Java does
    <b>not</b> provide cross-<i>language</i> calling</li>
<li>.NET makes 36 versions of Windows alike for programmers; it eliminates the "DLL hell" which formerly
occurred when installing Windows applications</li>
<li>.NET libraries can be used by any of the .NET compiled languages (of
which there are dozens); libraries can be written in any .NET language</li>
</ul>
</li><li>the two platforms compete fiercely in the world wide web<ul>
<li>JSP's require Apache web servers (Linux or Unix); these are HTML
interlaced with code</li>
<li>&nbsp;&nbsp;&nbsp; called "servlets" if all code</li>
<li>ASP's require
Microsoft's IIS6 web server; these are HTML interlaced with code</li>
<li>&nbsp;&nbsp;&nbsp; called "web handlers" if all code</li>
<li>both Linux and Microsoft web servers use load-balancing across mirrored web
farms to scale up</li>
<li>so-called "dynamic" languages such as Ruby are seen by
some as the next stage beyond Java and .NET</li>
</ul></li>
<li>it's an arms race!</li>
</ul>

Revision as of 11:56, 9 June 2007

This is where I work on pre-drafts and just try stuff out

I had a draft of Computer at User:Pat_Palmer/Computer.

Discussion Archives
Archive 1, 4-9-07: here
Archive 2, date?: here
To Do List
placeholder
placeholder


Strowger switch and telephone dialing (~1920)

- Telephone automation systems, called "switches" or switchboards, were likely among the first electromechanical devices to implement a primitive form of computer-like memory, whereby a number is stored by the setting of relays, or the operation of similar equipment. The earliest form of switching memory was the Strowger switch, developed by an independent American inventor decades before Bell Laboratories invented an equivalent technology. Strowger switches completed an additional segment of a phone call's connection each time a digit was dialed; in this case, the entire telephone system was the memory. Later switchboards (1960's generation) used general-purpose computers and completely stored all digits of the dialed number in a register before making a routing decision based on a host of complex factors. Call connections were made "all at once" after running a program that analyzed the dialed number. + Telephone automation systems, called "switches" or switchboards, were likely among the first electromechanical devices to implement a primitive form of computer-like memory, whereby a number is stored by the setting of relays, or the operation of similar equipment. The earliest form of switching memory was the Strowger switch, developed by an independent American inventor decades before Bell Laboratories invented an equivalent technology. Strowger switches completed an additional segment of a phone call's connection each time a digit was dialed; in this case, the entire telephone system was the memory. Strowger eliminated the need for intervention by a human operation when placing a phone call (in consumer terms, he "invented the dial telephone"). Later switchboards (1960's generation) used general-purpose computers and completely stored all digits of the dialed number in a register before making a routing decision based on a host of complex factors. Call connections were made "all at once" after running a program that analyzed the dialed number.

Discovery of "switching algebra" leading to logic gate designs (1938)

Claude Shannon (1916-2001) made a critical step enabling hardware design of a computer in his 1938 MIT master's thesis[1] on the use of Boole's algebra to analyse and optimise relay switching circuits. Shannon associated boolean algebra, a kind of mathematical system that had been known for centuries, with the design of logic gates in digital hardware[2], calling boolean algebra "switching algebra" in the context of digital hardware design. Shannon also later made seminal contributions towards the burgeoning field of information theory.



References