General and Web Programming Fundamentals
  • Introduction
  • Program creation and design
    • Program design
      • Algorithms
      • Pseudocode
    • Programming conventions
    • Writing programs
      • Source code editors
      • Integrated Development Environments
      • Code repositories/Version control
      • Compilers/Interpreters
  • Programming Fundamentals
    • Operators
      • Arithmetic
      • Logical
      • Assignment
    • Constants and Variables
    • Datatypes
      • Primitive Datatypes
        • Character
        • Integer
        • Boolean
        • Floating point
        • Nothing (Null)
      • Composite Datatypes
        • Arrays
        • Strings
        • Classes
        • Structs
      • Literals
    • Data structures
      • Lists
      • Queues
      • Stacks
      • Map/dictionary
      • Trees
      • Graphs
    • Control structures
      • Selection (Conditional)
        • If/Else
        • Ternary
        • Switch
      • Iteration (Loops)
        • For loops
        • While loops
        • Do-While loops
        • For-Each loops
    • Functions
      • Parameters and arguments
      • Lambda expressions
      • Higher Order Functions
    • Space and Time
    • Scope
    • Standard libraries
  • Programming Paradigms
    • Procedural (Imperative) Programming
    • Object-oriented programming
    • Functional Programming
    • Declarative Programming
    • Event Driven programming
  • Programming Languages
    • Short history of programming
    • Low-level programming languages
    • High-level programming languages
  • Web Development
    • What is the web?
      • Web browsers (clients)
      • Webservers (serving web pages)
      • W3C
    • Markup languages
      • HTML
        • HTML Tags
      • Cascading Style Sheets (CSS)
        • CSS Properties
      • XML
      • Markdown
    • Scripting Languages
      • JavaScript
      • TypeScript
    • JSON
    • JavaScript Frameworks
  • Acknowledgements
    • About the author(s)
  • License
Powered by GitBook
On this page

Was this helpful?

Export as PDF
  1. Web Development

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.

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.

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.

<!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.

PreviousJSONNextAcknowledgements

Last updated 1 year ago

Was this helpful?