2022 Web Development Bootcamp

Section 34: Optimizing & Publishing A Website - From Development To Production

olivia_yj 2022. 10. 7. 08:06

The goals

💪🏻Publishing Options (Static vs Dynamic Website)

✌🏻Preparation Steps & Website Optimization

👍🏻Deploying (Publishing) A Website

 

 

We need a hosting provider

Configuring computers for serving websites is no easy task

-> Proper hardware

-> Software installation & configuration

-> Exposing ports & accepting incoming requests

-> Security

 

=> Hosting providers sell pre-configured remote machines (& services)

 

Static vs Dynamic Websites

Static

Only HTML, CSS & browser-side JS

No server-rendered templates, no server-side code

No database server

=> Static Hosting Provider

 

Dynamic

Frontend & Backend

Includes serveer-side code / server-side templates

Might require a database server

=> Node.js / PHP / ...Hosting Provider

 

Hosting Database Servers

Try to avoid configuring your own database servers

You could rent a remote machine and install + run a database server on it => Configuring it properly, scaling it as requests increase and securing it is very difficult

 

=> Prefer "hosted services" if possible

 

 

Deployment Preparation Steps

Test your website & prepare code for deployment (e.g. use environment variables) -> Thoroughly, all options and also on different browsers

Be aware of browser limitations & add cross-browser support (if possible / sensible) -> Not all browser support all JS / CSS features

Search Engine Optimization (SEO) -> Add important metadata to make content discoverable

Improve performace & shrink frontend assets (JS, Images, CSS) -> Avoid forcing your users to download too much data

 

 

Test your website

Manual Testing

Manually test your website and common user behaviors

Test for rare, yet possible scenarios

Let others test your website

 

Autimated Testing - Advanced

Write code (scripts) that tests your website automatically

Test individual building blocks or entire user flows

Try to write automated tests for all features of your website

 

 

Nodejs Environment Variable

 

 

Prepare Your Code For Deployment

Remove & replace dummy values

Replace teting data / keys with real data / keys

Use environment variables for data that differs between development and deployment

Consider using cloud storage providers for file uploads

 

e.g.  Cloudinary

 

Search Engine Optimization (SEO)