Saturday, August 14, 2010

Java And Internet


Why java is important to the Internet

The Internet helped catapult java to the forefront of programming, and java, in turn, has had a profound effect on the Internet. The reason for this is quite simple: Java expands the universe of objects that can move about freely in cyberspace. In a network, two very broad categories of objects are transmitted between the server and your personal computer: passive information and dynamic, active programs. For example, when you read your e-mail, you are viewing passive data. Even when you download a program, the program’s code is still only passive data. Even when you download a second type of object can be transmitted to your computer: a dynamic, self-executing program. Such a program is and the server yet initiates active agent on the client computer. For example, the server to display properly the data that the server is sending might provide a program.

As desirable as dynamic, networked programs are, they also present serious problems in the areas of security and portability. Prior to java, cyberspace was effectively closed to half the entities that now live there, as you will see, java addresses those concerns and, by doing so, has opened the door to an exciting new form of program: the applet.

Java Applets and Applications

Java can be used to create two types of programs: applications and applets. An application is a program that runs on your computer, under the operating system of that computer. That is , an application created by java is more or less like one created using C or C++. When used to create applications, java is a not much different from any other computer language. Rather, it is java’s ability to create applets that makes it important. 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, dynamically downloaded across the network, just like an image, sound file, or video clip. The important difference is that an applet is an intelligent program, not just and animation or media file. In other words, and applet is a program that can react to user input and dynamically change not just run the same animation or sound over and over.

Security

As you are likely aware, every time that you download a “normal ” program, you are risking a viral infection. Prior to java, most users did not download executable programs frequently, and those who did scanned them for viruses prior to execution. Even so, most users still worried about the possibility of infection their systems with a virus. In addition to viruses, another type of maillicious program exists that must be guarded against. This type of program can gather private information, such as credit card numbers, bank account balances, and passwords, by searching the contents of your computer’s local file system, java answer both of these concerns by providing a “firewall” between a networked application and your computer.

Portability

Many types of computers and operating systems are in use throughout the world - and many are connected to the Internet. For programs to be dynamically downloaded to all the various types of platforms connected to the Internet, some means of generating portable executable code is needed. As you will soon see, the same mechanism that helps ensure security also helps create portability. Indeed, java’s solution to these two problems is both elegant and efficient.

Friday, August 13, 2010

Java Platform, Enterprise Edition


Java Platform, Enterprise Edition (Java EE) 6 is the industry standard for enterprise Java computing. Utilize the new, lightweight Java EE 6 Web Profile to create next-generation web applications, and the full power of the Java EE 6 platform for enterprise applications. Developers will benefit from productivity improvements with more annotations, more POJOs, simplified packaging, and less XML configuration.

Thursday, August 12, 2010

Computer Education: Programming In C++

Computer Education: Programming In C++: "Probably the best way to start learning a programming language is by writing a program. Therefore, here is our first program: // my fir..."

Computer Education: Importance Of Java Programming

Computer Education: Importance Of Java Programming: "Java is a programming language distinct from the markup scheme for defining hypertext, the Hypertext Markup Language (HTML). Java doesn..."

Importance Of Java Programming


Java is a programming language distinct from the markup scheme for defining hypertext, the Hypertext Markup Language (HTML). Java doesn't compete with or replace HTML, nor does it negate the work done creating content using HTML for the Web.

When it was released in the spring of 1995 by Sun Microsystems, Java unleashed a level of interactivity on the Web that had never been possible before. Java makes the Web interactive.

Java connects with HTML and the Web through a special HTML element called APPLET, which allows developers to include Java programs called applets on Web pages. These applets are essentially software programs that the user's browser downloads (automatically, as part of Web page observation) and executes. With real-time graphical input and output possible through the applet on the page, Java thus opens windows to into richer levels of interactivity and visualization.

What is the Big Deal About Java?

Prior to 1995, people and organizations had been using webs of hypermedia on the World Wide Web to communicate globally and instantly. But something was missing. The often intriguing, informative, and useful Web content was devoid of much interactivity. Some users felt that the hyperlinks on the Web just kept leading them on, until ultimately, the Web seemed like a road to nowhere: with no there there. Java potentially changes this.

Java enables developers to create content that can be delivered to and run by users on their computers. This content is in the form of software that can support anything that programmers can dream up: spreadsheets, tutorials, animations, and interactive games. With the Web page as the delivery platform, this software can support a variety of information tasks with true interactivity: for example, users can get continuous, instantaneous feedback for applications in visualization, animation and computation. Users of the Web in Java age may indeed find a there on the Web: a place to play, work, or learn.

Who is Using Java?

Many companies have made a decision to use Java as the language for their software development. As the first interactive language for the Web content, Java got a good head-start, resulting in a good base of experience and skills among programmers. With Sun Microsystems' committment to Java, it looks like Java is a good choice for Internet content development.

My Opinion of Java

I was very excited about Java when it was released in the spring of 1995. I spent the summer of 1995 writing the first published Java book and, in it, I was enthusiastic with my first experience of Java. I saw so much potential.

