Home > Article > Web Front-end > What you need to know about JavsScript? _Basic knowledge
What can JavsScript do? JavaScript can do client-side data verification and processing, data interaction with the server (AJAX), interface function enhancement, beautification, etc. It seems that JavaScript can only do page or script-related processing. is that so?
If we break out of our current fixed perspective on the application of JavaScript, we can separate it and only look at the essence of JavaScript. There may be new enlightening discoveries.
Maybe we can redefine the JavaScript language like this - it is an object-oriented programming language with ECMAScript as the syntax specification.
Of course, JavaScript itself has two unique objects-BOM and DOM objects. Using these two objects, we can complete a series of processes.
We know that C# is also an object-oriented language. C# itself does not contain a class library. It completes its work through a general execution engine and a rich class library provided by Visual Studio. Without the class library, C# may not have any use value.
If JavaScript also has a rich class library similar to C#, what can JavaScript do? ——Port communication, hardware management, stronger multimedia control, and freer resource calling. Maybe this is what many JavaScript programmers dream of, but is it possible?
I say yes! How to achieve it? To realize these functions, you definitely need an execution engine like a C# calling class library. Fortunately, many programs themselves can be regarded as such engines. A feasible way is to use C# to complete the work processing program. JavaScript tells C# when and how to work, just as C# itself defines it. And fortunately, JavaScript tells C# how to work, and the ability to interact with JavaScript can be provided by C# (Dnew.cn Note: See address: http://www.dnew.cn/post/257.htm) to solve. This is what we call using the language itself as an execution engine. Many languages provide this capability such as Flash (see: http://www.dnew.cn/post/239.htm) and so on.
Perhaps from a higher perspective, this method is just an interactive application, but with this application, our creativity may have a pair of wings to fly freely. JavaScript can do a lot!