Sei sulla pagina 1di 3

Problems with developing applications for the Internet: 1.

Security - concerns w/ ensuring unauthorized access is prevented - major factor w/ commercial apps; relative slow development - direct transfer of funds across communication lines 2. Lack of specific programming language - C, Pascal; not meant for the Internet, hence very low-level access to facilities 3. Lack of interaction - interaction is very difficult to build into apps - only gives impression of being interactive - just moves along a series of text & visual images to move to other sections 4. Portability - apps are firmly anchored into 1 architecture & operating system The Java Programming Language - originated at Sun Microsystems - developed initially as a language for consumer electronics products Design goals: 1. The language should be familiar - no strange syntax - should look like an existing language but problems should not be carried through; similar to C++ but not compatible- wont compile - commercial & technical success if learning curve is not too steep 2. The language should be object-oriented - it offers facilities to define & manipulate objects (self-contained entities w/c have a state & to w/c messages can be sent); would be discussed further Advantages of OOP languages: 1. Systems are easy to modify - adhere to a small set of programming principles - important; customer reqts can change quickly even while in development 2. High degree of re-use - application items can be reused time & time again w/ little extra effort - buttons, scroll bars, app items such as invoices - has a huge library 3. The language should be robust - eliminates collapses/crashes w/ extensive error checking & wide support 4. The language have a high performance - provides for concurrent processing /concurrent execution of codes - highly efficient utilization of processor & fast response time 5. The language should be portable - Porting from one computer to another dissimilar computer with no changes at all ( or very little change)

The system How the Java compiler works

Any errors

Source code

COMPILER

Object code

EXECUTION The implementation of a conventional programming language 1. The programmer develops a program expressed in what is known as source code. 2. This is translated by a compiler to the base language of the computer known as object code. 3. This object code is then executed and the program carries out its functions. Rules governing the way code is written are very strict, & if an error has been made the compiler will not carry out the translation but issue a number of error messages w/c tell the programmer what has gone wrong. Here, the object code is specific to one computer only by the computer that recognizes it. Any errors

Source code

COMPILER

Byte code

EXECUTION

Interpreter for computer A

Interpreter for computer B

Interpreter for computer C

The implementation of the Java compiler

The Java code distribution: 1. The Java interpreter - the language processor w/c has been ported to a number of systems - works by reading & executing Java byte code 2. The Java compiler - the language processor w/c translates Java code to byte code - used for the development of high-performance Java 3. The Java disassembler - this display files created using the Java compiler 4. The document generator - processes files w/c contain Java code & display bureaucratic info such as what it is meant to do 5. Profiling tool - produces a listing of where the execution of the Java code has occurred 6. The applet viewer - utility w/c enables the developer to examine the output from a Java program 7. The Java debugger - a hybrid debugger w/c debugs interpreted code

Potrebbero piacerti anche