Wednesday, June 5, 2019

Importance Of Java To The Internet Computer Science Essay

Importance Of coffee tree To The Internet Computer Science EssayAt the beginning burnt umber was known as oak but it was renamed as Java in 1995. The main aim of this language was to provide platform independent language that could be used to execute parcel to be embedded in various consumer electronic devices.Features of JavaJava is a computer programmers language.Java is cohesive and consistent.Except for those constraints imposed by the Internet milieu Java gives the programmer full control.Java is to Internet programming where C was to system programming.Importance of Java to the InternetJava has had a profound work on the Internet because it allows objects to move freely in Cyberspace. In a ne iirk there be two categories of objects that be transmitted between the horde and the Personal computer.Passive informationDynamic active programsThe Dynamic Self-executing programs cause serious problems in the areas of Security and probability. But Java addresses those concern s and by doing so has undefended the door to an exciting new form of program called the Applet.Java can be used to create two types of programsApplications An applications programme is a program that runs on our Computer under the operating system of that computer. It is more or less like one creating using C or C++. Javas ability to create Applets makes it authoritative.Applet An Applet is an application designed to be transmitted over the Internet and executed by a Java compatible web browser. An applet is actually a tiny Java program, dynamicalally transfered across the interlocking, just like an image. But the discordence is it is an intelligent program, non just a media file. It can react to the user remark and dynamically change.Features of Java SecurityEvery time you that you download a program you are risking a viral infection. Prior to Java, most users did not download executable programs frequently and most users were worried about the possibility of infecting the ir systems with a virus. Java answers both these concerns by providing a firewall between a network application and your computer. When you use a Java-compatible Web browser, you can safely download Java applets without fear of virus infection.PortabilityFor programs to be dynamically down annoyed to all the various types of platforms connected to the Internet, few means of generating portable executable autograph is needed .As you will see, the same mechanism that helps en certain(a) security also helps create portability. Indeed Javas solution to these two problems is both elegant and efficient.Java Virtual Machine (JVM)Beyond the language there is the Java virtual machine. The Java virtual machine is an important part of the Java technology. The virtual machine can be embedded within a web browser or an operating system. Once a temporary hookup of Java mark is loaded onto a machine, it is verified. As part of the loading process, a class loader is take to taskd and does byt e code verification makes sure that the code thats has been generated by the pick upr will not corrupt the machine that its loaded on. Byte code verification takes place at the end of the compilation process to make sure that is all accurate and correctJava ArchitectureJava architecture provides a portable, robust, high performing environment for development. Java provides portability by compiling the byte codes for the Java Virtual Machine, which is then interpreted on each platform by the run-time environmentCompilation of codeWhen you compile the code, the Java compiler creates machine code (called byte code) for a hypothetical machine called Java Virtual Machine (JVM). The JVM is supposed to execute the byte code. The JVM is created for overcoming the issue of portability. The code is written and compiled for one machine and interpreted on all machines. This machine is called Java Virtual Machine.SimpleJava was designed to be easy for the Professional programmer to learn and to use effectively. If you are an experient C++ programmer, learning Java will be even easier. Because Java inherits the C/C++ syntax and many of the objects oriented features of C++. Most of the puzzling concepts from C++ are either left out of Java or implemented in a unobjectionableer, more approachable mannerObject-OrientedJava was not designed to be source-code compatible with any former(a) language. This allowed the Java team the freedom to design with a blank slate. oneness outcome of this was a clean usable, pragmatic approach to objects. The object model in Java is simple and easy to extend while simple types such as integers are unbroken as high-performance non-objects.RobustThe multi-platform environment of the Web places extraordinary demands on a program, because the program must execute reliably in a strain of systems. The ability to create robust programs was given a high priority in the design of Java. Java is strictly typed language it checks your code at compile time and run time. Java virtually eliminates the problems of memory management and de-allocation, which is completely automatic. In a well-written Java program, all run time errors can -and should -be managed by your program.SERVLETSIntroductionThe Java web horde is JavaSofts own web Server. The Java web server is just a part of a larger framework, mean to provide you not just with a web server, but also with tools. To build customized network servers for any Internet or Intranet client/server system. Servlets are to a web server, how applets are to the browser.About ServletsServlets provide a Java-based solution used to address the problems currently associated with doing server-side programming, including inextensible scripting solutions, platform-specific APIs, and incomplete interfaces.Servlets are objects that conform to a specific interface that can be plugged into a Java-based server. Servlets are to the server-side what applets are to the client-side object byte codes th at can be dynamically loaded off the net. They differ from applets in that they are faceless objects (without graphics or a GUI component). They serve as platform independent, dynamically loadable, pluggable helper byte code objects on the server side that can be used to dynamically extend server-side functionality.For example, an HTTP Servlets can be used to generate dynamic HTML content. When you use Servlets to do dynamic content you get the following advantagesTheyre faster and cleaner than CGI scriptsThey use a standard API (the Servlets API)They provide all the advantages of Java (run on a variety of servers without needing to be rewritten)There are many features of Servlets that make them easy and attractive to use.Easily configured using the GUI-based Admin toolCan be loaded and invoked from a topical anesthetic disk or remotely across the network.Can be linked together, or chained, so that one Servlets can call another Servlets, or several(prenominal) Servlets in sequence. Can be called dynamically from within HTML pages, using server-side include tags.Are secure even when downloading across the network, the Servlets security model and Servlets sandbox protect your system from unfriendly behavior.Advantages of the Servlet APIOne of the great advantages of the Servlet API is protocol independence. It assumes nothing aboutThe protocol being used to transmit on the netHow it is loadedThe server environment it will be running inFeatures of ServletsServlets are persistent. Servlet are loaded only by the web server and can have services between requests.Servlets are fast. Since Servlets only need to be loaded once, they offer much better performance over their CGI counterparts.Servlets are platform independent.Servlets are extensible. Java is a robust, object-oriented programming language, which easily can be extended to suit your needsInvoking ServletsA Servlet invoker is a Servlet that invokes the service method on a named Servlet. If the Servlet is no t loaded in the server, then the invoker first loads the Servlet (either from local disk or from the network) and the then invokes the service method. Also like applets, local Servlets in the server can be identified by just the class name. In other words, if a Servlet name is not absolute, it is treated as local.A client can invoke Servlets in the following waysThe client can ask for a document that is served by the Servlet.The client (browser) can invoke the Servlet airly using a URL, once it has been mapped using the Servlet Aliases section of the admin GUI.The Servlet can be invoked through server side include tags.The Servlet can be invoked by placing it in the Servlets/ directory.The Servlet can be invoked by using it in a filter chain.Java Database ConnectivityWhat Is JDBC?JDBC is a Java API for executing SQL statements. (As a point of interest, JDBC is a trademarked name and is not an acronym nevertheless, JDBC is often thought of as standing for Java Database Connectivity. It consists of a set of classes and interfaces written in the Java programming language. JDBC provides a standard API for tool/database developers and makes it possible to write database applications using a consummate(a) Java API.Using JDBC, it is easy to send SQL statements to virtually any relational database. One can write a single program using the JDBC API, and the program will be able to send SQL statements to the appropriate database. The combinations of Java and JDBC lets a programmer write it once and run it anywhere.What Does JDBC Do?Simply put, JDBC makes it possible to do three thingsEstablish a connection with a databaseSend SQL statementsProcess the results.JDBC versus ODBC and other APIsAt this point, Microsofts ODBC (Open Database Connectivity) API is that probably the most widely used programming interface for accessing relational databases. It offers the ability to connect to most all databases on almost all platforms.So why not just use ODBC from Java? The ans wer is that you can use ODBC from Java, but this is best done with the help of JDBC in the form of the JDBC-ODBC Bridge, which we will cover shortly. The question now becomes Why do you need JDBC? There are several answers to this questionODBC is not appropriate for direct use from Java because it uses a C interface. Calls from Java to native C code have a number of drawbacks in the security, implementation, robustness, and automatic portability of applications.A oral translation of the ODBC C API into a Java API would not be desirable. For example, Java has no pointers, and ODBC makes copious use of them, including the notoriously error-prone generic pointer repress *. You can think of JDBC as ODBC translated into an object-oriented interface that is natural for Java programmers.ODBC is hard to learn. It mixes simple and advanced features together, and it has complex options even for simple queries. JDBC, on the other hand, was designed to keep simple things simple while allowing more advanced capabilities where required.A Java API like JDBC is needed in order to enable a pure Java solution. When ODBC is used, the ODBC driver manager and drivers must be manually installed on every client machine. When the JDBC driver is written completely in Java, however, JDBC code is mechanically installable, portable, and secure on all Java platforms from network computers to mainframes.Two- stratum and three-tier ModelsThe JDBC API supports both two-tier and three-tier models for database access.In the two-tier model, a Java applet or application talks directly to the database. This requires a JDBC driver that can communicate with the particular database management system being accessed. A users SQL statements are delivered to the database, and the results of those statements are sent back to the user. The database may be located on another machine to which the user is connected via a network. This is referred to as a client/server configuration, with the users machine as the client, and the machine housing the database as the server. The network can be an Intranet, which, for example, connects employees within a corporation, or it can be the Internet.JAVAApplicationJDBCDBMSClient machineDBMS-proprietary protocolDatabase serverJava applet orHtml browserApplicationServer (Java)JDBCDBMSClient machine (GUI)HTTP, RMI, or CORBA callsServer machine (business Logic)DBMS-proprietary protocolDatabase serverIn the three-tier model, commands are sent to a warmness tier of services, which then send SQL statements to the database. The database processes the SQL statements and sends the results back to the middle tier, which then sends them to the user. MIS directors find the three-tier model very attractive because the middle tier makes it possible to maintain control over access and the kinds of updates that can be made to corporate data. Another advantage is that when there is a middle tier, the user can employ an easy-to-use higher-level API which is tran slated by the middle tier into the appropriate low-level calls. Finally, in many cases the three-tier architecture can provide performance advantages.Until now the middle tier has typically been written in languages such as C or C++, which offer fast performance. However, with the introduction of optimizing compilers that translate Java byte code into efficient machine-specific code, it is becoming practical to implement the middle tier in Java. This is a big gain, making it possible to take advantage of Javas robustness, multithreading, and security features. JDBC is important to allow database access from a Java middle tier.JDBC Driver TypesThe JDBC drivers that we are aware of at this time fit into one of four categoriesJDBC-ODBC bridge plus ODBC driverNative-API partly-Java driverJDBC-Net pure Java driverNative-protocol pure Java driver

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.