1 / 32

George Blank University Lecturer

George Blank University Lecturer. CS 602 Java and the Web. Object Oriented Software Development Using Java Chapter 1. Objectives for the Course. Be able to program in Java

sabina
Download Presentation

George Blank University Lecturer

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. George Blank University Lecturer

  2. CS 602Java and the Web Object Oriented Software Development Using Java Chapter 1

  3. Objectives for the Course • Be able to program in Java • Be able to use professional development tools including the Eclipse IDE, Javadocs, JUnit, Use Cases and Unified Modeling Language. • Be able to share your code over a network using Applets, Servlets, Java Server Pages, Java Network Launch Protocol and Web Start, and by configuring a server to allow others to run code.

  4. Additional Emphasis • This course will prepare students to work in a corporate environment, and will therefore require advance planning before creating programs, use of an interactive development environment, formal unit testing, and keeping records of time spent on development. The instructor was a software development manager in Bell Labs.

  5. Textbook is primary • The lecture materials are supplemental to the text. Every student is expected to read and be thoroughly familiar with the materials in the text. • There will also be supplemental lectures, often developed for other courses, and sometimes by students, covering topics referenced in the course.

  6. Web Documentation • A primary reference source for Java programming is the Oracle web site at http://java.com . Students will be expected to develop skill at using the materials on this site to support their programming. • Also critical for NJIT students are the materials at http://ist.njit.edu The left side of that Web page contains a menu with a guide to using many of the technologies used in this course.

  7. Technical support • Technical support is primarily offered by student to student help on Moodle. I monitor the technical support conference, and often offer suggestions. I do believe in limiting help for the following reason. • A student wrote; “My project doesn't work yet.  For a job interview,  I'd like to get it working and show it as an application I created using java/Unix/Oracle.” What if this student could only do the project with extensive help, then got the job and could not perform the work?

  8. Acceptable help • Identifying to a student where the problem is or what they are doing wrong. • Pointing a student to an example that works, but needs to be modified for the student to use it. • Unacceptable: Showing the student exactly what to do. • Even worse: Doing it for the student.

  9. Exceptions • Most rules need exceptions. It is reasonable to give a student precise help or even write the code for them if the problem is very small (such as a single line of defective code) or exact precision is needed (such as the correct JDBC string to connect to a database.)

  10. Software Delivery Options • The next few slides give a brief description of the software delivery options that will be covered in this course: • Sharing applications on a server • Applets • Java Network Launch Protocol and Java Web Start • Java Server Pages • Java Servlets

  11. Sharing Applications on a Server. • Students can give permissions to others, including the instructor, to access Java code and run their application on one of the University servers running Solaris or Linux. To set up your file permissions to do this, see the instructions at http://ist.njit.edu The left side of that Web page contains a menu with the top level topic AFS and sub-topic of Sharing Files.

  12. Applets • An applet is Java code that inherits from the classes Applet or JApplet and runs on a Web server such as the Apache Web servers on web.njit.edu and harp.njit.edu. • Typically, for this course you would put your applet code in a sub-directory of your home page and post a link to it at a specific homework assignment in Moodle.

  13. JNLP and Web Start • The Java Network Launch Protocol, in combination with Java Web Start, is a browser independent way of sharing a Java application (not applet) over a network and running it on a client machine. • There is a separate lecture in this course on JNLP.

  14. What if I cannot convert to an Applet or JNLP? • In the past, I have strongly encouraged students to do all assignments as applets, even if the textbook called for an application. I now believe that is a serious mistake. You must use an applet or JNLP to get an A, but only the top quarter of the class is eligible for an A anyway. If you have trouble, you are probably not in the top quarter, and would might be better off just doing it as an application and getting a B. • Note: If you do an application that I cannot run from your Web site, you must post screen shots to prove that your program works!

  15. Java Server Pages • JSP allows you to embed Java Code along with HTML in a Web page and display it in a client browser. Just as you need a Web server like Apache to service applets, you need a Java Web Container like Tomcat to service JSP. This is a really simple technology, but the amount of code on a single page is usually quite limited, and JSP applications typically have many pages.

  16. Java Servlets • Servlets are Java Programs that inherit from HTTPServlet. They are similar to applets, except that they are run from a Java container like Tomcat instead of a Web Server like Apache. • On the NJIT system, due to the large number of students independently using Tomcat, servlets must be in a directory called servlet or subdirectory of such a directory. Tomcat identifies a servlet by detecting that term in the URL that it is providing. That approach is generally discouraged in commercial use.

  17. Software Disasters Why we need quality software

  18. January 15, 1990 • I had just started work at AT&T when a software problem brought down the entire national network of the then-dominant (and no longer existing) telecommunications company. It was a profoundly disturbing episode that was very traumatic and embarrassing for the company. The following pages detail some other programming disasters.

  19. False Attack Warning • With large numbers of medical devices and transportation systems controlled by software, defects have been fatal. • On June 3, 1980, the North American Aerospace Defense Command (NORAD) reported that the U.S. was under missile attack. The report was traced to a faulty computer circuit that generated incorrect signals.

  20. Civilian Aircraft Shot Down • The 1988 shooting down of the Iranian Airbus 300 Flight 665. by the US Vincennes was attributed to the cryptic and misleading output displayed by the tracking software. It seems that the Aegis system had passed only two tests prior to being sent into combat in the Middle East.

  21. Iran Airbus (continued) • In the first test, the $500 million Aegis radar and weapons control system was set up near Exit 4 of the New Jersey Turnpike where it merely watched the local general aviation traffic. It's first "active" test involved the shooting down of 10 out of 11 drones, all on courses and altitudes known in advance to the system operators.

  22. USS Rancocas, The Cornfield Cruiser Visible from I-285 in Moorestown NJ. This is where the Navy did the development on the Aegis Guided Missile Cruisers.

  23. Iran Airbus (continued) • Deployed in the Persian Gulf in 1988, The Aegis radar on the U.S.S. Vincennes locked onto an Airbus 300, but misidentified it as the much smaller F-14. The Aegis also reported that the target was descending even though the airbus was, in fact, climbing, and finally, the Aegis erred on the altitude by 4000 feet.

  24. Iran Airbus (continued) • The combination of all these errors presented by the Aegis system convinced the Captain that his ship was under attack, and the Airbus was shot down. • 290 People were killed.

  25. Falkland War Incident • The British destroyer H.M.S. Sheffield was sunk in the Falkland Islands war. According to one report, the ship's radar warning systems were programmed to identify the Exocet missile as "friendly" because the British arsenal includes the Exocet's homing device and allowed the missile to reach its target, namely the Sheffield.

  26. Medical Radiation Accident A series of accidental radiation overdoses from identical cancer therapy machines in Texas and Georgia left one person dead and two others with deep burns and partial paralysis, according to federal investigators. Evidently caused by a flaw in the computer program controlling the highly automated devices, the overdoses - unreported until now - are believed to be the worst medical radiation accidents to date.

  27. Radiation (continued) The malfunctions occurred once in 1985 and twice in March and April of 1986 in two of the Canadian-built linear accelerators, sold under the name Therac 25. Two patients were injured, one who died three weeks later, at the East Texas Cancer Center in Tyler, Texas, and another at the Kennestone Regional Oncology Center in Marietta, Ga. Richard Saltos, The Boston Globe, June 20, 1986, p. 1

  28. Radiation (continued) The defect in the machines was a "bug" so subtle, say those familiar with the cases, that although the accident occurred in June 1985, the problem remained a mystery until the third, most serious accident occurred on April 11, 1986. Estimates are that the patients received 17,000 to 25,000 rads to very small body areas. Doses of 1,000 rads can be fatal if delivered to the whole body.

  29. Computer Instigated Murder In 1982, a computer error in West Germany caused a medical insurer to convince a 54-year old woman that she suffered from a fatal form of syphilis, and that she had transmitted the disease to her children; in panic, she strangled her 15-year old daughter and tried to kill her 13-year old son. The boy escaped, and succeeded in preventing his mother's death from a drugs overdose. The Duesseldorf court dismissed the accusation of murder, laid all blame with the computer error, and declared the woman unaccountable for her actions.

  30. Responses to complexity • Many errors in software systems are caused by complexity that is difficult for humans to manage. The object-oriented approach was developed to manage complexity by dividing a system into relatively small objects with well defined interfaces.

  31. Iterative Development • Iterative development is another approach to manage complexity. A large system is built in several iterations, and each is tested rather than developing the whole system and attempting to test everything at once. The Rational Unified Process is one of the most widely used iterative processes.

  32. Bibliography • Jia, Xiaoping, Object Oriented Software Development Using Java. Addison Wesley, 2003

More Related