Dependence injector : 依賴注入
late binding、unittesting 、abstract factory、di container
將依賴關係於DI Container或第三方
Dependence injector : 依賴注入
late binding、unittesting 、abstract factory、di container
將依賴關係於DI Container或第三方
團隊中的code,經歷多代的code,慘~~~~~~~~~~~~~~~~~~~~~~,但實際面還是要解決問題。
從新的project開始
production code是pg為最基本的產出,思考時與手動寫code的配合,是否同時間產出呢?
測試驅動開發,看似六個字,但意義很深
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
簡化表達式
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物件
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Separation of concerns 關注點分離,以SRP 原則走向
處理非同步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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
已裝net core及AP後,來試試DB的部份
這次選擇 SQL Server On Linux
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
環境 :
net core 2.0 + jquery + Razor
net core 3.0 + angular + webapi
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NetCore : webApi + angular + angular Material
mat-menu : https://material.angular.io/components/menu/overview
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
在OS (window、Linux上),快速產生出不同的 VM 環境,比VM還快。
環境 : webApi + angular
Container容器、Image印象檔 ( docker hub 上可載所需Image)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
來貢獻一下,順便試試OpenLayers : https://openlayers.org/
source : https://data.gov.tw/dataset/116285
https://github.com/kiang/pharmacies 感謝前輩提供藥局(經緯度) api
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Service : https://angular.io/guide/architecture-services
將服務拿來使用公用,Property、Fun
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Let、Const : 宣告變數使用 ( 改善var 問題)
Let Hoisting 創造、執行
ESlint
箭頭函式
Differenct : Parameter、this、event
Default parameter values
Template Literals
************************************************************************************************************************************