iT邦幫忙

鐵人檔案

2017 iT 邦幫忙鐵人賽
回列表
Modern Web

30 天打造 MERN Stack Boilerplate 系列

Modern Web 的技術日新月異,但環境設定越來越繁瑣,組織程式也越來越不易,這對許多人而言,起手一個專案經常會是一個痛點,所以我想在接下來的30天裡介紹我的解法——打造一個結構健全、彈性、自動化、容易客製化、內建充足基礎設施(Infrastructure)的 Web 專案樣板

鐵人鍊成 | 共 30 篇文章 | 51 人訂閱 訂閱系列文 RSS系列文
DAY 11

Day 11 - Infrastructure - Introduction

總算來到 Infrastructure 的部份了,前面用了 10 篇,也正好是 1/3 的篇幅,講解一些 General 的概念及架構,現在我要再用另外 1/3...

2016-12-11 ‧ 由 gocreating 分享
DAY 12

Day 12 - Infrastructure - Isomorphic API

這裡所謂的 API 指的是 Client 向 Server 的某一個 Path 發出 Request,比如說: POST /todos GET /tod...

2016-12-12 ‧ 由 gocreating 分享
DAY 13

Day 13 - Infrastructure - Error Handling

Isomorphic 錯誤處理 前後端可能發生的錯誤有千百種,為了方便維護,還有統一管理,我決定在 Isomorphic 的 Flux Store 中掛上 er...

2016-12-13 ‧ 由 gocreating 分享
DAY 14

Day 14 - Infrastructure - Isomorphic Routing

為了實現 Isomorphic,我們的 Boilerplate 採用了 React-Router 來控制頁面的路由,另外還搭配了 react-router-re...

2016-12-14 ‧ 由 gocreating 分享
DAY 15

Day 15 - Infrastructure - Form

表單是網頁中非常重要的元素,但同時也非常複雜,複雜之處在於,對每一個表單欄位而言,都可能有屬於自己的資料驗證流程、驗證錯誤處理、可能會需要呼叫 API、可能需要...

2016-12-15 ‧ 由 gocreating 分享
DAY 16

Day 16 - Infrastructure - Authentication

Passport Authentication 是許多 Web 服務都會使用到的基本功能,但每個服務的需求可能又不太一樣,有的人只需要 Basic Auth,有...

2016-12-16 ‧ 由 gocreating 分享
DAY 17

Day 17 - Infrastructure - Permission Control

API Server 通常需要做到 2 種權限控制,第一是檢查使用者是否已經登入(Authentication),另一種是對已登入的使用者檢查是否具有足夠權限(...

2016-12-17 ‧ 由 gocreating 分享
DAY 18

Day 18 - Infrastructure - i18n

講到 i18n 真的就是只有機掰兩個字可以形容,因為它實在是一個非常破壞程式整體結構的東西,雖然可以搭配現有 Library 讓程式稍微容易維護一點,但是,如何...

2016-12-18 ‧ 由 gocreating 分享
DAY 19

Day 19 - Infrastructure - Pagination

試想今天你要提供一個 API GET /api/users 來列出 Server 上的所有 User,你會怎麼做?以交作業的心態,能動就好,挖靠哩,總共 5 行...

2016-12-19 ‧ 由 gocreating 分享
DAY 20

Day 20 - Infrastructure - Mail Service

無論是驗證信箱、重設密碼、寄送電子報、更新服務條款、...,即使再小的 Real World App 都必須要考量到寄信服務。如果自己架 Mail Server...

2016-12-20 ‧ 由 gocreating 分享