Javascript is not a framework or a library, but a scripting language. JavaScript, referred to as js, is a lightweight, interpreted or just-in-time compiled scripting language with function priority. It is a programming language widely used on the client. It is often used to add a variety of dynamic functions to web pages. Provide users with a smoother and more beautiful browsing effect; and the Javascript framework (library) refers to the programming framework (library) based on the Javascript language.
The operating environment of this tutorial: windows7 system, javascript version 1.8.5, Dell G3 computer.
Javascript is not a framework or a library, but a scripting language.
JavaScript language introduction
JavaScript ("JS" for short) is a lightweight, interpreted language with function priority. Or a just-in-time compiled scripting language. Although it is famous as a scripting language for developing Web pages, it is also used in many non-browser environments. JavaScript is based on prototype programming, a multi-paradigm dynamic scripting language, and supports object-oriented, imperative, declarative, and functional programming paradigm.
JavaScript is a dynamically typed, weakly typed, prototype-based language. Its interpreter is called the JavaScript engine, which is part of the browser and is widely used in client-side scripting languages. It was first used on HTML web pages to add dynamic functions to HTML web pages.
JavaScript is a network scripting language that has been widely used in Web application development. It is often used to add various dynamic functions to web pages to provide users with smoother and more beautiful browsing effects. Usually JavaScript scripts realize their functions by embedding them in HTML.
JavaScript is a cross-platform interpreted language that does not require pre-compilation and can run under various operating systems.
The JavaScript script language does not depend on the operating system and only requires browser support. Therefore, a JavaScript script can be used on any machine after being written, provided that the browser on the machine supports the JavaScript script language. JavaScript has been supported by most browsers, so it can run on a variety of platforms (such as Windows, Linux, Mac, Android, iOS, etc.).
Simply put, JavaScript depends on the browser itself and has nothing to do with the operating environment. As long as the computer can run the browser and the browser supports JavaScript, it can be executed correctly. But different browsers and different versions of the same browser support JavaScript differently (browser compatibility).
Unlike server-side scripting languages, such as PHP and ASP, JavaScript is mainly used as a client-side scripting language to run on the user's browser and does not require server support. Therefore, in the early days, programmers preferred JavaScript to reduce the burden on the server, but at the same time it also brought about another problem, security.
JavaScript can be used in various fields of Web development, such as:
Web application development: The web pages we browse in daily life are composed of HTML, It is composed of CSS and JavaScript. Through JavaScript, the styles of elements in the web page can be updated in real time, and the interaction between people and the web page can be realized (such as monitoring whether the user clicks the mouse or presses a certain button, etc.), and can also Add some cool animations;
Mobile application development: In addition to web application development, JavaScript can also be used to develop applications on mobile phones or tablets, and we can also Make development easier with the help of some excellent frameworks (such as React Native);
Web games: Those small games we have played on the web can all be implemented using JavaScript;
Back-end Web application development: In the past, we used JavaScript to develop the front-end part of Web applications, but with the emergence of Node.JS (a JavaScript runtime environment), JavaScript It can also be used to develop the back-end portion of web applications.
JavaScript framework
Javascript framework refers to a programming framework based on the Javascript language.
JavaScript frameworks are now being integrated into their own web and mobile applications.
The development direction of software is shifting towards the client. Building back-end APIs and rich front-end clients is a big trend, and most of these are written in JavaScript frameworks. This seems to be a trick the developers are using. If you use the API when developing the front-end interface, you will be more familiar with the API and you will have a clear understanding of your work content. Applying this technology to writing clients makes it very easy to write top-notch iPhone or Android applications.
Before the advent of JavaScript frameworks, developers could only perform jQuery operations on the page. This approach can easily cause confusion for developers about coding operations, and is not easy to manage. Backbone was the original frontrunner, providing a basic structure and organization alongside developer-friendly frameworks such as Angular and Ember. Nowadays, it has been favored by many projects. We often overlook the professional background of developers, which may lead them to discover a popular framework that feels very intuitive and makes the JavaScript framework easier to understand.
Purpose of JavaScript framework:
Building a website
-
Application front-end development
Application backend development
Application hybrid development
E-commerce application
Build modular scripts such as Node.js
Update the DOM manually
Automatically using templates and two-way binding Perform repetitive tasks
Develop video games
Create image carousels
Test code and Debugging
Module combination
Common javascript frameworks (libraries) include:
1. Front-end UI framework
1. Bootstrap framework, which comes from Twitter, is currently the most popular front-end framework. It has the characteristics of simple and intuitive front-end development.
2. EasyUI framework. EasyUI is a collection of user interface plug-ins based on jQuery, Angular., Vue and React. By using easyui, you don't need to write a lot of code. You only need to write some simple HTML tags to define the user interface.
...
two. Front-end framework
1, Node.js framework. Node.js is an event-driven I/O server-side JavaScript environment based on Google's V8 engine. The V8 engine executes Javascript very quickly and has very good performance.
2. Vue.js framework. Vue.js is a very popular JavaScript MVVM library at the moment. It is built with data-driven and component-based ideas. Compared with Angular.js, Vue.js provides a simpler and easier-to-understand API.
3. React framework. React originated from Facebook's internal project and was used to build the Instagram website. It is a JAVASCRIPT library used to build user interfaces.
4. Angular.Js framework. The angular.Js framework is an excellent front-end JS framework that has been used in many Google products. AngularJS has many features, the most core of which are: MVC (Model–view–controller), modularization, automated two-way data binding, and semantic tags.
5. Gatsby
Gatsby can help you develop websites and applications with good performance using React. This is an open source and free front-end JS framework.
...
Expand your knowledge:Some useful JavaScript tools
-
Slick
Slick is a useful JS tool for your carousel needs. Its containers are responsive and scalable. Its features include CSS3 support, sliding, mouse dragging, full accessibility, infinite loop, autoplay, lazy loading, and more.
-
Babel
Babel is a free and open source JS compiler that can be used to convert new JS features to run older JS standards. The plugin is also used for syntax conversions not supported by older versions. It provides polyfills to support missing functionality in some JS environments.
-
iziModal
iziModal is an elegant, lightweight, flexible and responsive modal plugin for use with jQuery. It is useful to use pop-ups to notify the user of certain information or to ask for information. It's easy to use and has many customizations.
-
ESLint
Using ESLint it is easy to find errors and fix them in JS code. It statistically analyzes code to quickly catch syntax errors, command line style issues, etc. and fix them automatically.
-
Shave
Shave is a zero-dependency JS plugin that allows you to truncate text inside an HTML element by setting a maximum height so that it fits exactly within the element. It also stores some extra original text in the hidden element to ensure you don't lose it.
-
Webpack
Webpack is a tool for bundling JS modules for modern applications. You can write code and use it to bundle assets sensibly while keeping your code clean.
[Related recommendations: javascript video tutorial, programming video】
The above is the detailed content of Is javascript a framework or a library?. For more information, please follow other related articles on the PHP Chinese website!

React is a JavaScript library for building modern front-end applications. 1. It uses componentized and virtual DOM to optimize performance. 2. Components use JSX to define, state and attributes to manage data. 3. Hooks simplify life cycle management. 4. Use ContextAPI to manage global status. 5. Common errors require debugging status updates and life cycles. 6. Optimization techniques include Memoization, code splitting and virtual scrolling.

React's future will focus on the ultimate in component development, performance optimization and deep integration with other technology stacks. 1) React will further simplify the creation and management of components and promote the ultimate in component development. 2) Performance optimization will become the focus, especially in large applications. 3) React will be deeply integrated with technologies such as GraphQL and TypeScript to improve the development experience.

React is a JavaScript library for building user interfaces. Its core idea is to build UI through componentization. 1. Components are the basic unit of React, encapsulating UI logic and styles. 2. Virtual DOM and state management are the key to component work, and state is updated through setState. 3. The life cycle includes three stages: mount, update and uninstall. The performance can be optimized using reasonably. 4. Use useState and ContextAPI to manage state, improve component reusability and global state management. 5. Common errors include improper status updates and performance issues, which can be debugged through ReactDevTools. 6. Performance optimization suggestions include using memo, avoiding unnecessary re-rendering, and using us

Using HTML to render components and data in React can be achieved through the following steps: Using JSX syntax: React uses JSX syntax to embed HTML structures into JavaScript code, and operates the DOM after compilation. Components are combined with HTML: React components pass data through props and dynamically generate HTML content, such as. Data flow management: React's data flow is one-way, passed from the parent component to the child component, ensuring that the data flow is controllable, such as App components passing name to Greeting. Basic usage example: Use map function to render a list, you need to add a key attribute, such as rendering a fruit list. Advanced usage example: Use the useState hook to manage state and implement dynamics

React is the preferred tool for building single-page applications (SPAs) because it provides efficient and flexible ways to build user interfaces. 1) Component development: Split complex UI into independent and reusable parts to improve maintainability and reusability. 2) Virtual DOM: Optimize rendering performance by comparing the differences between virtual DOM and actual DOM. 3) State management: manage data flow through state and attributes to ensure data consistency and predictability.

