MEAN-stack Project

MEAN全栈项目技术笔记

Posted by Eryn on November 30, 2019

What is Angular? (for front-end)

a Client-Side (Browser) Framework which allows you to build Single-Page-Applications

  • render UI with dynamic data
  • handle user input
  • communicate with backend services

    What is Node? (for back-end)

    a Server-side library: JavaScript on the Server-side

  • listen to requests and send resonses
  • execute server-side logic
  • interact with databases and files

    What is Express?(framework of Node)

    a Node framework wich simplifies writing server-side code and logic

  • based on Node, offers same functionalities
  • middlewarebased funnerl requests through functions
  • includes routing, view-rendering & more

    What is MongoDB?(database)

    a NoSQL database which stores ‘Documents’ in Collections’ instead of ‘Records’ and ‘Tables’ as in SQL

  • store application data
  • enforces no data schema orrelations
  • easily connected to Node/Express (not to Angular: risky to expose data in browser where data can easily be hacked)

    SPA

    the whole user interface is handled as one page only which is dynamically re-rendered all the time by Angular
    single page is not necessarily served by Node backend

    outline

    1. Angular front-end
    2. Node.js + Express backend
    3. Handling data with MongoDB
    4. Enhancing the App
    5. Image upload
    6. Data pagination
    7. Authentication
    8. Authorization
    9. Error handling
    10. Optimization
    11. Deployment

      Angular materials

      pre-built Angular components

short-cut tips

ctrl + c: stop the server

  • stop the server before installing new packages and restart afterwards