<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="/feed.xml" rel="self" type="application/atom+xml" /><link href="/" rel="alternate" type="text/html" /><updated>2025-02-25T14:35:34+00:00</updated><id>/feed.xml</id><title type="html">Reikron’s Devlog</title><subtitle></subtitle><entry><title type="html">Command Query Separation</title><link href="/2025/02/24/command-query-separation.html" rel="alternate" type="text/html" title="Command Query Separation" /><published>2025-02-24T00:00:00+00:00</published><updated>2025-02-24T00:00:00+00:00</updated><id>/2025/02/24/command-query-separation</id><content type="html" xml:base="/2025/02/24/command-query-separation.html"><![CDATA[<h2 id="command-query-separation-cqs">Command Query Separation (CQS)</h2>

<p>Command Query Separation (CQS) is a principle that helps in structuring applications by separating operations that change state (commands) from those that only retrieve data (queries).</p>

<h3 id="commands">Commands</h3>

<p>Commands modify the system state and involve:</p>

<ol>
  <li><strong>Validate Parameters</strong> – Ensuring inputs meet expected criteria.</li>
  <li><strong>Read from Database</strong> – Sometimes necessary for pre-checks.</li>
  <li><strong>Perform Action</strong> – Executing business logic.</li>
  <li><strong>Write to Database</strong> – Persisting changes.</li>
  <li><strong>Log Event</strong> – Tracking changes or actions.</li>
  <li><strong>Update View</strong> – Reflecting changes in the UI or API response.</li>
</ol>

<h3 id="queries">Queries</h3>

<p>Queries do not modify the state and involve:</p>

<ol>
  <li><strong>Validate Parameters</strong> – Ensuring inputs are correct.</li>
  <li><strong>Read from Database</strong> – Retrieving required data.</li>
  <li><strong>Update View</strong> – Presenting the data.</li>
</ol>

<h3 id="validation">Validation</h3>

<p>Validation applies to both commands and queries:</p>

<ol>
  <li><strong>Check Values</strong> – Ensuring correctness (e.g., required fields, format).</li>
  <li><strong>Check Service and Persistence Constraints</strong> – Ensuring integrity across business rules and database constraints.</li>
</ol>

<h3 id="event-handling">Event Handling</h3>

<p>Events help with decoupling components:</p>

<ol>
  <li><strong>Communication Between Components or Endpoints</strong> – Examples include WebSockets, message queues, or APIs exchanging XML/JSON payloads.</li>
</ol>]]></content><author><name></name></author><summary type="html"><![CDATA[Command Query Separation (CQS)]]></summary></entry><entry><title type="html">Desktop-First Top-Down Development Approach</title><link href="/2025/02/24/desktop-first-top-down-development-approach.html" rel="alternate" type="text/html" title="Desktop-First Top-Down Development Approach" /><published>2025-02-24T00:00:00+00:00</published><updated>2025-02-24T00:00:00+00:00</updated><id>/2025/02/24/desktop-first-top-down-development-approach</id><content type="html" xml:base="/2025/02/24/desktop-first-top-down-development-approach.html"><![CDATA[<p><strong>Desktop-First Top-Down Development Approach</strong></p>

<ol>
  <li>
    <p><strong>Design for large screens first</strong><br />
Build the full-size version of the website, maximizing available screen space.</p>
  </li>
  <li>
    <p><strong>Adapt for smaller devices</strong><br />
Use @media queries to define breakpoints and ensure responsive styling.</p>
  </li>
  <li>
    <p><strong>Utilize mock data</strong><br />
Since the API isn’t ready, simulate user interactions with mock data.</p>
  </li>
  <li>
    <p><strong>Refine the UI and define the API</strong><br />
Ensure the UI is fully responsive and functional across all screen sizes.</p>
  </li>
  <li>
    <p><strong>Align the API with frontend needs</strong><br />
Design an API that supports the frontend’s requirements. Gradually replace mock data with real API calls while validating responses and handling errors.</p>
  </li>
  <li>
    <p><strong>Develop and integrate the backend</strong><br />
Build the backend and database schema based on the finalized frontend structure.</p>
  </li>
  <li>
    <p><strong>Validate API interactions</strong><br />
Ensure seamless communication between the UI and backend.</p>
  </li>
</ol>

<p>This top-down development approach ensures that the UI dictates data structure and interactions, resulting in a user-centric, scalable, and efficient application.</p>]]></content><author><name></name></author><summary type="html"><![CDATA[Desktop-First Top-Down Development Approach]]></summary></entry></feed>