> For the complete documentation index, see [llms.txt](https://university-west.gitbook.io/programming-paradigms/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://university-west.gitbook.io/programming-paradigms/web-development/javascript-frameworks.md).

# JavaScript Frameworks

JavaScript frameworks provide developers with pre-written JavaScript code to use while building web applications. These frameworks offer a foundation and guidelines for constructing powerful, efficient, and scalable applications. They streamline web development by handling common programming tasks and enabling a more modular and organized codebase.

#### Brief History and Examples

**Angular**

* **History:** Developed and maintained by Google, Angular was launched in 2010 as AngularJS, focusing on dynamic web apps. The framework was completely rewritten and released as Angular 2 in 2016 to offer a more efficient, powerful, and cross-platform framework. It introduced TypeScript, and the version numbers have been incrementally increasing since then.
* **Example Use:** Large-scale enterprise applications and single-page applications that require a robust framework with a wide range of features.

**React**

* **History:** Introduced by Facebook in 2013, React is not a full-fledged framework but a library focused on building user interfaces. It gained popularity due to its virtual DOM feature that optimizes rendering and improves app performance. React’s component-based architecture streamlines the development of large web applications.
* **Example Use:** Interactive web applications, such as social media platforms, where efficiency and scalability are crucial. React's component-based model is ideal for applications requiring frequent updates.

**Vue.js**

* **History:** Created by Evan You in 2014, Vue.js is designed from the ground up to be incrementally adoptable. Its core library focuses on the view layer, and it’s easy to integrate with other libraries or existing projects. Vue is also perfectly capable of powering sophisticated single-page applications when used in combination with modern tooling and supporting libraries.
* **Example Use:** Vue.js is well-suited for rapidly developing user interfaces and single-page applications where performance and ease of use are prioritized. It's particularly appealing for projects that require a lightweight, flexible framework.

#### Angular Example

Angular applications are structured around components.

```typescript
import { Component } from '@angular/core';

@Component({
  selector: 'app-root',
  template: `<h1>Hello, Angular!</h1>`
})
export class AppComponent {}
```

This is a basic Angular component that displays "Hello, Angular!".

#### React Example

React uses JSX for templating, which allows HTML in JavaScript.

```javascript
import React from 'react';

function App() {
  return <h1>Hello, React!</h1>;
}

export default App;
```

This is a functional component in React that renders "Hello, React!".

#### Vue.js Example

Vue.js is designed to be incrementally adoptable.

```html
<!DOCTYPE html>
<html>
<head>
  <title>Vue Example</title>
</head>
<body>
  <div id="app">
    {{ message }}
  </div>

  <script src="https://cdn.jsdelivr.net/npm/vue@2"></script>
  <script>
    new Vue({
      el: '#app',
      data: {
        message: 'Hello, Vue!'
      }
    })
  </script>
</body>
</html>
```

This HTML file includes a Vue instance that binds "Hello, Vue!" to the div element.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://university-west.gitbook.io/programming-paradigms/web-development/javascript-frameworks.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
