Developer for Life Time

Thoughts, stories and ideas.

ความไฮโซของ Rust 😅

Rust based บน functional programming ดังนั้นไม่มี feature function overloading ในภาษา แต่สามารถเขียนโค้ดให้ pass function ที่มี signature ต่างกันผ่าน function "to" ที่รับเพียงแค่ parameter เดียว คือ handler ที่เป็น trait Handler trick คือ implement trait Handler<

Auth0 authentication in .NET MAUI

Introduction บทความนี้สรุปวิธีการต่อ Auth0 ขา Authorization Code Flow สำหรับ .NET MAUI ซึ่งนำมาจากตัวอย่างของ Auth0 [https://auth0.com/blog/add-authentication-to-dotnet-maui-apps-with-auth0/] Pre-requisites คนเขียน assume ว่าผู้อ่านเข้าใจเรื่องเหล่านี้มาแล้ว * การพัฒนา application ด้วย .NET MAUI รวมถึงโครงสร้าง project
5 min read

Setup Let's Encrypt กับ nGINX

Reference: https://pentacent.medium.com/nginx-and-lets-encrypt-with-docker-in-less-than-5-minutes-b4b8a60d3a71 Setup certbot กับ nginx เราจะต้องมี certbot runคู่กับ nginx ก่อน certbot เป็น tool ของ Electronic Frontier Foundation สำหรับจัดการ Let's Encrypt certificates version: '3' services: nginx: image: nginx:1.15-alpine ports: - "80:80" - "443:443" volumes:
2 min read

เราจ่าย SSL Cert แพงๆทำไม?

ตอนนี้เราใช้ Let's Encrypted เป็นหลัก แต่สงสัยว่า ทำไมเจ้าอื่นที่ต้องขายแพง? มีใครรู้บ้างว่าทำไมเราต้องจ่ายให้ SSL CA ในราคาแพง แล้วเราได้บริการอะไรจากเค้า? นอกจาก Warranty ที่แทบจะไม่มีทางได้เคลม? และ SSL Warranty ถ้าใครไม่รู้อาจจะคิดว่า เค้าประกันความเสี

Kubernestes concepts

Kubernestes (เรียกสั้นๆโดยทั่วกันว่า Kube) เป็น Docker orchestrator ตัวนึงของ Google และเริ่มเป็น dominated trend ของปี 2020 Concepts Concept ของ Kube แบ่งเป็นหลายเรื่องซึ่งสามารถอ่านรายละเอียดได้ใน Kubernestes Concept Page [https://kubernetes.io/docs/concepts/] แต่สรุปคร่าวๆได้แบบนี้ Components * Node
1 min read
Getting Started

Intro to Docker Compose

ในบทความ แนะนำ Docker [https://blog.ruxoz.net/intro-to-docker/] ได้เกริ่นถึง Docker Orchestration Tool ไว้ Docker Compose ก็เป็นหนึ่งใน tool เหล่านั้น และถือเป็น orchestration tool พื้นฐานที่มากับ Docker Engine เลย ตัวอย่าง compose file version: "2" services: db: image: mysql:5.
1 min read
บทความสั้นๆแนะนำ Docker
Getting Started

บทความสั้นๆแนะนำ Docker

Note: download related slide deck from OneDrive [https://1drv.ms/p/s!AgGeXdkeekPggZI5VEKzKCPQ4j5ikg]. บทความนี้เป็นหนึ่งในหัวข้อ Kubernetes on Google Cloud ประกอบไปด้วย แนะนำ Docker Compose [https://blog.ruxoz.net/intro-to-docker-compose/] Docker Swarm และ Kubernetes Docker เป็น OS-level virtualization technology มีรากฐานมาจากคำสั่ง chroot ของ Unix system
2 min read
principles

REST & MVC

นอนนึกเรื่อง REST architecture ว่า เท่าที่เห็นคนจะนึกถึง REST ในแง่ของ Resource URL แต่ไม่ค่อยพูดถึง HATEOAS ซึ่งเป็นอีก principle สำคัญของ REST เหมือนกัน โดยเฉพาะความหมายของ concept Application State ซึ่งถ้าเข้าใจมุมมองเรื่องนี้แล้ว จะเห็นภาพรวมของ
1 min read
ddd

DDD: Aggregation root!?

วันนี้อ่านเจอเทคนิคและหลักการที่ใช้กับการออกแบบ OOD มาจาก DDD (Domain-Driven Development) เรียกว่า Aggregation root ยกตัวอย่างเช่น Web shopping domain อันนี้ ปกติหลังจากทำ domain diagram เสร็จ เราก็มักจะสร้าง Object ตามหลักการ Low Coupling & High Cohesion และ SoC วิธี
1 min read