Java reinstallation and web "Mixed wine modulation"

Source: Internet
Author: User
Tags netbeans

Sun's javafx is a script that uses the existing Java language, Java 2D, and Java Web Start technologies in a simple way to implement the Web rich client interface.

A long time ago, when the Internet was still quite young, Java was so popular that Fortune magazine named Scott mcnealy (Chairman of Sun's Board of Directors and Chairman of Sun's Federal Company, he is the co-founder of sun. He is named as a cover character and dressed as a superhero and named "Java Man. Java's cross-platform capabilities shocked the computer world and became the default programming language in the computer world.

Although Java has achieved great success in education, scientific computing, and server, it has not been so successful in desktop applications. In addition, Java applets that can be embedded in any Web site cannot match the flash with a smooth animation and high graphic fidelity. Microsoft's dynamic HTML, which was once pushed by Microsoft, and the Ajax that was revived later, gradually removed the advantages of Java Applet in the Web field.

Now 11 years later, Sun wants to win back his users. However, it seems that this task has become much more difficult because Adobe not only has air, but also flex and flash. Flash is released to 10th versions separately, and has more features than previous versions. This is just Adobe. In addition, Microsoft's Silverlight and apple are still promoting the development of QuickTime. In addition, Ajax technology is not small. The competition between them is fierce, and everyone wants to become a technology that takes an absolute advantage to meet the increasing requirements on the taste of animation.
Install Java

Sun is now better prepared for the battle. Sun now has a wide range of libraries for animation production, including Java 2D, which is very popular. Java 2D was developed with Adobe and imitates the computing structure of postscript. Some people say that in Web Animation, Flash is better than Java Applet because Flash provides a smooth anti-aliasing algorithm. If Java 2D APIs are insufficient, a large number of open source libraries will be developed for developers.

Now it seems that sun is indeed better prepared for the battle than before, but the question left to Sun is how to solve the old wine in a new bottle. Although the tool has been prepared for the Web artist designer, the Web artist designer is not ready for how to use the tool. Some Web art designers can write Flash scripts, but they still have little effort to use pure Java. Therefore, sun needs to create a new language and hopes that web developers will like it and use the new compiler to convert it into bytecode and run it on the Java Virtual Machine.

Sun indeed launched the new language javafx. I have spent a few days experimenting with the new language. I come to the conclusion that the success or failure of javafx mainly depends on the user experience. The new syntax hides some annoying syntax restrictions in Java, and satisfies the maximum scope of requirements, making it easier for users to use and ignoring some punctuation marks. The design details about color and layout are mixed in the code, and the written code is a mixture of CSS, HTML, and JavaScript. The new language has many built-in functions to process the most common tasks, such as loading remote files.

The convenience of using this language comes at a cost: You need to learn a new language and remember another way to form a web application. The old keyword "Void" is rewritten as "Void", and "V" must be capitalized. However, the definition of these keywords is automatically obtained from the function without explicit typing, this is quite convenient. In addition, there are some good syntaxes.

After some experiments, I found that I couldn't stand it in some ways. I began to ask myself why Sun didn't use groovy and used some concise languages to design Java rich Web client programs? Or use JavaScript? There are many clever hooks between the Javascript layer in the browser and the javafx applet. Or use the original Java? I used to think that for Java programmers, some XML or properties files that can be expressed in Java cannot be expressed, but it is wise to know whether a new language is a wise thing.

Java Web "mixed liquor modulation"

Soon, I gradually liked this syntax. The biggest benefit is that everything is stored in a file. The layout objects, styles, and animation effects are all mixed together. No need to differentiate CSS, HTML, and JavaScript files. In fact, it is not advocated to mix all files into one file. Many mechanisms encourage programmers to divide the project into modules.

Is hybrid a bad thing? Some programmers who like to strictly divide functions (such as models, views, and controls) feel that this is simply an unreasonable move. It is easier to divide files into different parts for management. By mixing all the files together and placing them in a javafx file, it is not easy to give CSS files to designers, and JavaScript files to Ajax programmers. That's right. However, such a high degree of integration facilitates page scheduling of different files, giving some Div an ID, then giving this ID some styles and setting how the ID acts. If the code is not that complex, why not mix them together? Designers can bypass programmers to cut and paste enough code. In this way, file separation is not a problem.

This debate is unnecessary if the desired language has its own way to complete the separation work. The program skin is put into the CSS file by the artist designer, while the programmer can focus on writing scripts. For artists, I guess javafx is easier to use than JavaScript and other languages. I certainly have a lot of arguments about how to properly organize applications.

Sun spent a lot of energy adding the javafx tool to the netbean integrated development environment. The easiest way to check whether javafx is added to these platforms is to download the netbean source code. In the integrated development environment of netbean, plug-ins from Adobe, such as Illustrator, Photoshop, and Flash can also be used to create images. In my opinion, there is a possibility that an artist who is brave enough to try can choose a favorite tool in netbeans to create a beautiful work in netbeans. However, for general art designers, they still need some help, because the javafx syntax has many options, which are ubiquitous and confusing. Only programmers can come up with the definition of adding the if-then statement to a string, such:

VaR S = "the world is {If (date> 1492)" round "else" flat "}.";

The satisfactory result is that we can discard the if-then Syntax of Java in the arc, because we can use it elsewhere.

Art Designers don't need to deal with these complex syntaxes, because simple syntaxes are enough to do a lot of things. They don't need to think about these puzzling things in string definitions.

Param Singh, Senior Marketing Manager of javafx, told me Sun wants early javafx users to be Java developers and skilled art designers.

Singh said that the visualization tools prepared for the artist and the tools for developing javafx applications for mobile phones will soon be released together, and that there will certainly be those tools in some IDE, therefore, you also need to be familiar with this IDE."

I was thinking that these tools would be free or at least much cheaper than Adobe tools. Programmers will benefit from the open-source revolution and have a large number of free tools available. If javafx is much cheaper than Adobe tools, it can attract young developers.

I don't know if this is enough for javafx to win a large market share from flash, air and other tools. Programmers have their own hobbies. In any case, this action allows Java developers to perform some new tasks, so that Java has a larger scope of use. Developers who have compiled a large number of Java code can easily master javafx.

How does Java cope with old competitors?

I think the most common javafx users will be scientific and financial programmers who need to make the system interface beautiful. Any Java function library can be integrated into the javafx application, which makes the application have a very smart background with multiple computing functions after it has a beautiful graphic interface. I cannot imagine how such an application can be completed using flash-based ActionScript. Currently, developers do not need these tools to complete large projects.

Javafx can also be used as a better deployment option. For example, a programmer shows how to integrate javafx code into the drag-and-drop model. These codes will be directly deployed through Java Web Start. For a company, javafx is a very good deployment model and a free open-source project. Javafx can effectively replace swing and give Java developers an opportunity to build their own user interfaces, using them like HTML components instead of using swing. Javafx is not only used to make web pages more animated, but also a good mechanism for deploying desktop applications.

I think art designers will also be satisfied with Sun's work on java over the years. The Java Virtual Machine is updated very quickly. Due to the Server installation requirements, the installation on the server is changed from a mouse shape to an hourglass, which is more user-friendly. Java library functions are also rich and well checked to prevent potential security vulnerabilities. In addition, the latest Java virtual machine has been installed on a computer of 0.8 billion users. The javafx environment is ready.

However, it may not be easy to promote it. Adobe has developed good tools for flash and air, but it has also invested heavily in creating these tools. Javafx may be attractive to some young designers who do not have enough money to buy Adobe software sets.

However, it may be difficult to block the success of javafx. Will flash, Silverlight or other technologies be replaced in the future? At least not now. However, although Java still lacks improvements in the interface and distribution methods, javafx will win some loyal fans and places, this will allow Java to gain a foothold in desktop applications.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.