production code是pg為最基本的產出,思考時與手動寫code的配合,是否同時間產出呢?
Tdd
測試驅動開發,看似六個字,但意義很深
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Refactory-Simplify Condition Expression
簡化表達式
Decompose Conditional 分解條件表達式
Consolidate Conditional Expression 合併條件表達式
Consolidate Duplicate Conditional Fragments 合併重複條件片段
Remove Control Flag 移除控制標記
Replace Nested Conditional with Guard Clauses 保守條款取代插入
Replace Conditional with Polymorphism 多型態取代條件
Introduce Null Object 引用null物件
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SOC
Separation of concerns 關注點分離,以SRP 原則走向
Js Promise
處理非同步async 行為 https://developer.mozilla.org/zh-TW/docs/Web/JavaScript/Reference/Global_Objects/Promise
descript Promise property
action status
Promise Chaining
then (callback, callback)
Promise all、race
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Docker Sql
已裝net core及AP後,來試試DB的部份
這次選擇 SQL Server On Linux
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Security
Xss : 跨網站腳本,在網站中,可以輸入js語法,取得cookies、token或轉址方式
https://docs.microsoft.com/zh-tw/aspnet/core/security/cross-site-scripting?view=aspnetcore-3.1
XSRF or CSRF : 跨站請求偽造 https://zh.wikipedia.org/wiki/%E8%B7%A8%E7%AB%99%E8%AF%B7%E6%B1%82%E4%BC%AA%E9%80%A0
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NetCore 2、3 Deploy
環境 :
net core 2.0 + jquery + Razor
net core 3.0 + angular + webapi
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Js encrypt decrypt C# SymmetricAlgorithm
- 416
- 0
- Algorithms
- 2020-04-23
frontend、backend 加解密
js CryptoJs Aes : https://cryptojs.gitbook.io/docs/
c# Aes : https://docs.microsoft.com/zh-tw/dotnet/api/system.security.cryptography.aes?view=netframework-4.8
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Angular Base
Angular Single Service
1. providedIn
property of the @Injectable()
to "root"
.
2. Include the service in the AppModule
or in a module that is only imported by the AppModule
https://angular.io/guide/singleton-services
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Angular Dynamic mat-menu
- 802
- 0
- AngularMaterial
NetCore : webApi + angular + angular Material
mat-menu : https://material.angular.io/components/menu/overview
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Docker net Core
在OS (window、Linux上),快速產生出不同的 VM 環境,比VM還快。
環境 : webApi + angular
Container容器、Image印象檔 ( docker hub 上可載所需Image)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Angular 口罩map
來貢獻一下,順便試試OpenLayers : https://openlayers.org/
source : https://data.gov.tw/dataset/116285
https://github.com/kiang/pharmacies 感謝前輩提供藥局(經緯度) api
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Angular Route
Angular Service
Service : https://angular.io/guide/architecture-services
將服務拿來使用公用,Property、Fun
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Angular WebApi
JsES6
Let、Const : 宣告變數使用 ( 改善var 問題)
Let Hoisting 創造、執行
ESlint
箭頭函式
Differenct : Parameter、this、event
Default parameter values
Template Literals
************************************************************************************************************************************
JsGetSet
給值不用函式方法處理
Getter 取得特定值方法
Setter 存值方法
***********************************************************************************************************
JsProperty
Object.defineProperty : 定義屬性、調整屬性特微 ( 值、可否寫入、可否刪除,可否列舉)
Object.defineProperty 淺層保護
Object.definePropertys 大量屬性
防止擴充 PreventExtensions、封裝 Seal、凍結 Freeze *淺層保護
屬性Enum與Prototype Relation
***********************************************************************************************************************************