React is a JavaScript library developed by Meta for building user interfaces, with its core being component development and virtual DOM technology. 1. Component and state management: React manages state through components (functions or classes) and Hooks (such as useState), improving code reusability and maintenance. 2. Virtual DOM and performance optimization: Through virtual DOM, React efficiently updates the real DOM to improve performance. 3. Life cycle and Hooks: Hooks (such as useEffect) allow function components to manage life cycles and perform side-effect operations. 4. Usage example: From basic HelloWorld components to advanced global state management (useContext and

The React ecosystem includes state management libraries (such as Redux), routing libraries (such as ReactRouter), UI component libraries (such as Material-UI), testing tools (such as Jest), and building tools (such as Webpack). These tools work together to help developers develop and maintain applications efficiently, improve code quality and development efficiency.

React is a JavaScript library developed by Facebook for building user interfaces. 1. It adopts componentized and virtual DOM technology to improve the efficiency and performance of UI development. 2. The core concepts of React include componentization, state management (such as useState and useEffect) and the working principle of virtual DOM. 3. In practical applications, React supports from basic component rendering to advanced asynchronous data processing. 4. Common errors such as forgetting to add key attributes or incorrect status updates can be debugged through ReactDevTools and logs. 5. Performance optimization and best practices include using React.memo, code segmentation and keeping code readable and maintaining dependability


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Dreamweaver Mac version
Visual web development tools

WebStorm Mac version
Useful JavaScript development tools

Zend Studio 13.0.1
Powerful PHP integrated development environment