Vuejs: Difference between revisions

From Training Material
Jump to navigation Jump to search
Line 101: Line 101:
** npm run dev
** npm run dev
** npm run build
** npm run build
** interactive CLI commands
** interactive CLI commands:
  press r + enter to restart the server
  press r + enter to restart the server
  press u + enter to show server url
  press u + enter to show server url

Revision as of 15:11, 6 May 2024


Vuejs

Vuejs Training Materials

Introduction

  • JavaScript framework for building UI (user interfaces)
  • What do we need?
    • HTML, CSS, and JavaScript
  • Declarative, component-based programming model
    • Declarative rendering
    • Reactivity
  • Progressive framework
  • Single-file components (SFC)
  • API Styles - options VS composition

Not That

NotVue.png

Framework

Progressive Framework - "framework that can grow with you and adapt to your needs"

  • framework and ecosystem
  • designed to be flexible and incrementally adoptable
  • can be used in
    • enhancing static HTML without a build step
    • embedding as Web Components on any page
    • Single-Page Application (SPA)
    • Fullstack / Server-Side Rendering (SSR)
    • Jamstack / Static Site Generation (SSG)
    • targeting desktop, mobile, WebGL, and even the terminal

Overview of Vue JS

  • Declarative rendering
  • Component composition
  • Hot-reloading
  • Time-travel debugging

Declarative rendering

Component composition

Hot-reloading

Time-travel debugging

Setting up a development environment

  • Nodejs
  • IDEs - VSC + official ext
    • Alternatives with some LSP/LSIF support: WebStorm, Sublime, vim, emacs
  • git
  • Vite vs VueCLI (migratable)
  • ??

Creating your first application

todo

Working with Templates

Dividing the application into smaller, self-contained components

Methods and computed properties

Reactive programming

Directives and data rendering

Applying transitions

Routing

Managing state

Creating animations

Refactoring components

Server-side rendering

Supporting libraries and packages

  • Routing
  • State management
  • Build tooling

Routing

State management

Build tooling

Testing your application

Debugging and performance

Embedding Vue.js into existing pages

Deploying your application to production Vue-CLI

  • Vite as a replacement for Vue-CLI
    • npm run dev
    • npm run build
    • interactive CLI commands:
press r + enter to restart the server
press u + enter to show server url
press o + enter to open in browser
press c + enter to clear console
press q + enter to quit

Scaling your application

Helpers