# Outline ---- - What is frontend development - JS frameworks demo - Why do we use them - Architecture - Why do we care --- # What is front-end --- # What is a website ---- Website is a collection of `.html`, beautified by `.css` and manipulated by `.js` --- (Chris, 2022) ---- # What are `.html`, `.css`, and `.js`? ---- # text files. ---- # `string`. ---- Fancy of writing every single character of `.html` for building website? ---- ![WeDoNotDoThatHere](https://i.imgur.com/l13LUaq.png) ---- computer does. ---- Consider `.tex` and `.md`, why `.md` is prefered? ---- # Static Site Generator - [![Jekyll](https://i.imgur.com/Tjwp6YS.png =50x50) Jekyll](https://jekyllrb.com/) - [![Gatsby](https://i.imgur.com/1h3E3e3.png =50x50) Gatsby](https://www.gatsbyjs.com/) - [![Hugo](https://i.imgur.com/wca584y.png) Hugo](https://gohugo.io/) ... a lot more ---- # Demo ![Jekyll](https://i.imgur.com/Tjwp6YS.png) --- # Frameworks | VanillaJS | Vue.js | React | |:------------------------------------------------------:|:------------------------------------------------:|:--------------------------------------------------:| | ![VanillaJS](https://i.imgur.com/7VxaKps.png =100x100) | ![Vue](https://i.imgur.com/PxsYCvi.png =100x100) | ![React](https://i.imgur.com/sZrnDxV.png =100x100) | ---- # Let's build a [To do App](https://fdq09eca.github.io/vanillaJS-to-do-app/). ---- ![VanillaJS](https://i.imgur.com/7VxaKps.png =500x500) ---- ![Vue](https://i.imgur.com/PxsYCvi.png =500x500) ---- ![React](https://i.imgur.com/sZrnDxV.png =500x500) ---- Where to implement logic and rendering in the application? --- # Rendering ---- Server-side rendering (SSR) : rendering a client-side or universal app to HTML on the server. : see [SSR example - Server only] and [SSR example - Rehydration] [SSR example - server only]: https://stackblitz.com/edit/vue-ssr-example-basic-ozzudd?file=server.js [SSR example - rehydration]: https://stackblitz.com/edit/vue-ssr-example-25y9pp?file=server.js ---- Client-side rendering (CSR) : rendering an app in a browser, generally using the DOM. --- # Next gen JS framework ![Vue](https://i.imgur.com/PxsYCvi.png =100x100) :arrow_right: ![Nuxtjs](https://i.imgur.com/F7oBdrz.png =100x100) ![React](https://i.imgur.com/sZrnDxV.png =100x100) :arrow_right: ![Nextjs](https://i.imgur.com/NpW65Tr.png) --- Why do we care about the `SSR` or `CSR` --- 1. Performance 2. Realiability/Availability 3. Security 4. Cost --- Thanks.
{"metaMigratedAt":"2023-06-17T11:21:57.713Z","metaMigratedFrom":"YAML","title":"Presentation","breaks":true,"contributors":"[{\"id\":\"97b569fe-8f84-4ee6-8504-3a4416110ae4\",\"add\":3932,\"del\":1186}]"}
    635 views