In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly explains "the characteristics of Javascript and what encapsulation means". The explanation content in this article is simple and clear, easy to learn and understand. Please follow the ideas of Xiaobian to study and learn "the characteristics of Javascript and what encapsulation means" together.
What does JS mean?
Javascript is abbreviated as js, js is a scripting language that does not need to be compiled, is also part of the browser, often used in web client scripting language, mainly used to add dynamic features to html.
What does JS do?
In general, html pages are mainly used for the display of static content, but in practice, pages are rarely static, and now websites have some forms and slides, which are all interactive using js. In fact, there are some languages that can be written in scripts, which are actually js.
JS is mainly web development, you can add a variety of dynamic effects to the website, make the page more beautiful.
Components of JS
JS consists of three parts, including the basic syntax and document object model, and the browser object model.
Features of Javascript
1.js is object-oriented, we can create objects and use existing objects.
2.js is a scripting language that can be executed without compilation, and is interpreted directly at run time.
3.js does not require any operating system, as long as there is browser support, and supports multiple browsers at the same time.
4.js does not require any data types, and the way it uses them is weakly typed.
What does Js encapsulation mean?
Is it like the plug-in on the Internet, can you call it at any time after writing it?
What are the benefits of encapsulation? Know a little, easy to modify, reduce workload. What are the additional benefits?
Encapsulation is such an intuitive word is not easy to understand, put a bunch of things packaged ah, external interface can be used.
Code will be less, reuse will improve, but it may not have been modified. Too many encapsulation methods will increase the code reuse rate, but the whole system will be affected by one hair, and the code coupling will also increase. So package code moderately!
Encapsulation is to make a fragmented thing into a component. A very simple analogy, some people do not need a computer chassis, motherboard memory card power supply are exposed outside, he thinks this is very good, can dissipate heat. But most people still wrap all their hardware in cases. Advantages: First, it is easy to use everywhere; second, there is a complete inclusion of internal components; third, everything is packaged, leaving only a few interfaces, usb, display, audio interface, etc., which makes it more convenient for users and clearer for maintainers.
The concept of encapsulation is a bit broad, remember one on the line, encapsulation is to improve the independence and reuse of a single function or module. Any effort toward this goal is in encapsulating the code.
Direct introduction, direct call, use, only need to modify the parameters can achieve the effect.
Disadvantages, generally encapsulated deep, if not given and instructions, or some guidance of what, two open almost impossible. Most open source plug-ins feature basic features and are estimated to cost a fee for personalization. That is, object-oriented packaging the same function into a function appropriately, leaving only the corresponding interface, so that the same function can be reused by calling different parameters.
Thank you for reading, the above is the "Javascript characteristics and encapsulation is what means" content, after the study of this article, I believe we have a deeper understanding of Javascript characteristics and encapsulation is what this problem means, the specific use of the situation also needs to be verified by practice. Here is, Xiaobian will push more articles related to knowledge points for everyone, welcome to pay attention!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.