<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by HashtagF on Medium]]></title>
        <description><![CDATA[Stories by HashtagF on Medium]]></description>
        <link>https://medium.com/@hashtagf?source=rss-17d185403b81------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*-JIWIN3mxFSUId-R-rZerg.jpeg</url>
            <title>Stories by HashtagF on Medium</title>
            <link>https://medium.com/@hashtagf?source=rss-17d185403b81------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 16:49:20 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@hashtagf/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Hexagonal Architecture 101 [Thai Version]]]></title>
            <link>https://medium.com/@hashtagf/hexagonal-architecture-101-thai-version-83111c35ef67?source=rss-17d185403b81------2</link>
            <guid isPermaLink="false">https://medium.com/p/83111c35ef67</guid>
            <category><![CDATA[hexagonal-architecture]]></category>
            <category><![CDATA[architecture]]></category>
            <category><![CDATA[hexagonal]]></category>
            <dc:creator><![CDATA[HashtagF]]></dc:creator>
            <pubDate>Thu, 13 Mar 2025 07:10:37 GMT</pubDate>
            <atom:updated>2025-03-13T07:10:37.328Z</atom:updated>
            <content:encoded><![CDATA[<p>THAI VERSION (ภาษาไทย)</p><p><strong>หมายเหตุ:</strong> เนื้อหานี้เป็นเพียงสรุปสำหรับตามความเข้าใจของผมเท่านั้น</p><p><strong>แนวคิดของ Hexagonal Architecture</strong></p><p><strong>Hexagonal Architecture</strong> ถูกเสนอโดย <strong>Alistair Cockburn</strong> และถูกเขียนลงในบล็อกของเขาในปี <strong>2005</strong> โดยมีพื้นฐานจาก <strong>2 แนวคิดหลัก</strong> ได้แก่:</p><ul><li><strong>Adaptor Pattern</strong></li><li><strong>Dependency Injection หรือ Inversion of Control</strong></li></ul><p><strong>Hexagonal Architecture</strong> เป็นแนวคิดที่ให้ความสำคัญกับ <strong>Business Logic</strong> โดยไม่มีการผูกติดกับ <strong>Framework, Technology Stack หรือภาษาโปรแกรม</strong> ที่ใช้ในการพัฒนา ช่วยให้โครงสร้างโค้ดแยกออกจากกันอย่างชัดเจน ลดการพึ่งพาส่วนประกอบภายนอก และช่วยให้<strong>การทดสอบง่ายขึ้น</strong></p><p>ก่อนที่เราจะเจาะลึก <strong>Hexagonal Architecture</strong> เรามาดูกันก่อนว่า <strong>โครงสร้างระบบปัจจุบัน</strong> เป็นอย่างไร</p><p><strong>Current System Flow:</strong> โครงสร้างปัจจุบันไม่ได้ใช้ Hexagonal Architecture</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZgiSHaVTxb93C22C34Y_Yg.png" /><figcaption>present flow</figcaption></figure><p><strong>เปรียบเทียบโครงสร้างปัจจุบันกับ Hexagonal Architecture</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7iCm70SEJJeD02XRk_imiQ.png" /><figcaption>hexagonal architecture</figcaption></figure><p>จะเห็นได้ว่า เมื่อเรานำ Flow เดิมมาปรับเป็น Hexagonal จะมีความคล้ายกันในเรื่องของ flow แต่ hexagonal จะมีการแบ่ง Layer ของการทำงานค่อนข้างชัดเจนว่า ส่วนไหนเป็น การทำงานของ ภายนอก ส่วนไหนเป็นการทำงานของระบบเรา หรือ Business Logic</p><p>ต่อไปเรามาลองแปลงให้เป็น <strong>Standard Hexagonal Architecture </strong>กัน</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*G_MfkTD_l_ccY43T.png" /><figcaption>hexagonal architecture</figcaption></figure><p><strong>จากรูปภาพเราจะเรียนรู้ไปทีละ Components ของ Hexagonal. กันครับ</strong></p><h4>Core ใน Hexagonal Architecture คืออะไร?</h4><p><strong>Core</strong> คือ <strong>ศูนย์กลางของ Business Logic ทั้งหมด</strong> ใน Hexagonal Architecture ประกอบไปด้วย:</p><ul><li><strong>Domain</strong> → โครงสร้างข้อมูลและกฎทางธุรกิจต่างๆ (Entities, Value Objects, Aggregates)</li><li><strong>Services</strong> → จัดการกระบวนการ (Use Cases) และดำเนินการตาม Business Logic</li><li><strong>Ports (Interfaces)</strong> → กำหนดวิธีที่ Core สื่อสารกับ Adapters ภายนอก</li></ul><p><strong>คุณสมบัติสำคัญของ Core</strong></p><ul><li><strong>แยกออกจาก Infrastructure</strong> เช่น Database, API, UI</li><li><strong>ใช้ Ports เป็นจุดเชื่อมต่อกับ Adapters</strong></li><li><strong>จัดการ Business Logic โดยตรง โดยไม่ยุ่งเกี่ยวกับระบบภายนอก</strong></li></ul><p><strong>หลักการสำคัญของ Core</strong></p><ul><li>C<strong>ore เก็บ Business Logic ทั้งหมด</strong></li><li><strong>แยกออกจาก Infrastructure โดยใช้ Ports เข้ามาติดต่อกับ Core เท่านั้น</strong></li><li><strong>จัดการเฉพาะข้อมูล(Domains )และกฎของระบบ (Business Rules)</strong></li></ul><h4><strong>Service ใน Hexagonal Architecture คืออะไร?</strong></h4><p><strong>Service</strong> ทำหน้าที่ <strong>ดำเนินการ Business Logic</strong> ภายใน <strong>Core</strong> ซึ่งทำหน้าที่เป็น <strong>Application Logic Layer</strong> ที่รับผิดชอบให้ Business Rules จาก <strong>Domain</strong> ถูกดำเนินการอย่างถูกต้อง</p><p><strong>Service</strong> ควรทำงานร่วมกับ <strong>Domain Models</strong> และเรียกใช้งาน <strong>Adapters</strong> ผ่าน <strong>Ports</strong> โดยไม่ขึ้นกับ <strong>Infrastructure</strong> เช่น <strong>Database, External APIs หรือ UI</strong></p><p><strong>คุณสมบัติสำคัญของ Service</strong></p><ol><li><strong>ประมวลผล Business Logic</strong></li></ol><ul><li>ทำให้กฎที่กำหนดใน <strong>Domain</strong> ถูกดำเนินการอย่างถูกต้อง</li><li>ดำเนินกระบวนการ เช่น PlaceOrder, CancelOrder, ProcessPayment</li></ul><p>2. <strong>ไม่พึ่งพา Adapter โดยตรง</strong></p><ul><li>ใช้ <strong>Ports (Interfaces)</strong> เชื่อมต่อกับระบบภายนอก เช่น แทนที่จะเรียกใช้ Payment API โดยตรง ให้เรียก PaymentGateway Interface แทน</li></ul><p>3. <strong>ควบคุม Use Cases</strong></p><ul><li>กำหนดขั้นตอนการดำเนินธุรกิจอย่างชัดเจน เช่น OrderService ควบคุมกระบวนการสั่งซื้อ</li></ul><p>4. <strong>เชื่อมต่อกับ Domain และ Adapters</strong></p><ul><li>ใช้ข้อมูลจาก <strong>Domain Entities</strong></li><li>เรียกใช้งาน <strong>Adapters ผ่าน Ports</strong></li></ul><p><strong>หลักการสำคัญของ Service</strong></p><ul><li><strong>Service เป็นตัวดำเนินการ Business Logic ภายใน Core</strong></li><li><strong>ไม่ควรเชื่อมต่อกับระบบภายนอกโดยตรง แต่ควรใช้ Ports และ Adapters</strong></li><li><strong>Encapsulate Application Use Cases เช่น Order Processing หรือ User Authentication</strong></li></ul><h4><strong>Domain ใน Hexagonal Architecture คืออะไร?</strong></h4><p><strong>Domain</strong> เป็นส่วนที่กำหนด <strong>Model และ Business Rules</strong> ซึ่งเป็นศูนย์กลางของโครงสร้างข้อมูล และกฎเกณฑ์ของระบบ</p><p><strong>องค์ประกอบหลักของ Domain</strong></p><ol><li><strong>Entities (Business Objects)</strong></li></ol><ul><li>แทนข้อมูลหลักของระบบ เช่น User, Order, Product</li><li>มี Business Logic ในตัว เช่น คำนวณราคา หรือตรวจสอบเงื่อนไข</li></ul><p>2. <strong>Value Objects</strong></p><ul><li>เป็นข้อมูลที่ไม่มี <strong>identity</strong> แต่ใช้ประกอบกับ <strong>Entities</strong> (เช่น Money, Address)</li><li>Immutable (เปลี่ยนแปลงค่าไม่ได้)</li></ul><p>3. <strong>Aggregates (กลุ่มของ Entities ที่เกี่ยวข้องกัน)</strong></p><ul><li>เช่น Order อาจมี OrderItem เป็นส่วนหนึ่งของ Aggregate</li><li>ใช้ควบคุม Consistency ภายในตัวเอง</li></ul><p>4. <strong>Domain Services</strong></p><ul><li>เป็น Business Logic ที่ไม่ได้อยู่ใน Entity เดียว เช่น PricingService</li><li>ใช้สำหรับ Business Logic ที่ต้องการหลาย Entity</li></ul><p><strong>หลักการสำคัญของ Domain</strong></p><ul><li><strong>ไม่ขึ้นกับ Infrastructure เช่น Database หรือ External API</strong></li><li><strong>ทำงานผ่าน Ports เพื่อให้สามารถเชื่อมกับ Services และ Adapters ได้ง่ายขึ้น</strong></li><li><strong>กำหนดขอบเขตของระบบ</strong></li></ul><h4><strong>Port ใน Hexagonal Architecture คืออะไร?</strong></h4><p><strong>Port</strong> คือ <strong>Interface</strong> ที่กำหนดวิธีที่ <strong>Core</strong> สื่อสารกับ <strong>Adapters</strong> โดยไม่ต้องขึ้นกับรายละเอียดของ Infrastructure เช่น Database, API หรือ UI</p><p><strong>ประเภทของ Port</strong></p><ol><li><strong>Inbound Port (Primary Port)</strong></li></ol><ul><li>กำหนด <strong>Input</strong> ที่ Core รองรับ เช่น คำสั่งจาก API หรือ UI มักใช้ร่วมกับ <strong>Application Services<br>ตัวอย่าง:</strong> OrderService ที่รับคำสั่งจาก Controller</li></ul><p>2. <strong>Outbound Port (Secondary Port)</strong></p><ul><li>กำหนด <strong>Output</strong> ที่ Core ต้องใช้ เช่น การเรียก Database หรือ External APIมักเป็น <strong>Interfaces</strong> ที่ต้องให้ <strong>Adapters</strong> Implement<br><strong>ตัวอย่าง:</strong> PaymentGateway ที่ Core ใช้เรียกระบบจ่ายเงิน</li></ul><p><strong>หลักการสำคัญของ Port</strong></p><ul><li><strong>Port เป็น Interface ที่เชื่อม Core กับ Adapters</strong></li><li><strong>Inbound Ports รับ Input เข้า Core</strong></li><li><strong>Outbound Ports ให้ Core ติดต่อกับ External Systems</strong></li></ul><h4><strong>Adapter ใน Hexagonal Architecture คืออะไร?</strong></h4><p><strong>Adapters</strong> ถูกแบ่งออกเป็น <strong>2 ประเภทหลัก</strong> ตามแนวคิด <strong>Driver / Driven</strong></p><ol><li><strong>Driver Adapter (Primary Adapter) → ขับเคลื่อน Core </strong>เป็น <strong>Inbound Adapter</strong> ที่ส่งคำสั่งเข้า <strong>Core</strong> ผ่าน <strong>Inbound Ports<br>ตัวอย่าง: <br></strong>REST API Controller → รับคำสั่งจากผู้ใช้<br>CLI Command → รับอินพุตจากผู้ใช้</li></ol><p>2. <strong>Driven Adapter (Secondary Adapter) → รองรับ Core </strong>เป็น <strong>Outbound Adapter</strong> ที่รับคำสั่งจาก <strong>Core</strong> ผ่าน <strong>Outbound Ports<br>ตัวอย่าง:<br></strong>Database Repository → บันทึกและดึงข้อมูล<br>Payment API Client → เรียกใช้ระบบจ่ายเงิน</p><p><strong>หลักการสำคัญของ Adapter</strong></p><ul><li><strong>Driver Adapter ส่งคำสั่งเข้า Core</strong></li><li><strong>Driven Adapter รองรับ Core โดยเชื่อมต่อกับ External Systems</strong></li><li><strong>ช่วยให้ Core แยกออกจาก Infrastructure ได้ง่าย</strong></li></ul><p><strong>อ้างอิง</strong></p><p>[1] <a href="https://medium.com/@pthtantai97/hexagonal-architecture-with-golang-part-1-7f82a364b29">https://medium.com/@pthtantai97/hexagonal-architecture-with-golang-part-1-7f82a364b29</a></p><p>[2] <a href="https://dev.to/bagashiz/building-restful-api-with-hexagonal-architecture-in-go-1mij">https://dev.to/bagashiz/building-restful-api-with-hexagonal-architecture-in-go-1mij</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=83111c35ef67" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hexagonal Architecture 101]]></title>
            <link>https://medium.com/@hashtagf/hexagonal-architecture-101-3ce569b1005c?source=rss-17d185403b81------2</link>
            <guid isPermaLink="false">https://medium.com/p/3ce569b1005c</guid>
            <category><![CDATA[hexagonal-architecture]]></category>
            <category><![CDATA[hexagonal]]></category>
            <category><![CDATA[architecture]]></category>
            <dc:creator><![CDATA[HashtagF]]></dc:creator>
            <pubDate>Tue, 18 Feb 2025 15:06:32 GMT</pubDate>
            <atom:updated>2025-02-18T15:06:32.091Z</atom:updated>
            <content:encoded><![CDATA[<p>This content is summary form me only , if content is not correct i am apologize.</p><p>Ok , We are going to study Hexagonal Architecture ….</p><h3><strong>Hexagonal architecture concept</strong></h3><p>Hexagonal architecture is introduced by <strong>Alistair Cockburn</strong> and written on his <a href="https://alistair.cockburn.us/hexagonal-architecture/">blog</a> in 2005. It is built based on two main patterns:</p><ul><li><a href="https://en.wikipedia.org/wiki/Adapter_pattern">Adaptor Pattern</a></li><li><a href="https://en.wikipedia.org/wiki/Dependency_injection">Dependency Injection</a> or <a href="https://martinfowler.com/bliki/InversionOfControl.html">Inversion Of Control</a></li></ul><p>Hexagonal represents business logic. It does not care about your framework development, your technology stack and your language code. It helps you define <strong>decoupled</strong> code structure, <strong>isolated</strong> with external components and <strong>easy-to-run tests.</strong></p><p>Before diving into the details of Hexagonal Architecture, let’s first examine the current system flow.</p><p>The current system flow does not follow Hexagonal Architecture.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZgiSHaVTxb93C22C34Y_Yg.png" /><figcaption>present flow</figcaption></figure><p>We will convert to hexagonal architecture.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7iCm70SEJJeD02XRk_imiQ.png" /><figcaption>hexagonal architecture</figcaption></figure><p>Next, we will transform it into a standard Hexagonal Architecture design.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*G_MfkTD_l_ccY43T.png" /><figcaption>hexagonal architecture</figcaption></figure><p>Let go , We will learn about the main components of hexagonal architecture</p><h4>Core</h4><p><strong>What is Core in Hexagonal Architecture?</strong></p><p><strong>Core</strong> is the <strong>center of all business logic</strong> in <strong>Hexagonal Architecture</strong>, consisting of:</p><ol><li><strong>Domain</strong> → Data structures and business rules (Entities, Value Objects, Aggregates).</li><li><strong>Services</strong> → Manage processes (Use Cases) and execute business logic.</li><li><strong>Ports (Interfaces)</strong> → Define how Core communicates with <strong>Adapters</strong> for external interactions.</li></ol><p><strong>How Does Core Work?</strong></p><ul><li><strong>Independent of Infrastructure</strong> (e.g., Database, API, UI).</li><li>Uses <strong>Ports</strong> as connection points for <strong>Adapters</strong>.</li><li>Executes <strong>Business Logic</strong> without direct interaction with external systems.</li></ul><p><strong>Key Principles of Core</strong></p><ul><li><strong>Core contains all Business Logic</strong></li><li><strong>Separated from Infrastructure using Ports</strong></li><li><strong>Only manages data and system rules</strong></li></ul><h4>Services</h4><p><strong>What is a Service in Hexagonal Architecture?</strong></p><p>In <strong>Hexagonal Architecture</strong>, a <strong>Service</strong> is responsible for executing business logic within the <strong>Core</strong>. It acts as the <strong>Application Logic Layer</strong>, ensuring that the business rules defined in the <strong>Domain</strong> are executed correctly.</p><p>A <strong>Service</strong> should only interact with <strong>Domain Models</strong> and communicate with <strong>Adapters</strong> via <strong>Ports</strong>. It must remain independent of infrastructure components such as databases, external APIs, or user interfaces.</p><p><strong>Key Characteristics of a Service</strong></p><ol><li><strong>Handles Business Logic</strong></li></ol><ul><li>Ensures that the rules defined in the <strong>Domain</strong> are applied correctly.</li><li>Processes operations such as PlaceOrder, CancelOrder, ProcessPayment.</li></ul><p>2. <strong>Does Not Directly Depend on Adapters</strong></p><ul><li>Uses <strong>Ports (Interfaces)</strong> to communicate with external systems.</li><li>Example: Instead of calling a payment API directly, it calls a PaymentGateway interface.</li></ul><p>3. <strong>Encapsulates Use Cases</strong></p><ul><li>Defines how business operations should be executed step-by-step.</li><li>Example: OrderService manages the order process, ensuring inventory is checked before confirming an order.</li></ul><p>4. <strong>Coordinates Between Domain and Adapters</strong></p><ul><li>Fetches or manipulates data using <strong>Domain Entities</strong>.</li><li>Calls Adapters via <strong>Ports</strong> when external interactions are needed.</li></ul><p><strong>Key Principles of Services</strong></p><ul><li><strong>A Service executes business logic within the Core.</strong></li><li><strong>It should not directly interact with external systems</strong> but instead use <strong>Ports and Adapters</strong>.</li><li><strong>Services encapsulate application use cases</strong> such as processing an order or handling user authentication.</li><li><strong>They coordinate interactions between the Domain and external systems through defined interfaces.</strong></li></ul><h4>Domain</h4><p><strong>What is Domain in Hexagonal Architecture?</strong></p><p>In <strong>Hexagonal Architecture</strong>, the <strong>Domain</strong> represents the <strong>models and business rules</strong> that define the boundaries of the system. It is part of the <strong>Core</strong> and serves as the <strong>central structure for data and business logic</strong>.</p><p><strong>Key Components of the Domain</strong></p><ol><li><strong>Entities (Business Objects)</strong></li></ol><ul><li>Represent the main data structures of the system, such as User, Order, Product.</li><li>Contain their own business logic, like price calculations or validation rules.</li></ul><p><strong>2. Value Objects</strong></p><ul><li>Represent data without an <strong>identity</strong>, used alongside <strong>Entities</strong> (e.g., Money, Address).</li><li>They are <strong>immutable</strong> (cannot be changed once created).</li></ul><p>3. <strong>Aggregates (A Group of Related Entities)</strong></p><ul><li>For example, Order may contain OrderItem as part of the same Aggregate.</li><li>Ensures consistency within its own scope.</li></ul><p><strong>Key Principles of Domain</strong></p><ul><li><strong>Independent from Infrastructure</strong> → It does not depend on databases, APIs, or external systems.</li><li><strong>Works through Ports</strong> → Allows interaction with <strong>Services</strong> and <strong>Adapters</strong> without direct dependencies.</li><li><strong>Defines System Boundaries</strong> → <strong>Services</strong> can only operate within the constraints of the Domain.</li></ul><p>4. <strong>Domain Services</strong></p><ul><li>Handles <strong>business logic that involves multiple entities</strong>, such as PricingService.</li><li>Encapsulates complex rules that do not naturally fit within a single entity.</li></ul><h4>Ports</h4><p><strong>What is a Port in Hexagonal Architecture?</strong></p><p>A <strong>Port</strong> is an <strong>interface</strong> that defines how the <strong>Core</strong> communicates with <strong>Adapters</strong> without depending on infrastructure details such as databases, APIs, or UI.</p><p><strong>Two Main Types of Ports</strong></p><ol><li><strong>Inbound Port (Primary Port)</strong></li></ol><ul><li>Defines the <strong>input</strong> that Core accepts, such as requests from APIs or UI.</li><li>Typically used with <strong>Application Services</strong>.</li><li>Example: OrderService receiving requests from a controller.</li></ul><p>2. <strong>Outbound Port (Secondary Port)</strong></p><ul><li>Defines the <strong>output</strong> that Core needs, such as database queries or external API calls.</li><li>Usually defined as an <strong>interface</strong> that <strong>Adapters</strong> must implement.</li><li>Example: PaymentGateway that Core uses for payment processing.</li></ul><p><strong>Key Principles of Ports</strong></p><ul><li><strong>A Port is an Interface connecting Core with Adapters.</strong></li><li><strong>Inbound Ports receive input into Core.</strong></li><li><strong>Outbound Ports allow Core to communicate with external systems.</strong></li><li><strong>Core uses Ports without depending on Adapter implementations.</strong></li></ul><h4>Adapters</h4><p><strong>Adapter in Hexagonal Architecture: Driver and Driven</strong></p><p>In <strong>Hexagonal Architecture</strong>, <strong>Adapters</strong> are categorized into <strong>two types</strong> based on the <strong>Driver / Driven</strong> concept, which explains how the <strong>Core remains the center of the system</strong>, interacting with external components through <strong>Ports</strong>.</p><ol><li><strong>Driver Adapter (Primary Adapter) → Drives the Core</strong></li></ol><p>A <strong>Driver Adapter</strong> is an <strong>Inbound Adapter</strong> that sends commands into the <strong>Core</strong> through <strong>Inbound Ports</strong>.</p><p><strong>Characteristics of Driver Adapter</strong></p><ul><li><strong>Active component</strong> → Initiates interactions with Core.</li><li><strong>Works from the outside into Core.</strong></li><li><strong>Examples</strong>:</li><li><strong>REST API Controllers</strong> → Receives HTTP requests and calls Core services.</li><li><strong>GraphQL Resolvers</strong> → Fetches data based on queries.</li><li><strong>CLI Commands</strong> → Takes user input and triggers Core processes.</li></ul><p><strong>2. Driven Adapter (Secondary Adapter) → Supports the Core</strong></p><p>A <strong>Driven Adapter</strong> is an <strong>Outbound Adapter</strong> that receives commands from <strong>Core</strong> through <strong>Outbound Ports</strong> and interacts with external systems.</p><p><strong>Characteristics of Driven Adapter</strong></p><ul><li><strong>Passive component</strong> → Executes requests from Core.</li><li><strong>Works from Core to external systems.</strong></li><li><strong>Examples</strong>:</li><li><strong>Database Repositories</strong> → Handles data persistence.</li><li><strong>External API Clients</strong> → Calls third-party services like Stripe or PayPal.</li><li><strong>Message Queue Adapters</strong> → Sends messages to Kafka or RabbitMQ.</li></ul><p><strong>Key Principles of Adapter</strong></p><ul><li><strong>Driver Adapter (Inbound) drives the Core by sending commands.</strong></li><li><strong>Driven Adapter (Outbound) supports the Core by processing external interactions.</strong></li><li><strong>This separation keeps the Core independent and flexible.</strong></li></ul><p>Reference</p><ul><li><a href="https://medium.com/@pthtantai97/hexagonal-architecture-with-golang-part-1-7f82a364b29">https://medium.com/@pthtantai97/hexagonal-architecture-with-golang-part-1-7f82a364b29</a></li><li><a href="https://dev.to/bagashiz/building-restful-api-with-hexagonal-architecture-in-go-1mij">https://dev.to/bagashiz/building-restful-api-with-hexagonal-architecture-in-go-1mij</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3ce569b1005c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Siri x Shortcut : สวัสดี ChatGpt]]></title>
            <link>https://medium.com/@hashtagf/siri-x-shortcut-%E0%B8%AA%E0%B8%A7%E0%B8%B1%E0%B8%AA%E0%B8%94%E0%B8%B5-chatgpt-b8c8e66bbce4?source=rss-17d185403b81------2</link>
            <guid isPermaLink="false">https://medium.com/p/b8c8e66bbce4</guid>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[siri]]></category>
            <category><![CDATA[shortcuts]]></category>
            <category><![CDATA[chatgpt]]></category>
            <dc:creator><![CDATA[HashtagF]]></dc:creator>
            <pubDate>Wed, 30 Oct 2024 02:38:56 GMT</pubDate>
            <atom:updated>2024-10-30T02:44:05.264Z</atom:updated>
            <content:encoded><![CDATA[<h2>Siri x Shortcut : เปิดใช้งาน ChatGPT</h2><p>วันนี้ผมจะมาสอนเปิดใช้งาน chatgpt ผ่าน siri และ shortcut ของ ระบบ IOS บน Iphone กันครับ</p><p>ช่วยให้เรามี ai chatgpt คอยช่วยเหลือเราตลอดเวลาผ่านคำสั่งเสียง เช่น “สวัสดี chatgpt”</p><h3>ทำตามนี้ได้เลย</h3><p>1. เปิดใช้งาน Siri บน Iphone ไปที่เมนู Settings และ หาเมนูว่า Siri หรือบางคน อัพเดทแล้วอาจจะขึ้นเหมือนผมคือ Apple Inelligence &amp; Siri</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/660/1*f-0tMehYbqsv9YJ--KiWAQ@2x.jpeg" /></figure><p>2. เลือกภาษา ที่ใช้คุยกับ Siri ในที่นี้ผมเลือกเป็นภาษาไทย</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/660/1*_0sZw-iQMpBqBACLiZbIGA@2x.jpeg" /></figure><p>3. Download Chatgpt ลงในเครื่อง โดยสามารถหา โหลดได้ที่ App Store ได้เลย</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/660/1*vRsXe0aoHMhEUSKW5rCoeA@2x.jpeg" /></figure><p>ที่นี้เราก็เตรียมการพร้อมกันแล้วหลังจากนนี้จะเป็นการทำ shortcut เพื่อให้ siri รู้จัก app chatgpt ที่เราโหลดมากันไปขั้นตอนต่อไปกันต่อ</p><p>4. ไปที่ app shortcut ของ ios หน้าตาแบบนี้</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/660/1*deZWiBtuv1Tav-sxdxTDbw@2x.jpeg" /></figure><p>5. หลังจากเข้า แอปมาหน้าตาจะเป็นประมานนี้ จะเห็นคำสั่ง shortcut ที่ระบบ ตั้งให้ไว้เต็มไปหมด และจะมีอันนึงที่ผมสร้างขึ้นมาใหม่ คือ “สวัสดี chatgpt” วิธีการสร้างคือ กดที่ปุ่ม + บนขวาได้เลย</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/660/1*mA7QOXzBLjKUXTVg-PdM1Q@2x.jpeg" /></figure><p>6. หลังจากกดปุ่มบวกขึ้นมา หน้าตาจะเป็นแบบนี้ให้กดที่ Search Action และค้นหาคำสั่งที่ต้องการ</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/660/1*LyyeY-e2GZQAV_l4qdvaPQ@2x.jpeg" /></figure><p>7. เลือกคำสั่งว่า shortctut นี้จะทำงานอะไร ในที้นี้คือ chatgpt ก็ค้นหาได้เลย และ เลือกคำสั่ง Open ChatGpt Voice</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/660/1*J727FDOr2JTJ_0FDLbyd2g@2x.jpeg" /></figure><p>8. หลังเลือกเสร็จจะได้หน้าตาแบบนี้</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/660/1*B-Y0kJHJepmr_L59nXOEDw@2x.jpeg" /></figure><p>9. ขั้นต่อไปคือการตั้งชื่อคำสั่ง โดยการกด ปุ่มลูกศร ชี้ลงที่อยู่ด้านซ้ายของปุ่ม Done และเลือก Rename จากนั้นก็ตั้งชื่อได้เลย โดยเราจะตั้งชื่อว่า “สวัสดี Chatgpt”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/660/1*quRGj3bZG_r5YPkvGDdN9g@2x.jpeg" /></figure><p>ที่นี่กด Done เป็นอันเสร็จเรียบร้อย Siri ก็จะรู้จักคำสั่งนี้โดยอัตโนมัติทันที</p><p>ต่อไปสามารถทดสอบลองคุยกับ siri ได้เลย โดยการเรียก siri ขึ้นมา และ พูดตามรำสั่งที่เรา set ไว้ได้เลย ก็คือ</p><p>“สวัสดี Chatgpt”</p><p>เท่านี้เป็นอันเสร็จเรียบร้อย เราก็จะมี ai chatgpt คอยคุยด้วยได้ตลอดเวลา</p><p>บทความนี้แค่สอนคร่าวๆ ไม่ได้ลงลึกเรื่อง shortcut ครับแต่ว่าตัว shortcut ของ ios ยังทำอะไรได้อีกเยอะมากๆ</p><p>ทุกคนสามารถศึกษาหาความรู้เพิ่มเติมกันต่อได้เลยครับ</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b8c8e66bbce4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Agile และ Scrum framework คืออะไร ?]]></title>
            <link>https://medium.com/@hashtagf/agile-%E0%B9%81%E0%B8%A5%E0%B8%B0-scrum-framework-%E0%B8%84%E0%B8%B7%E0%B8%AD%E0%B8%AD%E0%B8%B0%E0%B9%84%E0%B8%A3-f9b5694b33f1?source=rss-17d185403b81------2</link>
            <guid isPermaLink="false">https://medium.com/p/f9b5694b33f1</guid>
            <category><![CDATA[agile]]></category>
            <category><![CDATA[framework]]></category>
            <category><![CDATA[scrum]]></category>
            <category><![CDATA[sprint]]></category>
            <dc:creator><![CDATA[HashtagF]]></dc:creator>
            <pubDate>Fri, 24 May 2024 10:12:53 GMT</pubDate>
            <atom:updated>2024-05-26T16:35:28.441Z</atom:updated>
            <content:encoded><![CDATA[<h3>Agile และ Scrum framework คืออะไร ?</h3><p>บทความนี้จะเขียนตามความเข้าใจที่ผมเข้าใจเพื่อที่จะได้เก็บไว้อ่านในอนาคตและแชร์ให้กับคนที่สนใจ</p><h3>Agile คืออะไร ?</h3><p>หากแปลตรงตัว Agile คือ ความคล่องแคล่ว คล่องตัว</p><p>แต่ในบริบทนี้ คือการทำงานในรูปแบบ Agile ของ Software Development<br>Agile คือการทำงานที่สามารถเปลี่ยนและปรับแผนงานต่างๆได้อย่างรวดเร็วและคล่องแคล่วให้เหมาะสมกับ requirement ที่เปลี่ยนแปลงไป เพื่อให้งานสำเร็จและส่งมอบงานที่มีประสิทธิภาพอย่างต่อเนื่อง โดยคำนึงถึง Business outcome เป็นหลัก</p><blockquote>Agile ไม่เท่ากับการทำงานเป็น Sprint</blockquote><p>แต่หากจะเข้าใจ Agile ได้มากขึ้นเราต้องมารู้จัก การทำงานแบบ Water fall กันก่อน</p><h3>Water fall model คืออะไร ?</h3><p>Water fall model คือ การทำงานเป็นขั้นตอนตามลำดับ เพื่อส่งมอบงานให้ตามเป้าหมาย ของ Business</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/828/1*fsmRFxCyYzcvxEIPNW7rkg.png" /><figcaption><a href="https://miro.com/app/board/uXjVPNap5cQ=/">water fall model</a></figcaption></figure><p>ถ้าดูจากภาพ การทำงานแบบ ​water fall model จะเป็นการจัดเตรียม requiment และ design งานให้เรียบร้อยทั้งหมดก่อนจะเริ่มดำเนินงาน และวางแผนการทำงานจนสำเร็จเช่นกัน</p><h4>แล้วเราจะใช้ Agile ตอนไหน ?</h4><p>เราจะใช้ Agile ในตอนที่รูปแบบงานของเราเป็นการทำงานที่มีการเปลี่ยนแปลงบ่อย เพราะหากเปลี่ยนแปลงบ่อยการทำงานแบบ water fall model จะไม่เหมาะ เพราะเราต้องกลับมาวางแผนกันใหม่ แต่ Agile จะมาช่วยให้เราพร้อมรับการเปลี่ยนแปลงมากขึ้น เพราะในงานสาย software development นั้น เป็นไปได้ยากที่จะทำตามแผนเดิมจนงานสำเร็จได้ เพราะจะมี requirement มาเพิ่มบ้างหรือ ทำไปแล้วไม่ work หรือทำไม่เสร็จตามแผนบ้างเนื่องจากปัญหาต่างๆ ก็ต้องเปลี่ยนแผนกันไป ดังนั้น Agile จึงเหมาะกับการทำงานในรูปแบบนี้มากกว่า</p><p>ก่อนหน้านี้ เราพูดถึง Business Outcome กันมา แล้วคำว่า Outcome คืออะไรหละ</p><h3>Outcome คืออะไร ?</h3><p>Outcome เป็นผลลัพธ์ที่จะได้จาก output นั้นๆ ตัวอย่างเช่น เราไปซื้อ Lottery 1 ใบ ราคา 80 บาทสิ่งที่เราได้คือ Lottery 1 ใบ อันนี้ = output<br>แล้วจะเป็น outcome ตอนไหน จะเป็น outcome ก็ต่อเมื่อ lottery ใบนี้ถูกและเราได้เงินรางวัล มูลค่า 6 ล้าน ในส่วนนี้ถึงจะเรียกว่า outcome</p><blockquote>outcome ไม่เท่ากับ output<br>features ไม่ใช่ outcome , features เป็นเพียง output เท่านั้น<br>features จะเป็น outcome ตอนที่สร้าง Value ให้กับลูกค้าหรือ Business ได้</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/823/1*sobS92PFg_xSMLSzLnMuvQ.png" /><figcaption><a href="https://miro.com/app/board/uXjVPNap5cQ=/">the purpose agile adoption</a></figcaption></figure><p>เป้าหมายของ Agile คือ การ focus ไปที่การส่งมอบงานที่มี business value และ outcome ให้กับลูกค้าและส่งมอบบ่อยๆ</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/830/1*IcitxhdQgsRC2YR7LfA0vg.png" /><figcaption><a href="https://miro.com/app/board/uXjVPNap5cQ=/">agile model</a></figcaption></figure><p>จากรูปคือการทำงานในรูปแบบ Agile นั้นก็คือการแบ่งงานมาเป็นชิ้นเล็กๆและส่งมอบงานในทุกๆ iteration โดยการเลือกว่าในแต่ละ iteration นั้นเราจะส่งมอบงานชิ้นไหนให้กับลูกค้า และแต่ละ iteration จะมอบ value อะไรให้กับลูกค้า ซึงในแต่ละ iteration ก็จะมีเป้าหมายเล็กๆ เป็นของตัวเอง เพื่อมุ่งหน้าไปสู่เป้าหมายหลักของ Business</p><p>หากสังเกตดีๆ คำว่า iteration นั้นเหมือนการทำงานเป็น รอบๆ เหมือน Sprint เลย<br>พอเรารู้จัก scrum framework แล้วคำนี้จะเท่ากับ “Sprint”</p><blockquote>Iteration คือ การวนซ้ำ</blockquote><p>แล้วเราจะนำ Scrum Framework มาใช้ตอนไหนและใช้ยังไง ก่อนอื่นมารู้จักคำว่า Scrum กันก่อนว่าคืออะไร</p><h3>Scrum คืออะไร ?</h3><p>Scrum คือการนำแนวคิดการทำงานในรูปแบบของ Agile มาทำตามขั้นตอนของ Scrum เพื่อระบุปัญหาที่มีความซับซ้อน และตอบรับ requirement มีการเปลี่ยนแปลงบ่อย เพื่อให้เราสามารถส่งมอง Business Outcome ได้อย่างต่อเนื่องและปรับแผนการทำงานได้อย่างรวดเร็วในช่วงเวลาที่กำหนดเป็น time box (iteration) ที่น้อยกว่า 1 เดือน ในที่นี้จะเรียกว่า “Sprint”</p><h3>ใครบ้างที่เกี่ยวข้องกับ Scrum ?</h3><ul><li>Scrum Master มีหน้าที่ให้ความรู้ ทำให้ดูเป็นตัวอย่าง พาทำ นำพา ให้คำปรึกษากับทุกคนที่เกี่ยวข้อง ให้ดำเนินงานให้ถูกตามหลักของ Scrum</li><li>Product Owner (PO) มีหน้าที่วางแผนงานและคอยเลือกงานที่จะทำและจัดทำแผนงานในแต่ละ Sprint ร่วมกับ Development Team รวมถึงการวางแผนทุกๆ Sprint จนจบงาน</li><li>Development Team มีหน้าที่พัฒนางานที่ได้รับมอบหมายและวางแผนงานในแต่ละ Sprint ตามที่ PO ส่งมอบงานมาให้ทำและแจ้ง PO ว่ามีงานส่วนไหนทำได้หรือไม่ได้บ้างในแต่ละ Sprint</li><li>Stakeholders ผู้ที่เกี่ยวข้องใน Product บางทีอาจเป็นผู้ให้ requirement มายัง PO หรือผู้ตรวจรับงานในส่วนนั้นๆ</li></ul><h3>Sprint คืออะไร ?</h3><p>Sprint คือการทำรอบของ Iterative model จบ 1 รอบนับเป็น 1 Sprint และแต่ละ Sprint นานแค่ไหน ในส่วนนี้ขึ้นอยู่กับแต่ละทีมว่าจะกำหนด Sprint ยาวแค่ไหน แต่ไม่ควรเกิน 1 เดือน ซึ่งส่วนใหญ่แต่ละทีมจะกำหนดแต่ละ Sprint ให้มีความยาว 10 วันทำการ</p><blockquote>Sprint = 10 วันทำการ<br>หลักจากนี้บทความนี้จะใช้จำนวนวันเท่านี้ในการอธิบายส่วนต่างๆ ของ Scrum Event ที่จะเกิดขึ้น</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/0*yunmjECj1ZzZmN2s.png" /><figcaption><a href="https://www.collidu.com/presentation-iterative-model">https://www.collidu.com/presentation-iterative-model</a></figcaption></figure><p>Define คำว่า Sprint กันเพิ่มหน่อยเพื่อให้เข้าใจเป้าหมายของ Sprint มากขึ้น</p><blockquote>Sprint : a <strong>time-box</strong> of one month or less <strong>during</strong> which a <strong>“Done”</strong> (Define of Done) , <strong>Useable</strong> , and <strong>Potentially Releasable Product Increment</strong> is Created.</blockquote><p>หมายความว่าในทุกๆ Sprint ที่เรากำหนดระยะเวลา เราต้องมีงานที่เสร็จ (<strong>Done</strong>) สามารถใช้งานได้และอาจ Release ได้</p><p>ก่อนอื่นเราต้องมานิยามคำว่า Done กันก่อน ซึ่งแต่ละทีมก็จะไม่เหมือนกันขึ้นอยู่กับการตกลงกันในทีม</p><h4>DoD : Define of Done</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/373/1*l55Fuw8tjOpnRkI_kXVeeA.png" /><figcaption><a href="https://miro.com/app/board/uXjVPNap5cQ=/">https://miro.com/app/board/uXjVPNap5cQ=/</a></figcaption></figure><p>หลังจากกำหนดคำว่า Done กันเรียบร้อยแล้วจะมาทำการดำเนินการขั้นตอนของ Scrum กันตามนนี้</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/872/1*ik4i429HGlkVIiAKPkiBrw.png" /><figcaption><a href="https://miro.com/app/board/uXjVPNap5cQ=/">https://miro.com/app/board/uXjVPNap5cQ=/</a></figcaption></figure><p>ทั้งหมดนี้คือ Scrum Event ที่เกิดขึ้นใน <strong>The Sprint</strong></p><ul><li>วันที่ 1 : Sprint Planing Event</li><li>วันที่ 2–9 : Daily Scrum Event , Development Works , Product Backlog Refinement Workshops</li><li>วันที่ 10 : Sprint Review Event , Sprint Retrospective Event</li></ul><blockquote>เหตุผลที่ Scrum ใช้คำว่า Event แทน Meeting เพราะอยากให้ทุกคนเข้าใจว่ามันเป็นสิ่งที่จะเกิดขึ้นเป็นประจำโดยทุกคนในที่เกี่ยวข้องจะเป็นการรู้กัน</blockquote><p>ดังนั้นในแต่ละทีมต้องมีการกำหนดช่วงเวลาของแต่ละ Event ไว้ตั้งแต่แรกก่อนเริ่มงานทั้งหมด</p><p>เรามาเริ่มแต่ละ Event กันเลย และผมจะเรียง Event ตามการทำงานจริงเลยครับ</p><h3>Event แรก: Product Backlog Refinement Workshops</h3><p>คือการจัดเตรียม Product Backlog เพื่อนำไปใช้ทำงานใน Sprint แต่ละ Sprint ในที่นี้จะเหมือน Requirement ที่ได้รับมาและเปลี่ยน Requirement นั้นเป็น Product Backlog ที่ละเอียดมากขึ้น</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/444/1*Ncz18Es5kS8nKQo1ZY2frw.png" /></figure><p>Product Backlog หรือ Product Backlog Item (PBI) ประกอบด้วยอะไรบ้าง</p><ul><li>Description : รายละเอียดของ PBI</li><li>Value / Outcome : Value / Outcome ของ PBI</li><li>Estimate : ระยะเวลาโดยประมาณของการทำงานนี้</li><li>Priority / Order : ความสำคัญหรือลำดับของงานนนี้</li></ul><p>โดย Product Backlog ทางเราจะเตรียมก่อนที่จะเริ่ม Sprint และจะทำระหว่าง Sprint นั้นๆ โดยการเตรียม Product Backlog เราควรเตรียม Product Backlog กันอย่างน้อย สำหรับการทำงานประมาณ 2 Sprint และผู้ที่เกี่ยวของในการทำ Product Backlog จะมี PO , Development Team ช่วยกันแปลง Requirement ที่ได้รับมาเป็น Product Backlog ที่พร้อมทำงาน โดยการเติมข้อมูลที่จำเป็นตามหัวข้อด้านบนสำหรับ Requirement นั้นๆ</p><p>มาลองดูตัวอย่างการทำ Product Backlog Item กัน ขั้นตอนมีดังนี้</p><h4>Example : ระบบที่เราทำคือระบบ Mobile Banking ของธนาคาร</h4><p>Requirement : ลูกค้าสามารถฝากเงินสดที่ร้านสะดวกซื้อผ่านทาง Mobile Application ได้</p><ol><li>เริ่มจาก การนำ Requirement ที่ได้รับมา ว่า Value หรือ Outcome ของ งานชิ้นนี้คืออะไร<br>Outcome : เพิ่มยอดฝากเงินสดต่อวัน 30% คิดเป็น 300 รายการต่อวัน จากร้านสะดวกซื้อจำนวน 20 สาขา<br>โดย Outcome อาจจะเป็นการประเมินจากเราหรือ Data ที่เรามีและนำมาวิเคราะห์</li><li>เพิ่ม Description ของงานขิ้นนี้ ซึ่งส่วนนี้จะเป็นการทำงานร่วมกันระหว่าง PO และ Development Team ซึ่งรายละเอียดของงานควรจะละเอียดมากจนสามารถทำให้ทีมทำงานได้ และ Desciprion ควรมีอะไรบ้าง</li></ol><ul><li>เงื่อนไขของธุรกิจมีอะไรบ้าง</li><li>ออกแบบ Test Scenarios ที่ใช้ในการตรวจรับงาน</li><li>User Interface : วิธีการหรือรูปแบบ ข้อมูลที่เราจะนำเสนอของลูกค้า</li><li>API : วิธีการหรือรูปแบบข้อมลที่เราจะใช้ส่งหากัน</li><li>Logic : วิธีการหรือรูปแบบ ที่ ข้อมูล ถูกประมวลผลหรือคำนวณ</li><li>Data Stored : วิธีการหรือรูปแบบ การเก็บข้อมูล</li><li>External Services : วิธีการหรือรูปแบบ ที่ขอใช้งานจากระบบอื่น เพื่อการนำมาประมวนผล หรือนำไปใช้งานต่อ</li></ul><p>3. หลังจากเราใส่ Description แล้ว เราจะมาทำงาน ประเมิณเวลาการทำงานของงานนั้นๆ กัน (Estimate) โดยหลังเราใส่ Description แล้วจะมี Task งานใน PBI เยอะมากเราก็จะประมาณเวลาจากงานชิ้นเล็ก มารวมกันว่า PBI ชิ้นนี้ใช้ระยะเวลาเท่าไหร่</p><p>4. นำ PBI ที่ทำข้อก่อนหน้านั้นๆ มาจัดเรียงลำดับความสำคัญ <br>เป็นการจบการทำ PBI 1 ชิ้น</p><blockquote>Product Backlog Item ไม่เท่ากับ Task งาน<br>Task งานควรมาแตกย่อยให้กับแต่ละคนที่เกี่ยวข้องในทีมอีกที</blockquote><p>หลังจากเราทำ Product Refinement Workshops ในช่วงแรกเสร็จเราก็จะได้งานสำหรับ 2 Sprint ในการนำไปดำเนินงานต่อ</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/753/1*CkKOsWIpsw2HM2mQYH-5vg.png" /></figure><p>Product Backlog Refinement Workshops จะต้องเตรียมงานล่วงหน้าอย่างน้อย 2 sprint หมายความว่างระหว่าง sprint เราควรจัดทำ event นี้ด้วย เพื่อเตรียม PBI สำหรับ 2 sprint ถัดไป และใช้เวลาอย่างน้อย 10% ของเวลา sprint ทั้งหมดสำหรับ event นี้</p><h3>Event 2 : Sprint Planing Event</h3><p>Sprint Planing Event คือวางแผนการทำงานของเราใน sprint นั้นๆ โดยควรทำตั้งแต่วันที่ 1 ของ sprint และ ใช้เวลาไม่ควรเกิน 3 ชั่วโมง</p><p>โดยการทำ Planing มี 2 กิจกรรมที่ต้องทำคือ</p><ul><li>PO ตั้ง Sprint Goal ว่า sprint นี้เราจะส่งมอบ Value / Outcome อะไรบ้าง</li><li>PO นำ PBI ที่เตรียมไว้และที่เกี่ยวข้องกับ Goal มาให้ กับ Development Team และ Development Team วางแผนกันต่อว่าใน sprint นี้มีอะไรที่สามารถทำได้บ้างและทำไม่ได้บ้างและ แจ้ง PO ถึงแผนนั้นๆ และแจ้งเวลาส่งมอบในแต่ละ PBI ว่าชิ้นไหนสามารถส่งให้ตรวจรับได้วันไหนบ้าง</li></ul><p>หลังจากวางแผนกันเสร็จเรียบร้อยก็จะเข้าสู่ Event ถัดไป</p><h3>Event 3 : Daily Scrum Event</h3><p>Daily Scrum Event คือ การอัพเดทงานถึงการทำงานของคนในทีม ว่าตอนนี้แผนงานของเราเป็นไงบ้างเป็นไปตามแผนไหม และมีปัญหาอะไรหรือเปล่า Event นี้จะทำในวันที่ 2–9 ของ sprint ควรใช้เวลาไม่เกิน 15 นาที</p><p>โดยจะมีคำถามพื้นฐาน 3 คำถามดังนี้ หากทีมไม่รู้จะเริ่มยังไง</p><ol><li>เมื่อวาน <strong>ฉัน</strong> ทำอะไร ที่ช่วยให้ <strong>ทีมเรา</strong> สามารถส่งมอบงานได้ตาม <strong>Sprint Goal</strong> ?</li><li>วันนี้ <strong>ฉัน</strong> จะทำอะไร ที่ช่วยให้ <strong>ทีมเรา</strong> สามารถส่งมอบงานได้ตาม <strong>Sprint Goal</strong> ?</li><li><strong>ฉัน</strong> เจอ และ/หรือ เห็นว่า<strong> ทีมเรา</strong> มี อุปสรรค ที่จะทำให้เราไป <strong>Sprint Goal</strong> ไม่ได้ ?</li></ol><blockquote>อุปสรรคในที่นี้หมายถึงทุกเรื่องที่จะทำให้ <strong>ทีมเรา </strong>ไม่สามารถส่งมอบงานตาม <strong>Sprint Goal</strong> ได้ ทั้งเราเห็นตัวเอง หรือเห็นคนในทีมของเรา ก็ควรจะแจ้งทีมมา เผื่อในกรณีที่ทีมเราไม่เห็น หรืออาจะเป็นปัญหาที่เจอและแก้ไขไปแล้วระหว่างวันก็ควรแจ้งเพราะอาจจะมีผลกระทบกับส่วนอื่นได้</blockquote><p>หลังจบการทำ Daily Scrum Event ก็ะเข้าสู่ Event ถัดไป</p><h3>Event 4 : Development Works</h3><p>Development Works คือการทำงานตามแผนที่เราวางไว้ หรือปรึกษากับทีมในเรื่องปัญหาที่เจอกันต่อหลังจาก แจ้งไว้ในการ Daily Scrum Event</p><h3>Event 5 : Sprint Review Event</h3><p>Sprint Review Event คือ การสรุปภาพรวมการทำงานของเราในทั้ง sprint และ Demo และนำเสนอผลงานที่ทำให้กับคนในทีมดูหรือ Stakeholders ที่เกี่ยวข้อง เพื่อรับฟังความคิดเห็นและข้อเสนอแนะต่างๆ และจะทำใน วันที่ 10 ของ sprint เสมอและไม่ควรเกิน 2 ชั่วโมง</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xRcr96DzvMIZhreUyvFt_A.png" /></figure><p>มีกระบวนการดังนี้</p><ol><li>กล่าวต้อนรับทุกคนและทักทายกันในภายใน event นี้</li><li>สรุปภาพรวมการทำงานว่า มี PBI ชิ้นไหนบ้างที่เสร็จ พร้อมใช้งานและมี PBI ชิ้นไหนบ้างที่เสร็จ หรือ มี PBI ชิ้นไหนบ้างที่ยังไม่เริ่มงาน</li><li>แจ้งปัญหาต่างๆ ที่เกิดขึ้นใน sprint ทั้งปัญหาที่แก้ไขไปแล้ว หรือปัญหาที่เกิดขึ้นและต้องการการสนับสนุนจาก stakeholders</li><li>มีเรื่องดีๆ อะไรบ้างที่ Team ของเราได้รับหรือ ได้พัฒนาขึ้นเช่น ทักษะ , ประสบการณ์ ที่เกิดขึ้น</li><li>นำเสนอผลงานของ PBI ที่เสร็จสิ้น พร้อมใช้งาน และส่งให้ stakeholders ได้ทดลองใช้งาน หรือสาธิต PBI ที่ยังไม่เสร็จคร่าวๆ ให้ได้ทราบ</li><li>Stakeholders ให้คำแนะนำ คำติชม หรือ idea ต่างๆ ที่นำมาซึ่งการ เพิ่ม ลด ปรับ แก้ไข PBI ต่างๆ</li><li>กำหนด Sprint Goal ถัดไป การไปสู่ Sprint Goal นั้นๆ ต้องประกอบด้วย PBI อะไรบ้าง และแจ้งกำหนดงานสำคัญ เช่น วันที่จะนำงานไปให้ลูกค้าหรือกลุ่มเป้าหมายทดลองใช้งาน</li><li>สรุปภาพรวมของการ Prodcut เช่น งบประมาณเกินหรือไม่ หรือ กำหนดการ Release ยังเป็นไปตามแผนหรือไม่</li><li>กล่าวปิดประชุม</li></ol><p>หลังจบการทำ Sprint Review Event ก็จะเข้าสู่ Event ถัดไป</p><h3>Event สุดท้าย : Sprint Retrospective Event</h3><p>Sprint Retrospective Event เป้าหมายคือ พัฒนาให้ดีขึ้นอย่างต่อเนื่อง (Continuous Improvement หรือ Kaizen ) จะเกิดขึ้นในวันที่ 10 ของ sprint และใช้เวลาไม่ควรเกิน 2 ชั่วโมง</p><p>โดยจะเป็นการนำเรื่องหรือปัญหาต่างๆ ที่เกิดขึ้นระหว่าง sprint มา share กันและหาทางแก้ไขปัญหาร่วมกัน เช่นการพูดถึงเรื่องต่างๆ ดังนี้ เช่น</p><ul><li>People — Business Knowledges</li><li>People — Technical Knowledges</li><li>People — Technical Skill</li><li>People —Soft Skill , Root Cause Anlysis , System Thiking</li><li>People — Internal Relationships</li><li>People — External Relationships</li><li>Event — Sprint Planing</li><li>Event — Daily Scrum</li><li>Development Works — Tools, Processes , สภาวะแวดล้อม , Test Bugs</li><li>Event — Sprint Review</li><li>Event — Sprint Retrospective</li><li>Workshops — Product Backlog Refinement</li></ul><p>ควรเลือกอย่าง 1–2 ปัญหาและ Identify ปัญหาให้ชัดเจนและหาทางแก้ไขใน sprint ถัดไป เช่น</p><p>เราพูดถึง การทำ Product Backlog Refinement Workshops ของเราไม่มีประสิทธิภาพเลยไม่สามารถทำงานต่อได้หรือใช้เวลาน้อยเกินไปในการทำ</p><p>หลังจากนั้นให้ทำการตกลงกันใน Team ว่าจะแก้ไขปัญหานี้ยังไงและ กำหนดแผนการวิธีแก้ไข และกำหนดแผนการนั้นลงในแผน sprint ถัดๆ ไป</p><p>จบกันไปแล้วสำหรับการสรุป Agile และ Scrum Framework และการนำ Scrum ไปใช้ในรูปแบบการทำงานของ Software Development</p><h3>Reference</h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FypBkKv9Rnoc%3Flist%3DPL2jvm-RfIEMoSZdtf3AkKg76wcadHuKMT&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DypBkKv9Rnoc&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FypBkKv9Rnoc%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/857cff815d47964ca3d1b9d383ee6679/href">https://medium.com/media/857cff815d47964ca3d1b9d383ee6679/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fmiro.com%2Fapp%2Flive-embed%2FuXjVPNap5cQ%3D%2F%3FembedId%3D740289509181%26embedSource%3Doembed%26embedMode%3Dview_only_without_ui&amp;display_name=Miro&amp;url=https%3A%2F%2Fmiro.com%2Fapp%2Fboard%2FuXjVPNap5cQ%3D%2F&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=miro" width="768" height="432" frameborder="0" scrolling="no"><a href="https://medium.com/media/f646273ec606725a48278af7779de8eb/href">https://medium.com/media/f646273ec606725a48278af7779de8eb/href</a></iframe><ul><li><a href="https://medium.com/fastwork-engineering/agile-%E0%B8%84%E0%B8%B7%E0%B8%AD%E0%B8%AD%E0%B8%B0%E0%B9%84%E0%B8%A3-%E0%B9%80%E0%B8%A3%E0%B8%B4%E0%B9%88%E0%B8%A1%E0%B9%83%E0%B8%8A%E0%B9%89%E0%B8%87%E0%B8%B2%E0%B8%99%E0%B8%AD%E0%B8%A2%E0%B9%88%E0%B8%B2%E0%B8%87%E0%B9%84%E0%B8%A3-ab749306d96e">Agile คืออะไร เริ่มใช้งานอย่างไร</a></li><li><a href="https://medium.com/fastwork-engineering/scrum-%E0%B8%84%E0%B8%B7%E0%B8%AD%E0%B8%AD%E0%B8%B0%E0%B9%84%E0%B8%A3-%E0%B9%80%E0%B8%A3%E0%B8%B4%E0%B9%88%E0%B8%A1%E0%B9%83%E0%B8%8A%E0%B9%89%E0%B8%87%E0%B8%B2%E0%B8%99%E0%B8%AD%E0%B8%A2%E0%B9%88%E0%B8%B2%E0%B8%87%E0%B9%84%E0%B8%A3-2483e761a47e">Scrum คืออะไร เริ่มใช้งานอย่างไร</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f9b5694b33f1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Install Git-SCM]]></title>
            <link>https://medium.com/@hashtagf/install-git-scm-7575eb218f8a?source=rss-17d185403b81------2</link>
            <guid isPermaLink="false">https://medium.com/p/7575eb218f8a</guid>
            <category><![CDATA[gitscm]]></category>
            <category><![CDATA[git]]></category>
            <category><![CDATA[install]]></category>
            <dc:creator><![CDATA[HashtagF]]></dc:creator>
            <pubDate>Fri, 30 Nov 2018 02:47:09 GMT</pubDate>
            <atom:updated>2018-11-30T02:47:09.101Z</atom:updated>
            <content:encoded><![CDATA[<p>Download : <a href="https://git-scm.com/">https://git-scm.com/</a></p><ol><li>Install Git SCM</li></ol><p>NEXT &gt; NEXT &gt; NEXT &gt; NEXT &gt; Finish</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/503/1*1V4zJ5-7tmwpbkXVGanDuw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/499/1*iPgE8rrERr19MJ6cJbT--Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/499/1*KExtEkV2j4BEJN_eaKiSlw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/506/1*KJYkNHlg-KHE80lL6fm8DQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/501/1*9F0RwgND2mDYf0pnfvgihQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/502/1*GIMwgWnDhqqLQqGqf9b_xQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/507/1*PBAgjdYBRwrsMc0VH5HWYg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*VPfmnMUyQoPARLbiwlBf-A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/1*6kCFEMfsT4R413o-S6BY1g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/505/1*yuIvJEB19APuUhtgwJIqog.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/504/1*BUhvPeC-KSlDtiE0cfco5g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/499/1*VrJZPW7UMlcSeQS1_9fRBQ.png" /></figure><p><strong>## Finish</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7575eb218f8a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[BestBoard Local — Install]]></title>
            <link>https://medium.com/@hashtagf/bestboard-local-install-3fe6fe01c394?source=rss-17d185403b81------2</link>
            <guid isPermaLink="false">https://medium.com/p/3fe6fe01c394</guid>
            <category><![CDATA[iot]]></category>
            <category><![CDATA[dashboard]]></category>
            <category><![CDATA[json]]></category>
            <category><![CDATA[bestboard]]></category>
            <dc:creator><![CDATA[HashtagF]]></dc:creator>
            <pubDate>Fri, 30 Nov 2018 02:26:47 GMT</pubDate>
            <atom:updated>2018-11-30T03:19:59.324Z</atom:updated>
            <content:encoded><![CDATA[<h3>BestBoard Local — Install</h3><p>this version support NodeJS</p><p>Creat By ReactJS and JSON SERVER</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*SimHS-ia5yNkUFKztjsqOw.png" /></figure><p><a href="https://github.com/flamezaxaou10/BestBoard-Local">flamezaxaou10/BestBoard-Local</a></p><p><strong>สิ่งที่ต้องมี</strong></p><ol><li>NodeJS &gt;&gt; Download : <a href="https://nodejs.org/en/">https://nodejs.org/en/</a></li><li>Git-SCM &gt;&gt; Download : <a href="https://git-scm.com/">https://git-scm.com/</a></li><li>Google Chrome</li></ol><p><a href="https://medium.com/@icecslox/node-js-%E0%B8%95%E0%B8%B4%E0%B8%94%E0%B8%95%E0%B8%B1%E0%B9%89%E0%B8%87-node-js-359f52b1bc38"><strong>วิธีการติดตั้ง NodeJS คลิ๊กได้เลยครับ</strong></a></p><p><a href="https://medium.com/@flame.zaxaou/install-git-scm-7575eb218f8a"><strong>วิธีติดตั้ง Git-SCM คลิ๊กได้เลยครับ</strong></a></p><p>วิธีการใช้งาน Local BestBoard</p><ol><li>Download BestBoard-Local ที่ลิ้งด้านบนได้เลยครับ</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1010/1*tPsM97SmMUgEpLm0m5qHlw.png" /><figcaption>กด Download Zip ทางขวาครับ</figcaption></figure><p>2. ทำการ Extract ไฟล์ออกมาจะได้ไฟล์ประมาณนี้ครับ</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/607/1*HUQxx1VnPvz__DkzAzlReg.png" /><figcaption>ไฟล์ที่ดาวโหลดมา</figcaption></figure><p>3. จากนั้นทำการเปิด Terminal ในนี้ขึ้นมาครับ</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/735/1*WKQ-i3zn8zxiy1MuQP_WFA.png" /><figcaption>หน้าต่าง Terminal</figcaption></figure><p>4. ถ้าเป็นการใช้งานครั้งแรกต้องทำการรันคำสั่ง npm install ก่อนครับ เพื่อทำการลง package ที่ต้องใช้ (ถ้าเคยลงแล้วข้ามขั้นตอนนี้ได้เลยครับ)</p><pre>$ npm install</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/739/1*Mwgr9lErzKejkprG_Rzzuw.png" /></figure><p>5. ทำการรันโปรแกรมด้วยคำสั่ง npm start</p><pre>$ npm start</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/731/1*mB5ktTyfIVbz9ywbmipnRw.png" /><figcaption>หน้าต่างเมื่อ Run สำเร็จครับ</figcaption></figure><p>6. จากนั้นทำการเข้าใช้งานได้ที่ลิ้ง <a href="/service/localhost:5000/">localhost:5000/</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0pvdSG_8JJsRM0Mm61EkBA.png" /><figcaption>หน้าต่างการใช้งานครับ</figcaption></figure><p>6. เสร็จสิ้นพร้อมใช้งานแล้วครับ</p><p>Document วิธีการใช้งานครับ</p><p><a href="https://medium.com/@flame.zaxaou/documentation-bestboard-7807cb3375a2">Documentation BestBoard</a></p><p>หมายเหตุ<br>รองรับ Google Chrome เท่านั้น…</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3fe6fe01c394" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[แนวคิดการพัฒนา Dashboard IoT ด้วย React สู่โปรเจคที่มีชื่อว่า “ BestBoard ”]]></title>
            <link>https://medium.com/@hashtagf/%E0%B9%81%E0%B8%99%E0%B8%A7%E0%B8%84%E0%B8%B4%E0%B8%94%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B8%9E%E0%B8%B1%E0%B8%92%E0%B8%99%E0%B8%B2-dashboard-iot-%E0%B8%94%E0%B9%89%E0%B8%A7%E0%B8%A2-react-%E0%B8%AA%E0%B8%B9%E0%B9%88%E0%B9%82%E0%B8%9B%E0%B8%A3%E0%B9%80%E0%B8%88%E0%B8%84%E0%B8%97%E0%B8%B5%E0%B9%88%E0%B8%A1%E0%B8%B5%E0%B8%8A%E0%B8%B7%E0%B9%88%E0%B8%AD%E0%B8%A7%E0%B9%88%E0%B8%B2-bestboard-8a12529bba1a?source=rss-17d185403b81------2</link>
            <guid isPermaLink="false">https://medium.com/p/8a12529bba1a</guid>
            <category><![CDATA[bestboard]]></category>
            <category><![CDATA[iot]]></category>
            <category><![CDATA[dashbaord]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[internet-of-things]]></category>
            <dc:creator><![CDATA[HashtagF]]></dc:creator>
            <pubDate>Tue, 13 Nov 2018 04:41:59 GMT</pubDate>
            <atom:updated>2018-11-13T04:41:59.349Z</atom:updated>
            <content:encoded><![CDATA[<p>นี่เป็นบทความที่เขียนเกี่ยวกับแนวคิดในการออกแบบ BestBoard ของเรา อาจจะเข้าใจยากหน่อยเพราะงานค่อนข้างใหญ่มาก และไม่สามารถอธิบายทุกส่วนในงานนี้ได้เนื่องจากเป็นการลง Code ซะส่วนใหญ่</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GwqB9C6Z9pZUP-ma12FV_A.png" /><figcaption>หน้าหลักของเรา</figcaption></figure><h4>อ้าว..แล้วไอ่ BestBoard นี่คืออะไร ?</h4><p>BestBoard ของเราก็คือ Dashboard ที่ไว้แสดงข้อมูลต่างๆ เกี่ยวกับอุปกรณ์ IoT ของเรานั้นเองโดยเราใช้การเชื่อมต่อกับ Broker ของไทยเราที่ทุกคนรู้จักกันดี นั้นก็คือ NETPIE …. โดยการทำงานของ BestBoard ก็จะคล้ายกับ Freeboard ของ Netpie โดยเราจะใช้ Datasource ต่างๆ ของ Netpie ในการเชื่อมต่อข้อมูลกับ BestBoard เพื่อที่จะแสดงข้อมูบที่เราต้องการ</p><h4>หลักการทำงานของ BestBoard</h4><ul><li>แสดงผลข้อมูลต่างๆ ของ Sensor ที่ส่งมายัง Netpie</li><li>สั่งการทำงานควมคุม Sensor ผ่าน Netpie</li><li>เพิ่มลบเพจที่ต้องการแสดงผลบน BestBoard</li><li>เพิ่มลบ Widget ต่างๆในเพจของ Bestboard</li></ul><h4>ขั้นตอนการทำ Project BestBoard</h4><ol><li>ศึกษาการทำงานของ Dashboard IoT ต่างๆ และหา Idea มาทำของเราเองเช่น Freeboard, Garfana, Thingsboard</li><li>ศึกษาภาษาที่ใช้เขียน Web Framework ของเรา ในที่นี้เราใช้ ReactJS นั้นเอง</li><li>ศึกการทำงานการรับส่งข้อมูลของ Netpie เพื่อที่จะนำมาใช้ในการทำงานของ BestBoard</li><li>ออกแบบหน้าตา Interface UI ให้กับ BestBoard</li><li>เลือก Widget ที่จะนำมาไว้ใช้ใน BestBoard</li><li>ทำการลงมือเขียน Code การทำงานของ BestBoard</li></ol><p>ขั้นตอนก็มีประมาณนี้ครับต่อไปไปดูหน้าเว็บคร่าวๆที่ออกแบบไว้ดีกว่า…</p><ul><li>รูปด้านล่างเป็นรูปของ Sidebar ของเว็บเรา โดยจะแบ่งเป็น 3 ส่วนหลักๆ คือ ระบบ Page, Datasource และ Color ไว้เลือก Theme ของเว็บ</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GawGQobRUsdhBXiBWF9obw.png" /><figcaption>Sidebar</figcaption></figure><h4>ระบบ Pages</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RywM-uw_ZwtFA8xEXtwwYw.png" /></figure><h4>ระบบ Datasources</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-8WKKy1ur3s1hYIZ6--5rQ.png" /></figure><h4>ระบบ Theme</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MlnwORwuzGTV-UVVOuUxLA.png" /></figure><ul><li>ต่อไปจะเป็นการออกแบบหน้า board ว่าต้องทำงานอะไรได้บ้างหรือหน้าหลักของการทำงานนั้นเอง</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iF4jpDQ21yRqwslPBa6opQ.png" /></figure><h4>ด้านบนก็เป็นหน้าหลักของเราโดยจะมีการทำงานหลักคือ</h4><ol><li>มีพื้นที่แสดง Widgets สามารถปรับขนาด widget ได้ตามต้องการและย้ายตำแหน่งของ widget</li><li>สามารถเพิ่ม แก้ไข และลบ widget ได้</li><li>มีกระดิ่งแจ้งตืนสถานะต่างๆของ board</li></ol><h4>BestBoard มี widget อะไรบ้าง ?</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zXsNjeDaAfXOfmQEy_1muw.png" /></figure><h4>Toggle</h4><p>เป็นปุ่มไว้สำหรับเปิดปิดและส่งค่าต่างๆที่เราต้องการไปยัง sensor</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DkYdFK7HP-rJ-uf4x4U4vw.png" /></figure><h4>Image</h4><p>เป็น widget ไว้สำหรับอัพรูปขึ้น board ครับ</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jB8BAQRhbHiN4M7EhT2wVg.png" /></figure><h4>Map</h4><p>widget สำหรับรับค่าละติจูด ลองติจูด สำหรับการ mark ลงแผนที่</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hRgSR3D35Ra_GfUQrI9xig.png" /></figure><h4>Image Cover</h4><p>widget เป็น cover ของ board เพื่อเพิ่มความสวยงามและสามารถเพิ่ม point ต่างๆในรูปเพื่อบอกรายละเอียดของแต่ละจุดในภาพ</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lOt37L77bJ434XDimQSOpA.png" /></figure><h4>Gauge, Progress, Number Box, Progress Bar</h4><p>widget สำหรับแสดงผลค่าต่างๆ ที่ส่งมาจาก sensor</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WMLH-HSQJ8ocylzA8OXDKg.png" /></figure><h4>LED, Button, List, HTML</h4><p>รายละเอียดแต่ละ widget อยู่ในรูปเลยครับกดขยายดูได้เลย</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yB3h9Rmme58w3KV43da3Og.png" /></figure><h4>Text, Table, Feed Chart</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-vb9XoAtvqY0GSRw9WpE3w.png" /></figure><h4>เริ่มลงมือทำการ Coding กันเลยโดยโปรเจคนี้เราใช้ React ในการเขียนครับ</h4><p>&gt;&gt; 2 – 3 Months Later</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/993/1*VrBxCzQS6p_uVnyMJyNBHA.png" /><figcaption>Code ที่เขียนทั้งหมด</figcaption></figure><p>เราได้เขียน Version (Beta) v 0.1.0 เสร็จเรียบร้อยแล้ว</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*56Yijb8JeZyp3y-tcTLLVg.png" /><figcaption>BestBoard Version (Beta) v 0.1.0</figcaption></figure><p>เมื่อทำการเขียน Code เสร็จเรียบร้อยแล้วขั้นต่อไปเราก็ต้องมาเขียน Documentation เพื่อสอนให้ผู้ใช้สามารถใช้งาน BestBoard ของเราได้ไวและเข้าใจการทำงานของมันง่ายขึ้น</p><h3>**** <a href="https://medium.com/@flame.zaxaou/documentation-bestboard-7807cb3375a2">Documentation BestBoard</a> ****</h3><p>สามารถไปทดลองใช้ได้ที่ &gt;&gt; <a href="https://bestboard.herokuapp.com/">https://bestboard.herokuapp.com</a></p><p>หากพบปัญหาหรือ Bug สามารถแจ้งเราได้ที่ใต้ comment นี้เลยครับผม</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8a12529bba1a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Documentation BestBoard]]></title>
            <link>https://medium.com/@hashtagf/documentation-bestboard-7807cb3375a2?source=rss-17d185403b81------2</link>
            <guid isPermaLink="false">https://medium.com/p/7807cb3375a2</guid>
            <category><![CDATA[bestboard]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[freeboard]]></category>
            <category><![CDATA[dashboard]]></category>
            <category><![CDATA[iot]]></category>
            <dc:creator><![CDATA[HashtagF]]></dc:creator>
            <pubDate>Tue, 13 Nov 2018 04:38:38 GMT</pubDate>
            <atom:updated>2018-11-27T04:30:32.934Z</atom:updated>
            <content:encoded><![CDATA[<p>### Documentation for BestBoard Ver. TH</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GwqB9C6Z9pZUP-ma12FV_A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*56Yijb8JeZyp3y-tcTLLVg.png" /></figure><h4>&gt;&gt; เนื้อหาในเอกสาร</h4><ul><li>วิธีสร้าง ลบ และแก้ไข Page</li><li>วิธีเพิ่ม ลบ และแก้ไข Datasource</li><li>วิธีเพิ่ม ลบ และแก้ไข Widget</li></ul><h3>Page System</h3><ul><li>วิธีเพิ่ม Page<br>เริ่มโดยการกดเพิ่มเพจมีสองวิธีคือ<br>1. ปุ่ม + ที่หน้า แรกของเว็บ<br>2. กด new page ที่เมนูด้านซ้ายของเว็บ<br>หลังจากนั้นให้ตั้ง ชื่อ เพจเป็นอันเสร็จสิ้น</li><li>วิธีแก้ไขและลบชื่อ Page<br>เอาเม้าส์ไปชี้ที่ชื่อ Page ที่ต้องการแก้ไข แล้วจะขึ้นรูปดังนี้</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/204/1*QYs8B7v2EAygihwnVPm_qg.png" /></figure><p>กดปุ่มสีขาวที่เป็นเครื่องหมายดินสอเพื่อแก้ไขชื่อ Page<br>กดปุ่มสีแดงที่เป็นเครื่องหมายลบ ( - ) เพื่อลบ Page นั้น</p><p>ปล. หากกดลบไปแล้ว widget ที่อยู่ใน เพจนั้นทั้งหมดจะหายไป</p><h3>Data source System</h3><p>ก่อนอื่นจะต้องกดปุ่ม setting ก่อนเพื่อนที่จะเห็นระบบ Datasource</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/236/1*0taWt8W4tu6f44XihnIBKw.png" /></figure><p>หลังจากกดปุ่ม setting แล้วเราจะเห็นระบบ Datasource</p><ul><li>วิธีเพิ่ม Datasource<br>กด new source ที่เมนูด้านซ้าย จะขึ้นให้กรอกข้อมูลต่างๆ ดังนี้</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/798/1*2Mj1g7kXnb2Noq5QiC-LrQ.png" /></figure><ul><li>ช่องแรกเป็นการเลือก Type ของ Datasource โดย Version ( Beta ) จะมีให้เลือกแค่อันเดียวคือ Netpie Microgear</li><li>Name : ตั้งชื่อ Datasource</li><li>APPID : นำ APPID ของ <a href="https://netpie.io/app">NETPIEAPP </a>มาใช้</li><li>Key : นำ Key ของ NETPIE มาใช้แนะนำให้ใช้ Session Key เพื่อประหยัด Credit ของคุณ</li><li>Secret : นำ Secret ของ NETPIE มาใช้จะอยู่ด้วยกันกับ KEY</li><li>Subscribed Topics : คือการเลือกการ Subscribe ของ Datasource (ค่าเริ่มต้นคือ /# หมายถึงการ Subscribe all topics) อ่าน เพิ่มเติมได้ที่ <a href="https://netpie.gitbooks.io/freeboard-reference/content/datasources.html">Netpie</a></li><li>Advance : แบ่งเป็นสองส่วนจะกรอกหรือไม่กรอกก็ได้สามารถทำงานได้เช่นกันถ้ากรอกจะเป็นการสั่งงานเพิ่มเติมของ Datasource โดยการกรอกจะใช้ Javascript ในการสั่งการด้วยคำสั่งต่างๆที่เราต้องการ</li><li>วิธีแก้ไข Datasource<br>กดที่ชื่อ Datasource ที่เราต้องการแก้ไข จากนั้นจะมีข้อมูลให้กรอกเหมือนกับการเพิ่มข้างต้น</li><li>วิธีลบ Datasource <br>นำเม้าส์ไปชี้ที่ชื่อ Datasource และวจะมีเครื่องหมายลบสีแดง ( - ) ขึ้นมาให้กดลบ</li></ul><h3>Widget System</h3><p>ก่อนจะใช้ widget ต้องเลือก Page ก่อนว่าจะเป็น widget ของ Page ไหนโดยการ คลิ๊กที่ชื่อ Page ตรงเมนูด้านซ้าย</p><ul><li>วิธีเพิ่ม Widget <br>กดที่ปุ่ม + ด้านล่างขวาของจอเราเพื่อเพิ่ม Widget <br>เมื่อกดขึ้นมาจะมี widget ให้เลือกแตกต่างกันไปในการใช้งาน</li></ul><p>แบ่ง Wiget ออกเป็น สามประเภทหลักคือ</p><ol><li>Widget สำหรับ Monitor หรือการแสดงผล</li><li>Widget สำหรับ Control หรือควบคุม</li><li>Other Widget หรือการทำงานอื่นๆ</li></ol><ul><li>ฟอร์มที่ต้องกรอกของ Widget สำหรับ Monitor ตัวอย่าง Number Box</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/585/1*6TOA66TxAstmTJQcN-_mzA.png" /><figcaption>Number Box Form</figcaption></figure><p>โดยการกรอกข้อมูลหลักๆของประเภท Monitor Widget จะอยู่ที่การดึงค่าจาก NETPIE ที่เรา Publish มาแสดงผล</p><ul><li>Title : ชื่อ Widget</li><li>Datasource : เลือก Datasource ที่เราต้องการจะดึงข้อมูล</li><li>Value : ค่าที่เราต้องการจะแสดงโดยการเลือก topic ที่เราต้องการดึง</li><li>Apply Value : เป็นการเลือการดึงค่าว่าจะใช้ของระบบเราหรือจะเป็นการพิมพ์ Javascript เองโดยการเลือก Manaul (แนะนำใช้ Automatic ของระบบเราเพื่อง่ายต่อการดึงค่ามาแสดง)</li><li>Filter Symbol : เครื่องหมายที่เราใช้แยกข้อความที่เรา publish ขึ้นมา <br>( ปล. ต้อง filter ให้ถูกเพื่อที่ค่าที่ได้มาถูกต้อง )</li><li>Example ( select Index ) : เป็นการเลือกค่าที่เราจะเอามาแสดงใน Widget</li></ul><p>นี่คือส่วนหลักๆที่ใน Monitor Widget ทุกตัวจะมีและจำเป็นต้องกรอกเพื่อให้มีค่ามาแสดง</p><ul><li>ฟอร์มที่ต้องกรอกของ Widget สำหรับ Control ตัวอย่าง Toggle</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/576/1*eTos0yUA6pM57EJPb07hrA.png" /></figure><p>โดยการกรอกข้อมูลหลักๆของ Control Widget อยู่ที่ Action ต่างๆว่าจะสั่งให้ทำงานอย่างไร</p><ul><li>Title : ชื่อ Widget</li><li>Datasource : เลือก Datasource ที่ต้องการจะใช้ใน Widget</li><li>onCreated : [1] กรอกชื่อ Microgear ที่ต้องการจะแชทด้วย <br>[2] กรอก Value ที่ต้องการไปถาม sensor เพื่อให้ค่าล่าสุด publish กลับมา</li><li>Toggle State : [1] กรอก Topic ที่ใช้เช็ค่ค่าปัจจุบันของ widget<br>[2] ค่าที่ใช้เช็คว่าค่าไหนจะเป็นจริง เช่น 1 = ON</li><li>Type : เลือกว่าจะใช้ chat หรือ publish ของ Microgear</li><li>OnToggle ON/OFF Action : <br>Topic &gt; กรอก topic ที่ต้องการจะ publish ไป<br>Value &gt; กรอก value ที่ต้องการจะ publish ไป</li></ul><p>นี่คือส่วนที่ต้องกรอกหลักๆของ Control Widget <br>ปล. ถ้าเลือกเป็น chat จะเป็นการกรอกชื่อ microgear ที่ต้องการแชทแทน</p><ul><li>ตัวอย่างฟอร์มที่ต้องกรอกของ Other Widget</li></ul><p>เริ่มที่ตัวอย่างแรกครับ</p><blockquote>Widget Image Cover</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/579/1*6k-tFvakLdl7zIq3hp-Pvw.png" /></figure><p>ก่อนอื่นเลือกรูปที่จะมาใส่ป๊อปอัพ เพื่อแสดงค่าตามรูปที่ต้องการดังตัวอย่างคือรูปแผนผังในห้องห้องนึงและมี sensor ที่โต๊ะ 1 2 และ 3 เพื่อจะให้ดูค่าต่างๆง่ายขึ้นจึงนำมาทำเป็นรูปเดียวและโชว์ค่าอุณหภูมิภายในห้องตามจุดต่างๆ</p><ul><li>Points : กด + เพื่อเพื่อเพิ่ม popup ที่จะแสดง</li><li>Title : ชื่อของแต่ละจุด</li><li>Value : ในส่วนนี้ก็เหมือนกับการกรอกแบบ monitor widget เพื่อที่จะเอาค่ามาแสดง และแต่ละจุดสามารถเพิ่มค่าที่จะแสดงได้เช่น 1 จุด แสดง 2 ค่า สลับกัน โดยการ กดปุ่ม + เพื่อเพิ่ม Value</li></ul><p>ผลลัพธ์ที่ได้มาก็จะได้แบบนี้ครับ</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/979/1*kjgdlvbN79AVetJlomOa7g.png" /><figcaption>ผลลัพธ์เมื่อเพิ่มวิดเจ็ต</figcaption></figure><p>เท่านี้ก็เป็นอันเสร็จในการเพิ่ม widget Image Cover</p><blockquote>Widget Chart</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/592/1*Ma66lLg44AnnDF7ieA56dA.png" /></figure><p>วิตเจ็ตกราฟนี้เป็นการดึงค่าจาก Feed ของ Netpie</p><ul><li>Feed ID : Feed ID ของ Netpie โดยนำมาจาก <a href="https://netpie.io/feed">https://netpie.io/feed</a></li><li>Feed API : นำ Key API ของ Feed นั้นมา</li><li>Values : กด + เพื่อเพิ่มค่าที่จะแสดงในกราฟ กราฟสามารถแสดงได้มากกว่า 1 ข้อมูล</li><li>Value : ชื่อที่มีอยู่ใน Feed นำมาแสดงและเขียนลงกราฟ</li></ul><p>การเพิ่ม widget ต่างๆก็มีประมาณนี้ในการเพิ่ม widget ตัวอื่นก็จะใช้ หลักการเดียวกันในการเพิ่ม</p><ul><li>วิธีแก้ไขและลบ Widget<br>เริ่มจากกดปุ่ม Setting ที่เมนูด้านซ้ายแล้วแต่ละ widget จะมีรูปเฟืองขึ้นมาเพื่อให้เราแก้ไขข้อมูลของ widget จากนั้นกด Save<br>และจะมีปุ่มรูปถังขยะขึ้นมาสเมื่อเรากดปุ่มนั้นจะทำการลบ widget</li></ul><p>ปล. หากลบ widget ไปแล้วไม่สามารถดึงข้อมูลกลับมาได้</p><h3>Theme System</h3><p>เป็นระบบที่ช่วยเราเลือก ธีม ของเพจแต่ละหน้าเพื่อให้เข้ากับงานที่เราต้องการแสดง</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/257/1*iNqksxOk9a07fllzE_phvw.png" /></figure><ul><li>วิธีเปลี่ยนธีม<br>กดปุ่ม Setting ที่เมนูด้านซ้ายและจะมี Color ให้เลือกที่เมนู หากเรากดสีไหนจะได้ ธีมสีนั้นๆ</li></ul><p>ในระบบของ BestBoard เราก็มีประมาณนี้หากมีปัญหาสามารถสอบถามเพิ่มเติมได้และแจ้งปัญหาที่พบเราได้ที่ใต้ Comment ได้เลย</p><h3>## Thank you ##</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7807cb3375a2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[MongoDB vs RethinkDB]]></title>
            <link>https://medium.com/@hashtagf/mongodb-vs-rethinkdb-5ad1c743f63b?source=rss-17d185403b81------2</link>
            <guid isPermaLink="false">https://medium.com/p/5ad1c743f63b</guid>
            <category><![CDATA[v]]></category>
            <category><![CDATA[mnogodb]]></category>
            <category><![CDATA[rethinkdb]]></category>
            <category><![CDATA[compare]]></category>
            <dc:creator><![CDATA[HashtagF]]></dc:creator>
            <pubDate>Tue, 14 Aug 2018 01:58:24 GMT</pubDate>
            <atom:updated>2018-08-24T01:39:44.176Z</atom:updated>
            <content:encoded><![CDATA[<p>เปรียบเทียบการทำงานของ MongoDB และ RethinkDB</p><p>RethinkDB มีพื้นฐานสถาปัตยกรรมที่แตกต่างจาก MongoDB เพื่อที่จะมีการเปลี่ยนแปลง นักพัฒนาบอกว่า RethinkDB จะมีการทำงาน Query และ Update แบบ real-time อย่างต่อเนื่อง</p><h3>1. เปรียบเทียบ Development</h3><h3>Platforms</h3><h4>MongoDB has <a href="http://www.mongodb.org/downloads">binary distributions for</a> :</h4><ul><li>Linux 32/64-bit</li><li>Windows 32/64-bit</li><li>OS X 64-bit</li><li>Solaris 64-bit</li></ul><h4>RethinkDB has <a href="https://rethinkdb.com/docs/install/">binary packages</a> available for:</h4><ul><li>Ubuntu 10.04+ 32/64-bit</li><li>OS X 10.7+ 64-bit</li><li>CentOS 6 32/64-bit</li><li>Debian Wheezy and Jessie 32/64-bit</li></ul><h3>Data Model</h3><h4>MongoDB</h4><p>MongoDB ใช้ BSON สำหรับจัดเก็บข้อมูล BSON Protocol เป็นส่วนเสริมของ JSON และสนับสนุน additional data type ที่ไม่ได้เป็นส่วนหนึ่งของ JSON (e.g. ObjectId, timestamp, datetime, etc.)</p><h4>RethinkDB</h4><p>RethinkDB จัดเก็บ JSON doccuments ด้วย binary ใน disk serialization<br>และ data type ที่ JSON สนับสนุน RethinkDB ก็สนับสนุนเช่นกัน เช่น number (double, floating-point), string, boolean, array, object, null</p><h4>สรุป</h4><p>MongoDB สนับสนุน data type มากกว่าของ RethinkDB เพราะ mongoDB ใช้ BSON ที่เป็นส่วนเสริมของ JSON และมี data type มากกว่า JSON</p><h3>Query language</h3><h4>MongoDB</h4><p>การเข้าถึงข้อมูลของ MongoDB สามารถทำได้โดยใช้ :</p><ul><li>CRUD operations ของ BSON object สำหรับการ insert, filter, update document</li><li><a href="http://docs.mongodb.org/manual/aggregation/">Aggregations</a> including <a href="http://docs.mongodb.org/manual/core/map-reduce/">map-reduce</a></li></ul><h4>RethinkDB</h4><ul><li>CRUD operations</li><li>Aggregations including <a href="https://rethinkdb.com/docs/map-reduce/">map-reduce &amp; group-map-reduce</a></li><li>Joins</li><li>Full sub-queries</li><li><a href="https://rethinkdb.com/docs/changefeeds/javascript/">Changefeeds</a></li></ul><h4>สรุป</h4><p>RethinkDB มีการ Query ที่หลากหลายกว่า MongoDB</p><h3>JavaScript integration</h3><h4>MongoDB</h4><p>MongoDB มี Libralies ที่สนับสนุนจากหลาย community และมี 10 official libraries<br>MongoDB ใช้ wire protocol เป็น TCP based และใช้ BSON</p><h4>RethinkDB</h4><p>RethinkDB มี official libraries สำหรับ JavaScript/Node.js, Python, JAVA และ Ruby นอกจากนี้ยังมี community ที่มีมากกว่าภาษาอื่น ที่สนับสนุนการใช้งานกับ client drivers <br>RethinkDB ใช้ JSON ผ่าน TCP สำหรับการสื่อสารกับ client-server</p><h4>สรุป</h4><p>MongoDB มี official libralies ที่หลากหลายกว่า RethinkDB แต่ RethinkDB มี community ที่มากกว่า MongoDB</p><h3>Indexing</h3><h4>MongoDB</h4><p>MongoDB สนับสนุน <a href="http://docs.mongodb.org/manual/indexes/">unique, compound, secondary, sparse, and geospatial indexes</a>. indexes ทั้งหมดของ MongoDB ใช้โครงสร้างข้อมูลแบบ B-tree<br>และทุกๆการ Query, Update ของ MongoDB จะใช้ index เดียวเท่านั้น</p><h4>RethinkDB</h4><p>RethinkDB สนับสนุน <a href="https://rethinkdb.com/docs/secondary-indexes/javascript/">primary key, compound, secondary, geospatial, and arbitrarily computed</a> indexes และใช้เก็บข้อมูลโดยใช้โรงสร้างข้อมูลแบบ B-trees<br>ทุกการ Query, Update ของ RethinkDB ใช้ index เดียวเท่านั้น</p><h4>สรุป</h4><p>MongoDB และ RethinkDB สนับสนุน index ที่ต่างกันแต่ใช้โครงสร้างเดียวกันในการเก็บข้อมูล indexes และเหมือนกันใช้ index เดียวในการ Query และ Update</p><h3>Cloud deployment</h3><h4>MongoDB</h4><p>MongoDB สามารถใช้งาน cloud platforms ส่วนใหญ่ได้ด้วยตนเอง เช่น AWS, Joyent, Rackspace เป็นต้น MongoDB hosting สามารถใช้ได้จากผู้ให้บริการที่หลากหลายไม่ว่าจะเป็นบริการเฉพาะหรือ solution add on หรือ Platform-as-a-Service Solution</p><h4>RethinkDB</h4><p>RethinkDB สามารถใช้งาน cloud platforms ได้ด้วยตัวเองเช่น AWS</p><h4>สรุป</h4><p>MongoDB สามารถใช้บริการ cloud platforms ได้หลากหลายกว่าและมากกว่า RethinkDB</p><h3>2. เปรียบเทียบ Administration</h3><h3>CLI Tools</h3><h4>MongoDB</h4><p>MongoDB ใช้ JavaScript Interactive Shell สามารถใช้ในการ inspecting data,test queries, creating index , maintienance script และ ฟังก์ชันอื่นๆของ Admin</p><h4>RethinkDB</h4><p>RethinkDB รวมทั้ง fine-grained cluster และองค์ประกอบของ server ไว้ในงานของ Admin ด้วยและยังสามารถเขียน scripts ได้ในภาษาใดก็ได้ที่ทำงานกับ ReSQL ได้ คำสั่งเหล่านี้สามารถใช้ได้ใน Data Explorer ของ UI admin</p><h3>UI tools</h3><h4>MongoDB</h4><p>MongoDB มี HTTP interface ที่ง่าย ซึ่งแสดงผลข้อมูล read-only เกี่ยวกับ server<br>MongoDB เสนอการแก้ปัญหา host monitoring ด้วย <a href="https://mms.mongodb.com/">MMS</a>.</p><h4>RethinkDB</h4><p>RethinkDB มี web-based ที่แสดง admin UI ของทุกๆ node ใน cluster ที่ให้การสนับสนุนในระดับสูงและมีแนวทางสำหรับการดำเนินงาน cluser</p><h3>Failover</h3><h4>MongoDB</h4><p>MongoDB Cluster มี 3 องค์ประกอบหลักคือ (mongos, mongod และ config servers) สำหรับ server ที่ไว้ใช้เก็บข้อมูล MongoDB ช่วยให้สามารถ ตั้งค่า replica sets กับ automatic primary election.</p><h4>RethinkDB</h4><p>RethinkDB สนับสนุน automatic primary re-election <a href="https://en.wikipedia.org/wiki/Raft_(computer_science)">โดยใช้ Raft algorithm</a>.</p><h3>Backup</h3><h4>MongoDB</h4><p>MongoDB มีกลไลที่แตกต่างสำหรับการสำรองข้อมูล :</p><ul><li>mongodump สามารถทำการสำรองข้อมูลสดได้</li><li><a href="http://docs.mongodb.org/manual/tutorial/backup-with-filesystem-snapshots/">disk/block level snapshots</a> สามารถใช้เพื่อสำรอง MongoDB instance เมื่อเปิดใช้งาน Journaling และเมื่อ Journaling ถูกปิดใช้งาน เป็นไปได้ที่ snapshots จะล้างข้อมูลทั้งหมดใน disk แล้ว database จะ lock</li></ul><h4>RethinkDB</h4><p>RethinkDB สนับสนุน hot backup บน live cluster ผ่าน การถ่ายโอนข้อมูล และคำสั่งเรียกคืนข้อมูล</p><h3>3. เปรียบเทียบ Scaling</h3><h3>Sharding</h3><h4>MongoDB</h4><p>MongoDB สนับสนุน automatic range-based sharding ที่ใช้กับ shard key.</p><h4>RethinkDB</h4><p>RethinkDB สนับสนุน คลิกเดียวในการ shard จาก admin UI</p><h3>Replication</h3><h4>MongoDB</h4><p>MongoDB replication ทำงานอยู่บนพื้นฐานของ Replica-sets กับ log-shipping</p><h4>RethinkDB</h4><p>RethinkDB ช่วยให้สามารถตั้งค่าการจำลองแบบได้โดยใช้ admin UI สนับสนุน sync และ async replication</p><h3>Multi Datacenter Support</h3><h4>MongoDB</h4><p>MongoDB สามารถกำหนดค่าให้ทำงานในดาต้าเซ็นเตอร์หลายแห่งโดยใช้กลไกต่างๆ :</p><ul><li>กำหนดลำดับความสำคัญให้กับสมาชิกของชุดแบบจำลอง</li><li>สนับสนุนการจำลองแบบใกล้เคียง</li><li>tagging (version 2.0+)</li></ul><h4>RethinkDB</h4><p>RethinkDB สนับสนุนการจัดกลุ่มเซิร์ฟเวอร์ร่วมกันในการกำหนดค่าใด ๆ ผ่านทาง &quot;server tags&quot; ด้วยการจำลองแบบต่อกลุ่มและการตั้งค่าการรับทราบการเขียน การอ่านและการเขียน RethinkDB แบบอ่านอย่างสม่ำเสมอไม่จำเป็นต้องใช้โปรโตคอลพิเศษ</p><h3>Map-reduce</h3><h4>MongoDB</h4><p>MongoDB สนับสนุนการใช้งานผ Map-reduce ผ่าน JavaScript โดยใช้คำสั่ง “mapReduce” ช่วยให้ filter และจัดเรียงข้อมูลได้เร็ว นอกจากนี้ยังเก็บผลไว้ใน collections ใหม่</p><h4>RethinkDB</h4><p>RethinkDB สนับสนุน map-reduce ด้วย map และ reduce command รวมทั้งคำสั่ง group-map-reduce ด้วยคำสั่ง group<br>Map-reduce ของ RethinkDB ใช้ทั้ง ReQL และ JavaScript ในการ Query<br>คำสั่ง map-reduce ของ RethinkDB สามารถเป็นส่วนหนึ่งของการ chained-queries โดยจะเป็น sub-queries ของการทำงานอื่นๆ</p><h3>Performance</h3><h4>MongoDB</h4><p>ไม่ได้เผยแพร่ Performance-number อย่างเป็นทางการใดๆ</p><h4>RethinkDB</h4><p>ยังไม่มี performance-number อย่างเป็นทางการเช่นกัน</p><h3>Concurrency</h3><h4>MongoDB</h4><p>ใช้ระบบล๊อคในระดับต่างๆเพื่อให้มั่นใจว่าข้อมูลมีความสม่ำเสมอ<br>MongoDB ใช้เธรดสำหรับจัดการการเชื่อมต่อของ client</p><h4>RethinkDB</h4><p>ในกรณีที่มีการเขียนหลายรายการใน B-tree document RethinkDB จะล็อกเฉพาะระดับบล๊อคแต่การอ่านจะยังดำเนินต่อไป</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/834/1*lwBut3oyVb_SxGmqnlEO6A.png" /><figcaption>การเปรียบเทียบ Development</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/822/1*X0zchTC8gZI0mIe7UiPaBA.png" /><figcaption>การเปรียบเทียบ Administration</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/838/1*oY5qWfZYf4xyoSkp_A3gjg.png" /><figcaption>การเปรียบเทียบ Scaling</figcaption></figure><h4>หมายเหตุ</h4><blockquote>การที่เราจะเลือกฐานข้อมูลเรานั้น ควรเลือกให้เหมาะสมกับการใช้งานที่แตกต่างกัน ทั้งนี้ที่กล่าวมาทั้งหมดหวังว่าจะทำให้เพื่อนๆสามารถเลือกฐานข้อมูลได้อย่างถูกต้องและง่ายมากยิ่งขึ้น</blockquote><h3>Reference</h3><ul><li><a href="https://rethinkdb.com/docs/comparison-tables/">https://rethinkdb.com/docs/comparison-tables/</a></li><li><a href="https://rethinkdb.com/docs/rethinkdb-vs-mongodb/">https://rethinkdb.com/docs/rethinkdb-vs-mongodb/</a></li><li><a href="https://docs.mongodb.com/">https://docs.mongodb.com/</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5ad1c743f63b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Install RethinkDB และการใช้งานเบื้องต้น On Ubuntu 18.04]]></title>
            <link>https://medium.com/@hashtagf/install-rethinkdb-%E0%B9%81%E0%B8%A5%E0%B8%B0%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B9%83%E0%B8%8A%E0%B9%89%E0%B8%87%E0%B8%B2%E0%B8%99%E0%B9%80%E0%B8%9A%E0%B8%B7%E0%B9%89%E0%B8%AD%E0%B8%87%E0%B8%95%E0%B9%89%E0%B8%99-on-ubuntu-18-04-8e76d4652ee3?source=rss-17d185403b81------2</link>
            <guid isPermaLink="false">https://medium.com/p/8e76d4652ee3</guid>
            <category><![CDATA[nosql]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[rethinkdb]]></category>
            <category><![CDATA[ubuntu]]></category>
            <dc:creator><![CDATA[HashtagF]]></dc:creator>
            <pubDate>Wed, 08 Aug 2018 07:12:23 GMT</pubDate>
            <atom:updated>2018-08-24T01:40:30.958Z</atom:updated>
            <content:encoded><![CDATA[<p>บทความนี้เป็นบทความสอนวิธีการติดตั้งและการใช้งานเบื้องต้นของ RethinkDB</p><blockquote>RethinkDB คือ เป็นฐานข้อมูลเชิง document-oriented database และเป็น free-open-source โดยฐานข้อมูลจัดเก็บในรูปแบบ JSON document ด้วย dynamic schemas และออกแบบมาเพื่ออำนวยความสะดวกในการ update แบบ Real-time และได้ผลลัพธ์ของ Query ส่งไปยัง Applications</blockquote><h3>ขั้นตอนที่ 1 : ทำการติดตั้ง RethinkDB</h3><ul><li><strong>ถ้าเป็น Ubuntu 18.04 ต้อง Download ที่ลิ้งด้านล่างนี้มาติดตั้ง</strong></li></ul><p><a href="https://github.com/srh/rethinkdb/releases/tag/v2.3.6.srh.1">srh/rethinkdb</a></p><ul><li>ที่ต้องโหลดคือ 2 ไฟล์นี้</li></ul><pre><a href="https://github.com/srh/rethinkdb/releases/download/v2.3.6.srh.1/rethinkdb_2.3.6.srh.1.0bionic_amd64.deb"><strong>rethinkdb_2.3.6.srh.1.0bionic_amd64.deb</strong></a><strong><br></strong>และ<strong><br></strong><a href="https://github.com/srh/rethinkdb/releases/download/v2.3.6.srh.1/rethinkdb-dbg_2.3.6.srh.1.0bionic_amd64.deb"><strong>rethinkdb-dbg_2.3.6.srh.1.0bionic_amd64.deb</strong></a></pre><ul><li>เมื่อ Download เรียบร้อยแล้วกดใช้งานไฟล์แล้วทำการติดตั้งตามลำดับได้เลย</li><li>ถ้าเป็น เวอร์ชั่นอื่นหรือ OS อื่นก็ทำการติดตั้งตามขั้นตอนด้านล่างนี้ได้เลยครับ</li></ul><p><a href="https://www.rethinkdb.com/docs/install/">Installing RethinkDB - RethinkDB</a></p><h3>ขั้นตอนที่ 2 : การใช้งานเบื้องต้นของ RethinkDB</h3><ul><li>ทำการเปิดหน้าต่าง Terminalใน Ubuntu และพิมพ์คำสั่งในการเปิด RethinkDB ด้วยคำสั่งด้านล่างนี้</li></ul><pre>$ rethinkdb</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/734/1*XDJzEga6GgPFAbkvGlNo2g.png" /></figure><ul><li>เท่านี้ก็สามารถใช้งาน RethinkDB ได้แล้วครับ โดยจะเข้าผ่าน localhost ทั้ง 3 port นี้ครับ</li></ul><pre><a href="http://127.0.0.1:8080/">127.0.0.1:8080</a>  Admin HTTP or Dashboard<a href="http://127.0.0.1:28015/"><br>127.0.0.1:28015</a> Client driver ไว้สำหรับเชื่อมต่อ API<br><a href="http://127.0.0.1:29015/">127.0.0.1:29015</a> Intracluster</pre><ul><li>ต่อไปจะเป็นการเข้า Admin Dashboard นะครับเพื่อใช้งานเบื้องต้นของ RethinkDB</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/997/1*7g6Ujd76oisTDr7TYVuI8w.png" /><figcaption><a href="http://127.0.0.1:8080/"><strong>127.0.0.1:8080</strong></a></figcaption></figure><ul><li>ภาพด้านบนก็จะเป็นการเข้าหน้า Dashboard ของ RethinkDB</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0TP1FHUcjxycA_zoJ4Raqw.png" /><figcaption>Menu Table</figcaption></figure><ul><li>ภาพด้านบนแสดงว่ามี Database และ Table อะไรอยู่บ้าง</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1006/1*3jzS_bYpsLfIy8veLktuzQ.png" /><figcaption>Menu Data Explorer</figcaption></figure><ul><li>เป็นหน้าการใช้คำสั่ง ReSQL เพื่อการ Query, Insert, Update, Delete ข้อมูล</li><li>ต่อไปจะเป็นการใช้คำสั่งเบื้องต้น</li></ul><ol><li>ก่อนจะทำอะไรก็ต้องสร้าง Database เพื่อมาเก็บข้อมูลก่อนโดยใช้คำสั่งดังนี้</li></ol><pre>r.dbCreate(&#39;test&#39;); สร้าง Database</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/950/1*uQxbXAjyX2jL8UuTtS1IyA.png" /></figure><p>2. สร้าง Table เพื่อมาจัดเก็บข้อมูล ใช้คำสั่งดังนี้</p><pre>r.db(&#39;test&#39;).tableCreate(&#39;test&#39;);</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/944/1*-5pIVwr9Y7zKYogalJl5bQ.png" /></figure><p>3. เมื่อมี Table แล้วก็สามารถ insert ข้อมูลได้แล้วครับ โดยใช้คำสั่ง โดยข้อมูลที่ใส่ลงไปจะอยู่ในรูปแบบ JSON</p><pre>r.db(&#39;test&#39;).table(&#39;test&#39;).insert({<br>  id : 0,<br>  user : &quot;flame&quot;,<br>  pass : &quot;pass&quot;<br>})</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/954/1*2E2v_WEaoM71FZ7dh4hdyw.png" /></figure><p>4. การ Query ข้อมูลออกมาแสดงผล ใช้คำสั่ง</p><pre>r.db(&#39;test&#39;).table(&#39;test&#39;);</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/950/1*mRGm5ORV85rBSbQr_OFGaQ.png" /></figure><p>5. การ Update ข้อมูล สามารถทำได้โดยใช้คำสั่งดังนี้</p><pre>r.db(&#39;test&#39;).table(&#39;test&#39;).get(0).update({<br>  user : &quot;flameUpdate&quot; <br>})</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/953/1*YY0P4fbZmOaPu3dnsKkGlw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/950/1*etLgA4ERw0yMrt8xKWZSxA.png" /><figcaption>user ได้ทำการอัพเดทแล้ว</figcaption></figure><p>6. การ Delete ข้อมูลใน Table สามารถทำโดยใช้คำสั่งดังนี้</p><pre>r.db(&#39;test&#39;).table(&#39;test&#39;).get(0).delete()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/953/1*nh4vEP3-x_vk1iZ9k_elZQ.png" /></figure><ul><li>ทั้งหมดนี้เป็นคำสั่งการใช้งานเบื้องต้นครับยังมีคำสั่งอีกมากมายในการใช้งานกับ RethinkDB</li></ul><h3>Reference</h3><ul><li><a href="https://en.wikipedia.org/wiki/RethinkDB">https://en.wikipedia.org/wiki/RethinkDB</a></li><li><a href="https://www.rethinkdb.com/docs/">https://www.rethinkdb.com/docs/</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8e76d4652ee3" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>