Home  >  Article  >  Web Front-end  >  JavaScript is not just a script_javascript tips

JavaScript is not just a script_javascript tips

WBOY
WBOYOriginal
2016-05-16 19:12:551168browse
In this technical forum, I will write about JS in my opinion. hoho

JavaScript seems to have always been regarded as an analytical scripting language, and program developers often ignore it. I don't think a script is too difficult. It seems to be something specially designed for people who don't understand programming, and it's not worth the research and application of real developers.

From LiveScript to JavaScript, most of the time JS is only used as a Script. More developers only use front-end form validation, web page special effects such as application floating, moving, drop-down linkage menus, or things that must be obtained through the interface, such as client time, resolution, and some events operating in the current window. Only then can it be used. So JavaScript has become a web page special effects language, specially used to add various cool effects to the page. It seems that JS can only do flashy interface effects, and users can even block it at any time. Some browser toolbars automatically block JavaScript...

Programmers do not pay attention to JavaScript, which directly leads to JavaScript being ignored. ; And a large number of Internet special effects applications have accelerated JS to be regarded as a kind of script. It wasn't until Jesse James Garrett put JavaScript XMLhttp DOM together and formally proposed Ajax that JavaScript suddenly became very popular. Coupled with the large number of applications of Ajax by large companies such as Google, Yahoo, and Microsoft, JavaScript is receiving more and more attention along with Ajax.

Ajax is a technology combination of old wine in a new bottle. In other words, Ajax is not a technology, but a concept. But it is this concept that can bring innovation to Internet applications that has generated strong interest in everyone. The reason is not only the technology combination itself, but also the development trend of Internet application technology models. The development trend of RIA requires new technologies and methods to cooperate. At this stage, Ajax just meets some of the development requirements of rich Internet applications, and reusing and positioning JavaScript will be a better choice to implement RIA. The real core of Ajax (or the best current rich Internet technology application) should be JavaScript. The current trend is to use JavaScript, a programming language, to reconstruct web pages and use JavaScript to format data. XMLhttp is a bridge and protocol for transmitting data, similar to the original GET and POST, and XMLhttp serves JavaScript very well.

In fact, JavaScript is like the most misunderstood language in the world (http://www.crockford.com/javascript/javascript.html). JavaScript is described by the number of users in the world. One of the most popular programming languages, except that the suffix is ​​-script, which makes people suspicious, it also has various calculations, process control, arrays, and functions. It is also very similar to Java, C, etc.

Of course programmers will say that JavaScript cannot operate text (it is not safe to operate locally), cannot generate images, has no object orientation, no classes, no inheritance, cannot debug, and cannot transmit data through the network. Therefore, JavaScript is not a programming language in the true sense. So JavaScript is ignored as a script used only in page design. However, when you see object-oriented JS applications like JSON, JS collections, 3D graphics, classes and inheritance in Prototype, plus XMLhttp asynchronously transmitting network data, can you still say that JavaScript is just a simple script?

A few years ago, a prophet pointed out that JavaScript is the most misunderstood language in the world. Fortunately, today we have realized the importance of JS and will not continue to misunderstand it.

See posts like
http://www.netvibes.com/
http://developer.yahoo.com/yui/
http://www.backbase.com/
http://www.meebo.com/
http://www.miniajax .com/
http://www.protopage.com/

http://www.google.com/
http://www.a9.com/
http://www.live.com/
http://www.snap.com /
http//www.ask.com/
http://dojotoolkit.org/
http://www.ask.com/

When these applications are used, JavaScript will not just be regarded as a scripting language. JavaScript has an object-oriented concept and can also inherit classes and throw exceptions. It is precisely because of these that Ajax frameworks are emerging one after another and are so popular. Program developers have realized the importance of the JavaScript language and the changes it has brought to web development after re-recognizing it. For both front-end and back-end developers, JavaScript is not just what it used to be - just simple. script.

In a project, especially a web development project, JavaScript is almost an indispensable language. It does not require a compiler or a specialized parser. As long as there is a browser on the client machine, as long as the open source JavaScript engine is added to the browser (almost all browsers support it, all computers have browsers), JavaScript will be easy to use whether it is a computer or a mobile phone. Well supported.

Using JavaScript has at least the following benefits:
1. Increase interactive dynamic applications, enrich interface applications, and improve user experience
2. Save background development costs and reduce the amount of background development. Display HTML/XHTML and formatted data are handled by JS
3, which saves network bandwidth, makes browsing faster, and reduces server pressure. XMLhttp reduces data refresh
4, which is a powerful tool for RIA and B/S modes. The effect of C/S mode can be achieved through JS
5, the best interface implementer for WEB version software, Flash and Applet are also good, but currently JavaScript is the best
6,...

Although browser compatibility or users blocking JS is a headache, most browsers are following the ECMAScript1.5 standard. Most users will not disable JS because it is almost difficult to use the Internet with JS turned off. thing.

Although there are disadvantages such as security, development and maintenance costs, etc., if JavaScript is well combined with the backend, JavaScript will be a very important language for web development, even as important as in Java. Nowadays, more and more websites use Java and PHP as the backend, and then effectively combine it with JavaScript to process and display pages. In this way, it will be possible to enrich Internet applications and improve user experience.

After being ignored by programmers for so long, JavaScript finally ushered in the spring in the footsteps of RIA. In any case, it will be an inevitable trend for software programs to move from the desktop to the Internet and to the browser. It’s not that we want to replace desktop applications, but there are too many ways to go to enrich Internet applications.

Among them, the background of desktop and Internet applications is very similar, and Java, C, C#, etc. can be used. At the front end, in Internet software applications, JavaScript will play the role of an interface development programming language.

After all, JavaScript is no longer just a script, but an object-oriented programming language. Of course, in order to truly make good use of the JavaScript language, it is essential to be proficient in a backend language, and only in this way will JavaScript be more than just a script.

Here I have talked a lot about the positive aspects of JavaScript. Of course, JS still has problems of one kind or another, but I think the development of RIA is a trend, the B/S model is also a trend, and JavaScript is still developing forward. (New versions are also being studied). I believe that with more and more interactive applications between users and websites and between users such as WEB2.0, and as network bandwidth becomes faster and faster, RIA will have a good development, and JavaScript is in RIA will also play an increasingly important role.
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn