DOC PREVIEW
USC CSCI 571 - Java is Web-Enabled

This preview shows page 1-2-3-25-26-27 out of 27 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 27 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 27 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 27 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 27 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 27 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 27 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 27 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Java is Web-Enabled?Java is Safe?Java is Cross-Platform?Slide 4Slide 5Slide 6Java is Simple?Java is Powerful?Slide 9Key Java Packages and ProtocolsJava Packages and Protocols: JDBC (Java DataBase Connectivity)Java Packages and Protocols: Remote Method Invocation (RMI)Java Packages and Protocols: JavaBeansJava Packages and Protocols: SwingJava Packages and Protocols: Servlets and JavaServer Pages (JSP)Java Packages and Protocols: Enterprise JavaBeans (EJB)Basic Hello World ApplicationBasic Hello World Application (Continued)Command Line ArgumentsCommand Line Arguments, ResultsBasic Hello WWW AppletBasic Hello WWW Applet (Continued)Slide 23Customizing Applets with PARAMCustomizing Applets with PARAM, cont.Customizing Applets with PARAM, ResultSummarywww.corewebprogramming.comJava is Web-Enabled?•Myth: Java is o nly for the Web– Java “applets” run in Web pages– Java “applications” run stand-alone– Current usage (roughly)•Client (applet): 5%•Desktop (application): 45%•Server (servlets/JSP/EJB): 50%www.corewebprogramming.comJava is Safe?•Truth: Restrictions on permissible operations can be enforced– No “raw” memory manipulation (directly or indirectly).•Thus, it is easy to identify prohibited operations.– Applets, by default, prohibited from:•Reading from the local disk•Writing to the local disk•Executing local programs•Opening network connections other than to HTTP server•Discovering private info about user (username, directories, OS patch level, applications installed, etc.).www.corewebprogramming.comJavaSource CodeJava BytecodeCompiler(javac)Java BytecodeExecutionJIT Compileror InterpreterCompile Time Run TimeJava is Cross-Platform?•Truth: Java programs can compile to machine-independent bytecode•Truth: All major operating systems have Java runtime environments– Most bundle it (Solaris, MacOS, Windows 2000, OS/2)www.corewebprogramming.comJava is Cross-Platform?•Myth: Safety and machine independence can be achieved with no performance penalty–Current systems are about 20% slower than C++–Upcoming releases claim to lower or eliminate that gap–Expect the gap to stay at 10% or more• Myth: Java is interpreted–Early releases were interpreted–Many major “Just in Time” (JIT) compilers–HotSpot and “native” compilers even faster (IBM, Symantec, TowerJ, etc.)www.corewebprogramming.com•Truth: Java has a portable graphics library “Native look & feel” -- Java 1.1 UI controls adapt to OS •Myth: The graphics library has everything most applications need. AWT (Java 1.0 and 1.1) was weak. JFC/Swing (Java 2) much more complete and powerful.Java is Cross-Platform?www.corewebprogramming.comJava is Cross-Platform?•Myth: Write Once Run Anywhere–Cross-platform code can be achieved, but you must test on all platforms you will deliver on.•Java applications can execute local code•The graphics library behaves slightly differently on different platforms•The behavior of the thread scheduler is only loosely defined•Myth: Java will kill Microsoft–There is also no longer immediate danger of the reverse (Microsoft killing Java)–Microsoft wavered between trying to fight Java and joining it and making money by dominating the market. With .NET, they are back to fighting it again.www.corewebprogramming.comJava is Simple?•Truth: Java greatly simplifies several language features– Java has automatic memory management• Does Windows and takes out the garbage• No dangling pointers. No memory leaks.•A problem for real-time programs– Java simplifies pointer handling• No explicit reference/dereference operations•Everything is a pointer (like Lisp)– No makefiles– No header files– C++ syntax streamlinedwww.corewebprogramming.comJava is Powerful?•Truth: Java has a rich set of standard libraries– Networking– Threads (lightweight processes)– Distributed objects– Database access– Graphics: GUI controls and drawing– Data structure library– Arbitrary precision integral and fixed-point arithmetic– Digital signatures– Serialization (transmitting/reassembling data structures)– File and stream compressionwww.corewebprogramming.comJava is Powerful?•Myth: Java will increase programmer productivity for all applications by XXX%.•Myth: Java will kill C++•Myth: All software should be written in Java–Unix utilities: C–Small/medium Windows-only programs: Visual Basic–String parsing: Perl–High-performance, single-platform OO systems: C++–Air traffic control, aircraft flight software: Ada–Knowledge-based systems: Lisp/CLOSwww.corewebprogramming.comKey Java Packages and Protocols•Core Technologies–JDBC–RMI– Jini (Device Networking)–JavaBeans–Swing–Java 2D•Standard Extensions–Servlets and JavaServer Pages (JSP)–Enterprise Java Beans–Java 3Dwww.corewebprogramming.comJava Packages and Protocols:JDBC (Java DataBase Connectivity)•Standardizes mechanism for making connection to database server–Requires server-specific driver on client. No change to server.•Standardizes mechanism for sending queries–Either regular or parameterized queries (stored procedures)•Standardizes data structure of query result–Assumes relational data, so data structure is a table•Does not standardize SQL syntax–Queries are simply strings–Server extensions and enhancements supportedwww.corewebprogramming.comJava Packages and Protocols:Remote Method Invocation (RMI)•Built-in Distributed Object Protocol–RMI lets a developer access a Java object and manipulate it in the normal manner. Behind the scenes, each function call really goes over the network to a remote object.–Arbitrary Java data structures can be sent over the network with little or no special packaging, due to Java’s “serialization” mechanism–Similar to a simplified CORBA, but restricted to Java-to-Java communication•Jini–RMI-based protocol for self-documenting services.–Allows real “plug and play” devices -- no separate drivers–Jury is out on eventual success. Security and industry adoption are open questions.www.corewebprogramming.comJava Packages and Protocols:JavaBeans•JavaBeans is to Java as ActiveX is to Visual C++. –Lets you package a Java program as a software “component”–Visual tools can modify/manipulate it without knowing anything about it in advance•For example, you can drop a Bean into Visual Café, IBM VisualAge for Java, Inprise (Borland) JBuilder, Sybase PowerJ, Metrowerks


View Full Document

USC CSCI 571 - Java is Web-Enabled

Download Java is Web-Enabled
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Java is Web-Enabled and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Java is Web-Enabled 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?