Yet today, I see results with Java that are far, far less than what I had imagined. More than two years from its invention (two years is aeons in Internet time), Java really isn't used as extensively as I thought it would be. I think the reasons for this lie not in the language--it is actually a very good language. Instead, I think these issues have held Java back:

  1. Web developer's attention was scattered during the period 1995-1996 with many new technologies (Shockwave, JavaScript [JavaScript has nothing to do with Java], ActiveX) that all seemed to promise a richer and more interactive Web. The tragedy of the JavaScript name, for example, lulled (and still lulls) many Web developers to squander their skills on buggy, non-standard, JavaScript code on HTML pages.
  2. Many Web developer's lack the skills to create useful interactivity in Web pages. Java is a software language--it is not something that a person can pick up as easily as HTML. Java requires a solid understanding of object-oriented development methodologies and implementation practices, besides good software engineering skills. And since Java is used to create interactivity on Web pages, developers need to know about human-computer interface design. And since Java can be used to mediated human communication (in groupware, for example), developers should understanding computer-mediated communication issues. What this means is that someone who wants to do serious Java development should be a specialist. Amateur users can learn Java in 14 days and create "toy" applets, but the level of their work would be far below the power and potential of Java itself. My feeling is that it is a tragedy that few people realize this distinction and instead dink around with silly animations and toy applets on their pages and believe they are creating "interactive content."
  3. Java class libraries are just coming into existence. The raw Java Developer's Toolkit that Sun provides for free shouldn't be the basis for serious Java development--this is like starting to build a car using molten metal, plastic, and glass to create the screws, parts, and mechanisms that will make up the components. Instead, Java developers need to stand on the shoulders of giants and start building serious, complex applications using components and subsystems, not raw materials.

I think in the long run, Java is a good choice for development. I think the advances in Java compilation and run-time support in the latest versions of Web browsers should support a more pleasing experience for users of Java applets. I think that, in several years, developers may eventually grasp the importance of Java as a bridge of human communication online. I think then we'll begin to see the potential of Java.

Tuesday, August 10, 2010

Java Script Language


Overview

This document is an introduction to the JavaScript Programming Language for professional programmers. It is a small language, so if you are familiar with other languages, then this won't be too demanding.

JavaScript is not Java. They are two very different languages. JavaScript is not a subset of Java. It is not interpreted Java. (Java is interpreted Java!) JavaScript shares C-family syntax with Java, but at a deeper level it shows greater similarity to the languages Scheme and Self. It is a small language, but it is also a suprisingly powerful and expressive language.You should take a look at it. You will find that it is not a toy language, but a full programming language with many distinctive properties.

JavaScript is a regular language which won't take much time to learn. It is better suited to some tasks, such as client programming, than Java is. In my own practice, I have found that working with JavaScript has made me a better Java programmer because it introduced me to a useful set of dynamic techniques.

When JavaScript was first introduced, I dismissed it as being not worth my attention. Much later, I took another look at it and discovered that hidden in the browser was an excellent programming language. My initial attitudes were based on the initial positioning of JavaScript by Sun and Netscape. They made many misstatements about JavaScript in order to avoid positioning JavaScript as a competitor to Java. Those misstatements continue to echo in the scores of badly written JavaScript books aimed at the dummies and amateurs market.

History

JavaScript was developed by Brendan Eich at Netscape as the in-page scripting language for Navigator 2. It is a remarkably expressive dynamic programming language. Because of its linkage to web browsers, it instantly became massively popular. It never got a trial period in which it could be corrected and polished based on actual use. The language is powerful and flawed.

This document describes ECMAScript Edition 3 (aka JavaScript 1.5). Microsoft and Netscape are developing a static revision which does not correct the language's flaws. That new language is not JavaScript and is beyond the scope of this document.

JavaScript is THE scripting language of the Web.

JavaScript is used in millions of Web pages to add functionality, validate forms, detect browsers, and much more.







Java Applet Programming


History

  • It was originally called Oak, developed by SUN Microsystems, in a project called FirstPerson for smart appliances, such as set-top-box (interactive TV) 1992, lead by James Gosling.
  • It adopted C++ syntax but get rid of pointer, memory management, and multiple inheritance, which are main causes of programming errors.
  • It failed to be adopted by Timer Warner in Spring 93's ITV trial.
  • 1993 Marc Andreesen developed Mosaic Web Browser, started the web revolution.
  • Oak found its reason for existence. A Web browser called WebRunner was developed for demonstration.
  • January 1995, Sun adopted Java name due to trademark issue.
  • Marc Andreesen saw the demo and license it for use in its browser.
  • Nov. 1995, 1st Beta release with developer kit and source code.

What is Java Applet

  • Java is a general purpose programming language.
  • A Java program is created as a text file with .java extension.
  • It is compiled into one or more files of bytecodes with .class extension.
  • Bytecodes are a set of instructions similar to machine code of a specific machine but it can be run on any machine that has a Java Virtual Machine (JVM). JVM interprets bytecodes.
  • JVM was first implemented on Sparc/Solaris and PC/Win32. Now ported to many other platforms.
  • Java applets are Java programs that are retrieved and executed by web browsers through the JVM under tight secure environment.
  • Web browsers retrieve Java applets according to following tags in the web pages:

  • deprecated or the new more general,

    height=500>

  • are used to specify parameters for the applet. For example,
    -- the height (in pixels) of the tallest frame
    -- the directory that has the animation frames (gif, jpg)
  • All other types of java programs are called Java applications.
  • Examples:
  • Network Restoration Applet: User specifies two end node of a failed link. The applet retrieves the simulation results of two network restoration algorithms (twoprong and rreact) in two corresponding files at original web server site, and plot the results.
  • SUN Java demos:
    • MoleculeViewer
    • SimpleGraph
    • SortDemo
    • BarChart
    • Animator
    • JumpingBo