<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Toluwanimi </title>
    <description>The latest articles on DEV Community by Toluwanimi  (@toluxx).</description>
    <link>https://dev.to/toluxx</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1433687%2F295a97d7-d40a-4400-990c-2d0286731123.jpg</url>
      <title>DEV Community: Toluwanimi </title>
      <link>https://dev.to/toluxx</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/toluxx"/>
    <language>en</language>
    <item>
      <title>Designing REST API Requests and Responses That Scale Without Breaking Clients</title>
      <dc:creator>Toluwanimi </dc:creator>
      <pubDate>Tue, 20 Jan 2026 09:00:00 +0000</pubDate>
      <link>https://dev.to/toluxx/designing-rest-api-requests-and-responses-that-scale-without-breaking-clients-16df</link>
      <guid>https://dev.to/toluxx/designing-rest-api-requests-and-responses-that-scale-without-breaking-clients-16df</guid>
      <description>&lt;p&gt;It’s funny how most API problems show up in the space between requests and responses.&lt;/p&gt;

&lt;p&gt;Most endpoints look fine on paper, but as soon as payloads grow too large, responses become inconsistent, and clients start making extra calls just to get basic data. And that’s how performance slowly drops.&lt;/p&gt;

&lt;p&gt;How then do you design REST API requests and responses that stay fast, predictable, and easily evolve? &lt;/p&gt;

&lt;p&gt;In ths guide, I’ll walk you through how to structure request payloads, shape JSON responses, handle errors cleanly, and make version changes without you breaking consumers.&lt;/p&gt;

&lt;p&gt;By getting this layer right, your API becomes easier to use, easier to scale, and far less likely to cause surprises in production.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;This article is for you if you:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Design or maintain REST APIs&lt;/li&gt;
&lt;li&gt;Work on backend or platform teams&lt;/li&gt;
&lt;li&gt;Want APIs that scale without constant refactors&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Structuring REST API Requests for Performance and Clarity
&lt;/h3&gt;

&lt;p&gt;A well-structured REST API request does two things at once: it tells the server exactly what you want, and it does that with the least possible overhead. When a request is vague, bloated, or inconsistent, performance tends to suffer long before traffic becomes “large.”&lt;/p&gt;

&lt;p&gt;So to avoid that, start with clear, resource-focused URLs. Making sure each request links to a single resource or a well-defined collection. Avoid endpoints that try to do too much, such as &lt;code&gt;/getUserAndOrdersAndStats&lt;/code&gt;. If a client needs multiple resources, you’ll have to design separate endpoints or use query parameters to shape the response instead of overloading the request.&lt;/p&gt;

&lt;p&gt;Make use of HTTP methods intentionally. &lt;code&gt;GET&lt;/code&gt; Requests should never change state and should be safe to cache. &lt;code&gt;POST&lt;/code&gt; creates, &lt;code&gt;PUT&lt;/code&gt; replaces, &lt;code&gt;PATCH&lt;/code&gt; updates partially, and &lt;code&gt;DELETE&lt;/code&gt; removes. When your method usage is consistent, then servers can optimize behavior and clients can reason about performance more easily.&lt;/p&gt;

&lt;p&gt;Also, make sure to keep request payloads small and purposeful by only sending fields the server actually needs. Large JSON bodies increase parsing time and memory usage, most especially under high concurrency. If an operation only needs an ID and a status flag, don’t send the entire object.&lt;/p&gt;

&lt;p&gt;Query parameters are also your best tool for read-heavy endpoints. Use them for filtering, pagination, sorting, and field selection. For example, &lt;code&gt;?page=2&amp;amp;limit=20&amp;amp;status=active&lt;/code&gt; is easier to cache, debug, and optimize than embedding the same logic in a request body.&lt;/p&gt;

&lt;p&gt;Make sure you're explicit about data formats by always defining and documenting required and optional fields. Also, make use of consistent naming conventions across all your requests by sticking to one style, which is usually &lt;code&gt;snake_case&lt;/code&gt; or &lt;code&gt;camelCase&lt;/code&gt; and apply it everywhere. Making sure you’re mixing styles increases client complexity and leads to unnecessary transformation logic.&lt;/p&gt;

&lt;p&gt;Validate requests early and fail fast. Reject malformed or incomplete requests before they reach deeper layers of your system. This protects downstream services and keeps your API responsive under load.&lt;/p&gt;

&lt;p&gt;When designing, design requests with observability in mind by including request IDs or correlation headers so you can trace performance issues without inspecting payloads. A clear and well-structured requests make scaling your REST API significantly easier without changing your infrastructure.&lt;/p&gt;

&lt;h3&gt;
  
  
  Standard REST API Response Formats (With Examples)
&lt;/h3&gt;

&lt;p&gt;A scalable REST API lives or dies by its response format, and if responses are inconsistent, clients get stressed, and performance tuning turns into guesswork. To avoid that, standardizing your response structure helps you to solve this early.&lt;/p&gt;

&lt;p&gt;Most production-ready REST APIs return a JSON object, not raw values or arrays, and this gives you room to evolve without breaking clients.&lt;/p&gt;

&lt;p&gt;A common and scalable pattern looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"data"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"meta"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"error"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;


&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Clients always know exactly where to look. Parsing becomes trivial and backward compatibility tend to improve.&lt;/p&gt;

&lt;p&gt;To get successful responses, place the actual resource inside &lt;code&gt;data&lt;/code&gt;. and avoid wrapping fields directly at the root level.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;: fetching a user resource.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"data"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"u_123"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"email"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"user@example.com"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"status"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"active"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"created_at"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"2025-01-10T14:22:00Z"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"meta"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"request_id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"req_9f82a"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"error"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;


&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This format works because you can add metadata, pagination info, rate-limit data, or request tracing without touching the resource itself.&lt;/p&gt;

&lt;p&gt;For list endpoints, return arrays inside &lt;code&gt;data&lt;/code&gt;, not at the top level&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"data"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"u_123"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"email"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"user@example.com"&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"u_124"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"email"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"admin@example.com"&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"meta"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"page"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"limit"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"total"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;245&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"error"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;


&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Pagination metadata is not optional at scale. Clients need it to avoid over-fetching and to build efficient UIs.&lt;/p&gt;

&lt;p&gt;Error responses should follow the same structure. Never return a completely different JSON shape just because something failed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;: validation error.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"data"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"meta"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"request_id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"req_9f82a"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"error"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"code"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"INVALID_EMAIL"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"message"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Email address is not valid"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"details"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"field"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"email"&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;


&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This approach keeps error handling consistent across clients, whether they’re web apps, mobile apps, or other services.&lt;/p&gt;

&lt;p&gt;Make sure you always pair response bodies with the correct HTTP status codes. &lt;code&gt;200&lt;/code&gt; for success, &lt;code&gt;201&lt;/code&gt; for creation, &lt;code&gt;400&lt;/code&gt; for client errors, &lt;code&gt;401&lt;/code&gt; or &lt;code&gt;403&lt;/code&gt; for auth issues, and &lt;code&gt;500&lt;/code&gt; for server failures. The status code tells the high-level story, and the response body provides detail.&lt;/p&gt;

&lt;p&gt;Keeping field names stable and renaming response fields is one of the fastest ways to break consumers. If a change is unavoidable, version the API or introduce new fields alongside the old ones.&lt;/p&gt;

&lt;p&gt;Keep your responses clean, intentional, and boring in the best way, as standard REST API response formats make your API easier to consume, easier to debug, and far more resilient as traffic and complexity grow.&lt;/p&gt;

&lt;h3&gt;
  
  
  Handling Errors Consistently Using HTTP Status Codes
&lt;/h3&gt;

&lt;p&gt;Error handling is where a lot of REST APIs quietly fall apart. Having inconsistent status codes forces clients to guess what went wrong, retry unnecessary things, or fail in unpredictable ways. At that point, guesswork becomes expensive.&lt;/p&gt;

&lt;p&gt;To avoid all that, start by treating HTTP status codes as the first layer of error communication. The status code answers the &lt;em&gt;what&lt;/em&gt;, while the response body explains the &lt;em&gt;why&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Use &lt;code&gt;400 Bad Request&lt;/code&gt; invalid input. This includes missing required fields, invalid data types, or failed validation rules. If the client can fix the request, &lt;code&gt;400&lt;/code&gt; is usually the right choice.&lt;/p&gt;

&lt;p&gt;Use &lt;code&gt;401 Unauthorized&lt;/code&gt; When authentication is missing or invalid. This signals that credentials are required or incorrect, and do not use &lt;code&gt;401&lt;/code&gt; for permission issues after authentication.&lt;/p&gt;

&lt;p&gt;Use &lt;code&gt;403 Forbidden&lt;/code&gt; When authentication succeeds but access is denied. The client is known, but the action is not allowed. Therefore mixing &lt;code&gt;401&lt;/code&gt; and &lt;code&gt;403&lt;/code&gt; often creates confusion and breaks authorization logic on the client side.&lt;/p&gt;

&lt;p&gt;Use &lt;code&gt;404 Not Found&lt;/code&gt; when a requested resource does not exist. Avoid using &lt;code&gt;404&lt;/code&gt; for validation errors or authorization failures. Clients rely on &lt;code&gt;404&lt;/code&gt; to decide whether to retry, redirect, or stop.&lt;/p&gt;

&lt;p&gt;Use &lt;code&gt;409 Conflict&lt;/code&gt; for state-related issues. This applies when a request is valid but cannot be completed due to a resource conflict, might be a duplicate records or version mismatches.&lt;/p&gt;

&lt;p&gt;Use &lt;code&gt;422 Unprocessable Entity&lt;/code&gt; When the request is well-formed but incorrect. This is useful for complex validation errors where &lt;code&gt;400&lt;/code&gt; is too generic.&lt;/p&gt;

&lt;p&gt;Reserve &lt;code&gt;500 Internal Server Error&lt;/code&gt; for unexpected failures. If the server caused the problem and the client cannot fix it, this is the correct signal. Try to avoid leaking internal details in these responses and always return a response body that matches your standard error format.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;: validation error.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"data"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"meta"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"request_id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"req_3a91c"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"error"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"code"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"VALIDATION_ERROR"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"message"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"One or more fields are invalid"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"details"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"email"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Email format is incorrect"&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;


&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Pairing this with a &lt;code&gt;400&lt;/code&gt; or &lt;code&gt;422&lt;/code&gt; status code allows clients to react correctly without inspecting the message text.&lt;/p&gt;

&lt;p&gt;Keep error codes stable and machine-readable. Human-readable messages can change, but error codes should not. This makes client-side handling reliable across versions.&lt;/p&gt;

&lt;p&gt;An API that rejects bad requests early using clear HTTP status codes protects downstream systems and stays predictable under load. That predictability is what keeps your API from breaking in production.&lt;/p&gt;

&lt;h3&gt;
  
  
  Versioning Your API Without Breaking Existing Clients
&lt;/h3&gt;

&lt;p&gt;Breaking changes is one of the fastest ways to lose trust in an API. Once clients depend on your endpoints, even slight change can cause production failures which is why versioning exists to give you room to evolve without forcing everyone to upgrade at once.&lt;/p&gt;

&lt;p&gt;One of the safest approach is &lt;strong&gt;explicit versioning,&lt;/strong&gt; as clients should always know which version they would be calling.&lt;/p&gt;

&lt;p&gt;The most common and practical method is &lt;strong&gt;URL-based versioning&lt;/strong&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;/api/v1/users
/api/v2/users


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is easy to understand, easy to route, and easy to remove. Caches, logs, and monitoring tools also work better when the version is visible in the path.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Header-based versioning&lt;/strong&gt; is another option, usually via a custom header.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;Accept: application/vnd.example.v1+json


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This keeps URLs clean but also increases client complexity and makes debugging harder. If your audience includes beginners or third-party consumers, URL versioning is usually the safer choice.&lt;/p&gt;

&lt;p&gt;Avoid versioning by query parameters. Patterns like &lt;code&gt;?version=1&lt;/code&gt; are easy to misuse and often get ignored by caches and proxies. Also not every changes requires a new version. Additive changes such as adding new optional fields to responses are usually safe, removing fields, renaming fields, or changing response formats are breaking changes and should trigger a new version.&lt;/p&gt;

&lt;p&gt;When introducing a new version, make sure to keep the old one running long enough for clients to migrate. And try as much as possible to communicate deprecations clearly through documentation, response headers, or both.&lt;/p&gt;

&lt;p&gt;A common pattern is to include a deprecation warning in responses:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;Deprecation&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
&lt;span class="na"&gt;Sunset&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;2025-12-31&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This gives clients a timeline without forcing immediate action.&lt;/p&gt;

&lt;p&gt;Keep versions stable and boring, version numbers should reflect breaking changes not feature releases. And avoid jumping versions unnecessarily or maintaining too many versions at once.&lt;/p&gt;

&lt;p&gt;Lastly, make sure you test multiple versions in parallel. Your API infrastructure should allow v1 and v2 to coexist cleanly, with shared logic where possible. This helps to reduce operational risk and keeps evolution predictable.&lt;/p&gt;

&lt;p&gt;Versioning done right lets your REST API grow without breaking existing clients and without creating long-term maintenance pain.&lt;/p&gt;

&lt;p&gt;See you next time. Ciaaaaoooo&lt;/p&gt;

</description>
      <category>api</category>
      <category>backend</category>
      <category>webdev</category>
      <category>architecture</category>
    </item>
    <item>
      <title>AI Ops for Small Engineering Teams: A Simple Guide Without the Enterprise Jargon</title>
      <dc:creator>Toluwanimi </dc:creator>
      <pubDate>Wed, 10 Dec 2025 14:00:00 +0000</pubDate>
      <link>https://dev.to/toluxx/ai-ops-for-small-engineering-teams-a-simple-guide-without-the-enterprise-jargon-d2p</link>
      <guid>https://dev.to/toluxx/ai-ops-for-small-engineering-teams-a-simple-guide-without-the-enterprise-jargon-d2p</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Most machine learning models fail silently before anyone notices.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffr3kbcwrkb4wcax7h4p6.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffr3kbcwrkb4wcax7h4p6.gif" alt="gif" width="480" height="270"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That quote came from an ML engineer at a startup, and it stuck with me. Not because it was shocking, but because I feel it’s actually true. And the fact that most people don’t realize that most ML failures aren’t really caused by bad models, but by everything around the model. Monitoring, drift. Versioning, deployment, all these small things are what spiral into big fires.&lt;/p&gt;

&lt;p&gt;Which is why I wrote this article about fixing that without enterprise jargon, without Fortune-500 budgets, and without a 10-person AI Ops team. Perhaps you’re a solo founder, indie developer, or part of a tiny engineering team; this is for you.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why ML Breaks in Production for Small Teams
&lt;/h3&gt;

&lt;p&gt;Imagine you’ve built a model that helps to predict customer churn. It’s clean, it’s fast, and it works beautifully on your laptop. But two weeks after you've deployed it, customers start complaining about the predictions looking “strange.” You then went to check the logs, and everything seems to be fine. No errors, no alerts, no warnings. All that's there are just wrong outputs.&lt;/p&gt;

&lt;p&gt;Congratulations, you’ve just successfully experienced the classic silent failure of ML, and small teams tend to struggle because of this; they struggle because:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  They don’t have full-time ML Ops engineers&lt;/li&gt;
&lt;li&gt;  They can’t afford heavy infrastructure&lt;/li&gt;
&lt;li&gt;  They rely on quick patches instead of full systems&lt;/li&gt;
&lt;li&gt;  They monitor logs, but not model behavior&lt;/li&gt;
&lt;li&gt;  They assume a “working” model will keep working&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Which is where most failures begin, because maintenance is exactly what most small teams tend to skip; they don’t know what exactly to maintain.&lt;/p&gt;

&lt;h3&gt;
  
  
  What are The Real Problems?
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;Monitoring&lt;/strong&gt;: A model output can drift far from reality while your infrastructure may look perfect. You monitor servers, you monitor endpoints. But do you monitor what the model predicts?&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Data Drift&lt;/strong&gt;: Your model might've been trained on yesterday’s world, but users change, markets change, and behavior changes. If at all, your input distribution shifts just a little bit, the performance drops silently.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Versioning&lt;/strong&gt;: If you can’t reproduce your experiments, you can’t fix failing ones because ML models aren’t code, they’re snapshots of data, experiments, and hyperparameters.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;According to research, at least these three issues cause 80% of production ML failures for small teams. But on the bright side, they’re all fixable without heavy systems like Kubernetes, Databricks, Airflow, or enterprise-grade ML.&lt;/p&gt;

&lt;h3&gt;
  
  
  Lightweight Tools That Actually Work for Small Teams
&lt;/h3&gt;

&lt;p&gt;Here are some tools designed for startups and solo engineers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;BentoML&lt;/strong&gt;: For packaging &amp;amp; serving models, it's simple, clean, Docker-friendly, and lets you turn any model into a reliable API.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Phoenix (Arize)&lt;/strong&gt;: For monitoring and drift, it's perfect for anomaly detection, embeddings, drift tracking, and root-cause analysis.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Neptune&lt;/strong&gt;: For experiment tracking, keeping records of model versions, parameters, and results. No more “which notebook did I use?”&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Weights &amp;amp; Biases&lt;/strong&gt;: For lifecycle tracking, it has powerful but simple dashboards, and it's great for runs, artifacts, and team visibility.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;None of these tools requires heavy infrastructure or a large team. Most of them have free tiers, and all are friendly for small operations.&lt;/p&gt;

&lt;h3&gt;
  
  
  A Simple Pipeline Any Small Team Can Use
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftu9lgkihqsg2w7g1c7ed.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftu9lgkihqsg2w7g1c7ed.png" alt="pipline image" width="800" height="175"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Train your model locally by tracking experiments with Neptune or W&amp;amp;B.&lt;/li&gt;
&lt;li&gt; Build a Docker image easily by packaging it with BentoML to create a model server with a single command.&lt;/li&gt;
&lt;li&gt; Deploy your cheapest option, it could be &lt;a href="http://fly.io/" rel="noopener noreferrer"&gt;Fly.io&lt;/a&gt;, Render, Railway, or a small VM&lt;/li&gt;
&lt;li&gt; Use Phoenix for monitoring by sending predictions and input data to Phoenix to automatically track drift and anomalies.&lt;/li&gt;
&lt;li&gt; Add auto-alerts just in case confidence drops or drift spikes, send yourself a Slack/email alert.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;By doing all these, you'll get a clean, functional ML Ops setup. No Kubernetes cluster, no massive infrastructure.&lt;/p&gt;

&lt;h3&gt;
  
  
  How to Detect Failure Early (Without Fancy Tools)
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F04a245ya9ykq3a6g7j4q.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F04a245ya9ykq3a6g7j4q.gif" alt="how to detect" width="500" height="357"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Detecting or catching failure doesn't come easy, but one of the FASTEST ways to catch ML failures early is to:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Monitor confidence scores. If your model suddenly becomes “less sure,” then something is wrong.&lt;/li&gt;
&lt;li&gt; Compare recent predictions with historical ones. If the shape changes, that means you have a drift.&lt;/li&gt;
&lt;li&gt; Log inputs and outputs (even in CSV at first); it's impossible to fix what you don’t record.&lt;/li&gt;
&lt;li&gt; Add a “canary model”, try running a tiny baseline model in the background to compare predictions.&lt;/li&gt;
&lt;li&gt; Ask users. Small teams often forget the simplest monitoring tool, which is feedback. Even a one-line “Was this prediction helpful?” button can save you a lot of stress&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  How Small Teams Can Keep Their AI Systems Running Smoothly
&lt;/h3&gt;

&lt;p&gt;Before Deployment, make sure you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Track experiments&lt;/li&gt;
&lt;li&gt;  Save model versions&lt;/li&gt;
&lt;li&gt;  Package model cleanly&lt;/li&gt;
&lt;li&gt;  Add input validation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;During Deployment, make sure you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Log inputs and predictions&lt;/li&gt;
&lt;li&gt;  Store metadata (timestamps, versions)&lt;/li&gt;
&lt;li&gt;  Monitor performance metrics&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After Deployment, make sure you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Track drift (data &amp;amp; concept)&lt;/li&gt;
&lt;li&gt;  Compare outputs to benchmarks&lt;/li&gt;
&lt;li&gt;  Add alerts&lt;/li&gt;
&lt;li&gt;  Re-train periodically&lt;/li&gt;
&lt;li&gt;  Test with a small batch before full release&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Following these steps helps you to handle ML Ops better than having 50-person teams.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;In essence, the main message of this article is quite simple: as a small team, you can run ML in production reliably with lightweight tools and simple habits. AI ops doesn't have to be scary, it doesn’t have to be expensive, and you definitely don’t need enterprise jargon to make your models behave.&lt;/p&gt;

&lt;p&gt;If you treat your model like a living system instead of a one-time project, it will surely reward you with stability, accuracy, and fewer late-night moments of wondering “why is it broken?”&lt;/p&gt;

&lt;p&gt;See you next time. Ciaaaaaoooooooo&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>devops</category>
      <category>machinelearning</category>
      <category>ai</category>
    </item>
    <item>
      <title>How Non-Developers Are Building Apps: Low-Code &amp; No-Code Platforms</title>
      <dc:creator>Toluwanimi </dc:creator>
      <pubDate>Tue, 18 Nov 2025 14:00:00 +0000</pubDate>
      <link>https://dev.to/toluxx/how-non-developers-are-building-apps-low-code-no-code-platforms-37pm</link>
      <guid>https://dev.to/toluxx/how-non-developers-are-building-apps-low-code-no-code-platforms-37pm</guid>
      <description>&lt;p&gt;A few years ago, building an app felt more like you were climbing a mountain because you needed to know how to code, understand databases, set up servers, and even wrestle with deployment tools.&lt;/p&gt;

&lt;p&gt;But things seem to have changed. Let's say you're a fashion store owner and you have an idea for an app that could let your customers browse outfits and place orders directly from their phones, and obviously, you don’t know how to code. In fact, you've never written a single line of JavaScript.&lt;/p&gt;

&lt;p&gt;But still, you opened a Glide, a no-code platform, connected your Google Sheet, and within hours, your app was live. No complex syntax. No developer needed. A few years ago, that would’ve sounded impossible. But today, it’s now a movement.&lt;/p&gt;

&lt;h3&gt;
  
  
  What Are Low-Code and No-Code Platforms?
&lt;/h3&gt;

&lt;p&gt;No-code platforms are platforms that let you build apps without writing a single code. While Low-code platforms allow you to build most parts visually, you can also add small bits of code for flexibility. Think of it like you're building with LEGO blocks. Instead of handcrafting each piece, you pick what you need, snap it into place, and see your app come alive. Some typical examples include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  No-code: Glide, Bubble, Adalo, Softr&lt;/li&gt;
&lt;li&gt;  Low-code: OutSystems, Mendix, PowerApps, AppSheet&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Basically, they make use of drag-and-drop tools, templates, and logic builders so that people without technical backgrounds can create apps, websites, and workflows.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why Does This Shift Matter
&lt;/h3&gt;

&lt;p&gt;Here’s a surprising fact: according to Gartner, by 2026, 80% of software development will involve low-code or no-code tools.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8dk4bwo5a3e0r2wsu94b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8dk4bwo5a3e0r2wsu94b.png" alt="Gartner" width="800" height="357"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Which means the next big app idea might not come from a developer at all; it might come from a teacher, a small business owner, or probably a student with a laptop and a dream.&lt;/p&gt;

&lt;p&gt;Don't get me wrong, this isn’t about replacing developers. It’s about &lt;strong&gt;making the ability to build software and applications accessible to everyone, not just professional developers⁠&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For decades, software was gatekept by complexity, and now, people can turn ideas into real, working tools that are fast, cheap, and with minimal technical knowledge.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why Non-Developers Are Embracing It
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Affordability&lt;/strong&gt;: Hiring a development team at times might be too expensive. Especially for small businesses, that’s often a deal-breaker for **them. So, No-code platforms lower that barrier for them.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Speed&lt;/strong&gt;: You don’t have to wait months for a development cycle. You can simply go from idea to prototype in hours. Startups tend to validate their ideas faster, and entrepreneurs can launch their MVPs (minimum viable products) without big budgets.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Empowerment&lt;/strong&gt;: For the first time, people who’ve never coded can bring their ideas to life. It’s not just about saving money alone; it’s about having control. No more waiting on developers, no more long communication loops. Just creativity in action.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  But Wait, Where Do Developers Fit In?
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimages.unsplash.com%2Fphoto-1629131973033-30f604f0434a%3Fixlib%3Drb-4.1.0%26q%3D85%26fm%3Djpg%26crop%3Dentropy%26cs%3Dsrgb" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimages.unsplash.com%2Fphoto-1629131973033-30f604f0434a%3Fixlib%3Drb-4.1.0%26q%3D85%26fm%3Djpg%26crop%3Dentropy%26cs%3Dsrgb" alt="Shocked" width="600" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Some developers worry that low-code and no-code tools will replace them. Relax, that’s a myth. The reality is that most of these tools handle the simple, repetitive stuff like the internal dashboards, forms, or small apps. But when it comes to scalable systems, complex integrations, or security-critical software, no one is touching a developer; developers are irreplaceable. In fact, a lot of companies now use hybrid approaches whereby:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Developers handle backend logic, databases, and integrations.&lt;/li&gt;
&lt;li&gt;  Non-developers handle the front-end or workflows using no-code tools.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It’s basically teamwork, not replacement.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Challenges of No-Code and Low-Code Platforms
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Limited Customization&lt;/strong&gt;: On the platform, you’re often limited to what you can do and what you're allowed to do. If you want something unique, like a custom algorithm or unusual UI, you won't be able to achieve that.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Vendor Lock-In&lt;/strong&gt;: Let’s say you build an app on a no-code platform, and you plan to move it elsewhere later; it will be hard because some platforms don’t let you export your full codebase.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Scalability and Security&lt;/strong&gt;: No-code apps work well for small use cases, but scaling them to enterprise levels can be a little bit tricky, as developers will often need to refactor or rebuild them later. But, for many small startups and creators, these downsides are worth the trade-off, especially in developing markets where resources are limited.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Developers Are Joining the Revolution
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimages.unsplash.com%2Fphoto-1624377632657-3902bfd35958%3Fixlib%3Drb-4.1.0%26q%3D85%26fm%3Djpg%26crop%3Dentropy%26cs%3Dsrgb" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimages.unsplash.com%2Fphoto-1624377632657-3902bfd35958%3Fixlib%3Drb-4.1.0%26q%3D85%26fm%3Djpg%26crop%3Dentropy%26cs%3Dsrgb" alt="Developer" width="600" height="399"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Interestingly, more developers are also using low-code tools themselves. Why? Because they speed up work, instead of you building an internal tool from scratch, as a developer might choose to use Retool or Budibase to drag and drop components. It saves hours, even days of coding.&lt;/p&gt;

&lt;p&gt;Some call it &lt;strong&gt;“developer-assisted no-code,”&lt;/strong&gt; whereby developers use these tools just to focus more on logic and less on setup.&lt;/p&gt;

&lt;p&gt;As one developer once put it:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;No-code doesn’t replace us; it just helps us to remove the boring parts.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  The Future: Collaboration Between Coders and Creators
&lt;/h3&gt;

&lt;p&gt;Just imagine a future where:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  A marketer builds the front-end of a campaign app in Bubble.&lt;/li&gt;
&lt;li&gt;  A developer hooks it to an API for live data.&lt;/li&gt;
&lt;li&gt;  A product manager tweaks workflows in Zapier or Airtable.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Well, that's already happening. The line between &lt;strong&gt;technical&lt;/strong&gt; and &lt;strong&gt;non-technical&lt;/strong&gt; is blurring. The new world of app development isn’t just about code; it’s about creativity, logic, and collaboration.&lt;/p&gt;

&lt;h3&gt;
  
  
  Getting Started With No-Code / Low-Code
&lt;/h3&gt;

&lt;p&gt;If you’re curious, here are a few tips on how to begin:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Start small&lt;/strong&gt;. Build a personal project, maybe a to-do app or feedback form.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Choose a platform&lt;/strong&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Want to build an app? Try Glide, Adalo, or Bubble.&lt;/li&gt;
&lt;li&gt;  Need automation? Try Zapier or n8n.&lt;/li&gt;
&lt;li&gt;  Want dashboards? Try Retool or Airtable.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Watch tutorials&lt;/strong&gt;. Most of these platforms have communities full of free guides.&lt;br&gt;
&lt;strong&gt;Think like a developer&lt;/strong&gt;. Even if you’re not coding, understanding logic, data flow, and user experience still matters.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;The low-code and no-code revolution is not about removing developers; it’s about bringing in more creators into the tech world.&lt;/p&gt;

&lt;p&gt;It’s about helping small businesses launch their own e-commerce app. It’s about everyone becoming a builder. So, whether you’re a seasoned developer or someone who’s never written a single line of code, the message is still the same: you can build something today.&lt;/p&gt;

&lt;p&gt;Because the future of software isn’t just about coding. It’s about creating&lt;/p&gt;

&lt;p&gt;&lt;em&gt;See you next time!!! Ciaooo&lt;/em&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>productivity</category>
      <category>automation</category>
      <category>startup</category>
    </item>
    <item>
      <title>How Generative AI is Transforming Software Architecture in 2025</title>
      <dc:creator>Toluwanimi </dc:creator>
      <pubDate>Tue, 11 Nov 2025 14:00:00 +0000</pubDate>
      <link>https://dev.to/toluxx/how-generative-ai-is-transforming-software-architecture-in-2025-248o</link>
      <guid>https://dev.to/toluxx/how-generative-ai-is-transforming-software-architecture-in-2025-248o</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;AI won’t replace developers. But developers who use AI will replace those who don’t.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It’s a quiet Monday morning, and you are sipping your coffee, staring at your screen because you've been given a new task to design a scalable system for a startup that handles thousands of data requests per second.&lt;/p&gt;

&lt;p&gt;In the past, this would’ve meant weeks of you writing whiteboard diagrams, endless discussions, and getting architecture reviews. But this time around, instead of you doing all that, you open your AI assistant and type:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Design a microservices architecture for a high-traffic analytics platform.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Within seconds, the AI helps you generate a draft for an architecture diagram with services, database suggestions, caching layers, and communication protocols. You then tweak a few parts, add your company’s requirements, and deploy it for review.&lt;/p&gt;

&lt;p&gt;What normally takes weeks for you to do now gets completed in hours.&lt;/p&gt;

&lt;p&gt;Welcome to 2025, the year Generative AI isn’t only just writing code, but it’s reshaping how software itself is designed.&lt;/p&gt;

&lt;h3&gt;
  
  
  From Coding Partner to Architectural Collaborator
&lt;/h3&gt;

&lt;p&gt;At first, Generative AI kind of started as a handy assistant for developers, while tools like GitHub, Copilot, and ChatGPT help to complete code automatically, generate unit tests, and even write documentation. But in 2025, AI’s role has expanded a lot; it has gone beyond just helping, it’s now collaborating. AI models now understand context better than ever. They can go as far as analyzing an entire codebase, spotting bottlenecks, and even suggesting some architectural improvements.&lt;/p&gt;

&lt;p&gt;Imagine you ask your AI, “What’s the best way to migrate a monolith to microservices?” It won’t just reply you with an article; it will go as far as drawing out a migration roadmap, list possible risks, and even recommend some specific frameworks suited for your stack. It’s just like having a senior architect who has read every software design book that has ever been written, and it doesn’t get tired.&lt;/p&gt;

&lt;h3&gt;
  
  
  AI-Powered System Design
&lt;/h3&gt;

&lt;p&gt;In 2025, I can say most developers no longer start architecture planning from scratch. They mostly begin with AI-generated blueprints.&lt;/p&gt;

&lt;p&gt;Let's say you’re trying to build a real-time chat app. You can simply ask your AI:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Generate a scalable event-driven architecture for a chat system with 1 million users.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The AI then responds with a layout using WebSocket servers, Kafka for message queues, Redis for caching, and PostgreSQL for persistence, all visualized and annotated.&lt;/p&gt;

&lt;p&gt;It’ll even go further to explain the reason why.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Kafka is chosen for its high-throughput event streaming capabilities.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This little combination of explanation and automation will make even a junior developer capable of understanding and building complex systems.&lt;/p&gt;

&lt;h3&gt;
  
  
  Smarter Decisions Through Simulation
&lt;/h3&gt;

&lt;p&gt;Software architecture is not just about the structure. It’s about decisions and trade-offs, and AI tools in 2025 can now simulate performance outcomes. Even before choosing a database or load balancer, AI can project how each option will behave under different traffic conditions.&lt;/p&gt;

&lt;p&gt;For instance, let's say you tell your AI to simulate how an AWS Lambda-based setup compares to a Kubernetes cluster under 1 million daily requests. It’ll go further by showing you costs, latency, and failure points before you even write a single line of code.&lt;/p&gt;

&lt;p&gt;That’s like running your system in the future and learning from it today.&lt;/p&gt;

&lt;h3&gt;
  
  
  Real-World Use Cases
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimages.unsplash.com%2Fphoto-1643208589889-0735ad7218f0%3Fixlib%3Drb-4.1.0%26q%3D85%26fm%3Djpg%26crop%3Dentropy%26cs%3Dsrgb" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimages.unsplash.com%2Fphoto-1643208589889-0735ad7218f0%3Fixlib%3Drb-4.1.0%26q%3D85%26fm%3Djpg%26crop%3Dentropy%26cs%3Dsrgb" alt="Netflix " width="600" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Netflix: Netflix has been experimenting with AI models that even help predict scaling needs and suggest service decompositions. A lot of its internal architecture reviews are semi-automated with AI-driven recommendations, which saves time and reduces human error.&lt;/li&gt;
&lt;li&gt;  Amazon: Amazon engineers also use AI to analyze system metrics and propose architectural redesigns. These tools automatically recommend database sharding strategies or API restructuring based on performance data.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimages.unsplash.com%2Fphoto-1523474253046-8cd2748b5fd2%3Fixlib%3Drb-4.1.0%26q%3D85%26fm%3Djpg%26crop%3Dentropy%26cs%3Dsrgb" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimages.unsplash.com%2Fphoto-1523474253046-8cd2748b5fd2%3Fixlib%3Drb-4.1.0%26q%3D85%26fm%3Djpg%26crop%3Dentropy%26cs%3Dsrgb" alt="Amazon " width="720" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Startups: Most startups now build their entire MVP architectures in a day. With generative AI platforms like Cogram and &lt;a href="http://builder.ai/" rel="noopener noreferrer"&gt;Builder.ai&lt;/a&gt;, they automatically generate backend blueprints, CI/CD pipelines, and cloud deployment configs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimages.unsplash.com%2Fphoto-1557804506-669a67965ba0%3Fixlib%3Drb-4.1.0%26q%3D85%26fm%3Djpg%26crop%3Dentropy%26cs%3Dsrgb" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimages.unsplash.com%2Fphoto-1557804506-669a67965ba0%3Fixlib%3Drb-4.1.0%26q%3D85%26fm%3Djpg%26crop%3Dentropy%26cs%3Dsrgb" alt="startups " width="600" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Challenges and Cautions
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;AI gives you a head start. But you still make the final call.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;AI can help you suggest a good-looking design, but it doesn’t always understand the context. An AI might probably recommend a distributed system when a simple monolith would do. It might suggest scaling strategies that look great on paper but are overkill in practice. That’s why you as a developer, you are still in control. The best results happen when humans validate and refine AI’s suggestions.&lt;/p&gt;

&lt;p&gt;What then is the role of a developer, you’d ask?&lt;/p&gt;

&lt;p&gt;Well, as generative AI is shifting and changing what it means to be a developer. As a developer, you’re moving from writing every line of code to orchestrating how systems come together. As a developer, you now focus more on &lt;strong&gt;why&lt;/strong&gt; and less on &lt;strong&gt;how&lt;/strong&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Why does this design pattern fit the business goal?&lt;/li&gt;
&lt;li&gt;  Why scalability matters at this stage.&lt;/li&gt;
&lt;li&gt;  Why cost efficiency should guide your cloud setup.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;AI will be in charge of the &lt;strong&gt;how&lt;/strong&gt; of the blueprints, the code, the configs, while humans steer the &lt;strong&gt;why&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;Generative AI isn’t here to take over software architecture. It’s just here to redefine how we think about building systems.&lt;/p&gt;

&lt;p&gt;Whereby the tedious parts of drawing diagrams, documenting APIs, and evaluating scaling strategies are now being automated. Which means as a developer, you can spend more time solving real problems and less time doing repetitive work.&lt;/p&gt;

&lt;p&gt;The future of software architecture is not just human or AI. It’s both working side by side.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>architecture</category>
      <category>machinelearning</category>
      <category>discuss</category>
    </item>
    <item>
      <title>How To Build APIs That Scale Without Burning Out</title>
      <dc:creator>Toluwanimi </dc:creator>
      <pubDate>Tue, 04 Nov 2025 14:00:00 +0000</pubDate>
      <link>https://dev.to/toluxx/how-to-build-apis-that-scale-without-burning-out-2n2j</link>
      <guid>https://dev.to/toluxx/how-to-build-apis-that-scale-without-burning-out-2n2j</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;The best code is the one you can sleep peacefully knowing it works - Anonymous developer&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Imagine, as a backend engineer who’s working for a fast-growing startup company, you slept and woke up to a dreaded Slack notification. The company's API, the same one powering thousands of user requests per minute, has just crashed. Servers were timing out, users were complaining, and the frontend team was panicking. What is going on? You know you've written a good code, or so you thought, but good code isn't always scalable code. What seems to work for 100 users was now collapsing under 50,000, and you're probably frustrated and exhausted.&lt;/p&gt;

&lt;p&gt;This is the reality a lot of the developers out there face: you’re building APIs fast, trying to keep up with deadlines, but somewhere between your fixing bugs and pushing updates, you start to burn out. The truth is, scaling an API isn’t just about the performance; it's also about sustainability. You want systems that scale without your mental health taking a hit. Let's have a look at how to build an API that handles growth and how you can do that without losing sleep.&lt;/p&gt;

&lt;h3&gt;
  
  
  Start Simple
&lt;/h3&gt;

&lt;p&gt;Scalable APIs don't start complex; they simply grow into complexity. A lot of developers try to over-engineer very early, adding load balancers, caching layers, and microservices before the product even has real traffic. The best approach is to start simple and design for change. Imagine building a small restaurant, you wouldn’t just start with ten ovens and twenty chefs, would you? You'd probably start with two or maybe four to test what customers like, then expand gradually. APIs are the same. You start with a single well-designed endpoint, make sure it’s stable, fast, and clear.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from fastapi import FastAPI

app = FastAPI()

@app.get("/greet")
def greet_user(name: str = "Developer"):
    return {"message": f"Hello, {name}!"}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Simple, predictable, and easy to extend. Later on, when traffic grows, you can split routes or move logic into separate modules.&lt;/p&gt;

&lt;h3&gt;
  
  
  Caching is Your Silent Superpower
&lt;/h3&gt;

&lt;p&gt;Caching saves lives a lot, and it also saves developers' sanity. Think of caching as your API's short-term memory. Instead of you fetching the same data repeatedly from your database, you keep copies ready to go. For example, if your API serves product details, and 80% of users keep asking for the same products, it really won't make sense to hit the database every time just to get them. The easiest way for you to do that is to just cache it, making use of tools like &lt;strong&gt;Redis&lt;/strong&gt; or &lt;strong&gt;Memcached&lt;/strong&gt; to store frequently accessed data helps you a lot, and a few seconds of cache can help cut server load drastically.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import redis
from fastapi import FastAPI

app = FastAPI()
cache = redis.Redis(host='localhost', port=6379, db=0)

@app.get("/product/{id}")
def get_product(id: int):
    cached_product = cache.get(id)
    if cached_product:
        return {"source": "cache", "data": cached_product.decode("utf-8")}
    # simulate DB call
    product = f"Product {id} details"
    cache.setex(id, 60, product)  # cache for 60 seconds
    return {"source": "database", "data": product}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Caching doesn’t just make your API faster. It gives you breathing space when things get busy.&lt;/p&gt;

&lt;h3&gt;
  
  
  Use Rate Limiting
&lt;/h3&gt;

&lt;p&gt;Rate limiting helps to protect your system from overload. Imagine 20,000 users hitting your API at the same time. Without limits, just one rogue client could consume all your resources and bring everything down. What rate limiting simply does is give your API structure; it’s not just about restricting users, it’s about keeping the system alive and stable.&lt;/p&gt;

&lt;p&gt;You can think of it as saying ’’You can request 60 times per minute, but no more’’&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from fastapi import FastAPI
from slowapi import Limiter
from slowapi.util import get_remote_address

app = FastAPI()
limiter = Limiter(key_func=get_remote_address)

@app.get("/data")
@limiter.limit("5/minute")
def get_data():
    return {"message": "Here’s your data!"}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
  
  
  Automate Testing and Monitoring
&lt;/h3&gt;

&lt;p&gt;There's no way for you to scale what you can’t see, but you can make things easier for yourself by using monitoring tools like Prometheus, Grafana, or Datadog, which can help you track latency, uptime, and performance in real time. With these tools, if a route slows down, you’ll know before users start tweeting about it.&lt;/p&gt;

&lt;p&gt;While for testing, you can use frameworks like pytest or locust, as they help you simulate real-world traffic&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from fastapi.testclient import TestClient
from main import app

client = TestClient(app)

def test_greet():
    response = client.get("/greet?name=Toluwanimi")
    assert response.status_code == 200
    assert "Toluwanimi" in response.json()["message"]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;This makes sure that every single update you push doesn’t break existing functionality&lt;/p&gt;

&lt;h3&gt;
  
  
  Design for Horizontal Scaling
&lt;/h3&gt;

&lt;p&gt;Horizontal scaling simply means adding more servers and spreading the load across them. More like hiring enough workers instead of giving one person all the jobs to do.&lt;/p&gt;

&lt;p&gt;Vertical scaling, on the other hand, means upgrading your existing server. Cloud providers like AWS, Google Cloud, or Azure make this very simple. You can use load balancers to distribute requests evenly. So when designing your API, make sure it can grow sideways and not just upward.&lt;/p&gt;

&lt;h3&gt;
  
  
  Prioritize Developer Experience
&lt;/h3&gt;

&lt;p&gt;Just so you know, your API is only as good as how easy it is to use. Clear documentation, meaningful error messages, and consistent naming conventions save you from hundreds of support requests later on.&lt;/p&gt;

&lt;p&gt;Simple things that help:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Clear, human documentation&lt;/li&gt;
&lt;li&gt;  Consistent naming (e.g &lt;code&gt;/users&lt;/code&gt; , &lt;code&gt;/users/{id}&lt;/code&gt; )&lt;/li&gt;
&lt;li&gt;  Helpful error messages&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "error": {
    "message": "Invalid request. Missing 'user_id'.",
    "code": 400
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Good APIs are like good conversations; you don’t have to repeat yourself to be understood. If people understand your API easily, they’ll use it more.&lt;/p&gt;

&lt;h3&gt;
  
  
  Optimize Smartly, not Early
&lt;/h3&gt;

&lt;p&gt;Every developer must’ve heard this quote from &lt;strong&gt;Donald Knuth&lt;/strong&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://www.azquotes.com/quote/721036#:~:text=about%20small%20efficiencies" rel="noopener noreferrer"&gt;Premature optimization is the root of all evil.&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;What does he mean by that? What he meant is simple: don’t waste your time fixing what isn’t broken.&lt;/p&gt;

&lt;p&gt;Instead of you spending days rewriting your API to handle 10 million users, focus on writing clean, maintainable code for the 10,000 you actually have. Profile first, then fix what matters. Tools like cProfile in Python help identify bottlenecks. Sometimes, a single database index can make a bigger difference than rewriting an entire endpoint.&lt;/p&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import cProfile&lt;br&gt;
import re

&lt;p&gt;def test_function():&lt;br&gt;
    for i in range(10000):&lt;br&gt;
        re.match("a", "a"*i)&lt;/p&gt;

&lt;p&gt;cProfile.run('test_function()')&lt;br&gt;
&lt;/p&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
&lt;br&gt;
  &lt;br&gt;
  &lt;br&gt;
  Don’t Forget the Human Side&lt;br&gt;
&lt;/h3&gt;

&lt;p&gt;When you’re under pressure to keep systems online, it’s very easy to slip into endless late nights and weekend deployments. But getting burned out doesn’t just hurt you; it hurts your code too.&lt;/p&gt;

&lt;p&gt;Tired developers tend to make avoidable mistakes. A single missing comma or untested patch can take hours for you to fix. Which is why you should set healthy limits:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Automate deployments.&lt;/li&gt;
&lt;li&gt;  Rotate on-call schedules.&lt;/li&gt;
&lt;li&gt;  Take breaks between releases.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Your system should scale, but you shouldn’t collapse while it does.&lt;/p&gt;

&lt;h3&gt;
  
  
  Document Everything
&lt;/h3&gt;

&lt;p&gt;Every scalable API always has one thing in common, which is great documentation. Not just for external users, but for your own team precisely.&lt;/p&gt;

&lt;p&gt;To keep track of:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Endpoints and response formats&lt;/li&gt;
&lt;li&gt;  Authentication flow&lt;/li&gt;
&lt;li&gt;  Error codes&lt;/li&gt;
&lt;li&gt;  Change logs&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Prepare for Failure
&lt;/h3&gt;

&lt;p&gt;Just so you know, even the biggest APIs fail. But what matters the most is how you recover.&lt;/p&gt;

&lt;p&gt;Adding graceful fallbacks. In case one microservice fails, others can continue running. Make use of circuit breakers (like Hystrix) to prevent cascading failures.&lt;/p&gt;

&lt;p&gt;And in case things break down again, use the downtime to learn, not blame.&lt;/p&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import requests&lt;br&gt;
from requests.exceptions import RequestException

&lt;p&gt;def fetch_data():&lt;br&gt;
    try:&lt;br&gt;
        response = requests.get("&lt;a href="https://api.example.com/data" rel="noopener noreferrer"&gt;https://api.example.com/data&lt;/a&gt;", timeout=3)&lt;br&gt;
        response.raise_for_status()&lt;br&gt;
        return response.json()&lt;br&gt;
    except RequestException:&lt;br&gt;
        return {"error": "Service temporarily unavailable"}&lt;br&gt;
&lt;/p&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
&lt;br&gt;
  &lt;br&gt;
  &lt;br&gt;
  Overview of how to go about building your API&lt;br&gt;
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Principle&lt;/th&gt;
&lt;th&gt;Why It Matters&lt;/th&gt;
&lt;th&gt;Quick Tips&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Start simple&lt;/td&gt;
&lt;td&gt;Prevent over-engineering&lt;/td&gt;
&lt;td&gt;Focus on core endpoints&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Add caching&lt;/td&gt;
&lt;td&gt;Cuts down database load&lt;/td&gt;
&lt;td&gt;Use Redis or Memcached&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Rate limit&lt;/td&gt;
&lt;td&gt;Protects from abuse&lt;/td&gt;
&lt;td&gt;Tools like &lt;code&gt;slowapi&lt;/code&gt;, kong&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Automate testing&lt;/td&gt;
&lt;td&gt;Prevents regression&lt;/td&gt;
&lt;td&gt;Run pytest before deployment&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Scale horizontally&lt;/td&gt;
&lt;td&gt;Detects the problem early&lt;/td&gt;
&lt;td&gt;Use Grafana, Datadog&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Prioritize DX&lt;/td&gt;
&lt;td&gt;Enables growth&lt;/td&gt;
&lt;td&gt;Load balancers, kubernetes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Optimize smartly&lt;/td&gt;
&lt;td&gt;Encourages adoption&lt;/td&gt;
&lt;td&gt;Clear docs, good errors&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Protect teams&lt;/td&gt;
&lt;td&gt;Saves time&lt;/td&gt;
&lt;td&gt;Profile before optimizing&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;Building APIs that scale isn’t just about you coding or handling traffic. It’s about designing for growth, maintaining your simplicity, and making sure you protect your well-being as a developer. No matter the number of requests your server can handle, if you end up getting burned out, the system loses its most important resource, which is you, the human behind it.&lt;/p&gt;

&lt;p&gt;The goal isn’t just for you to build something that never crashes, but something that lets you thrive while it grows. Like my mentor once told me, scalable APIs are written by developers who have learned to balance precision with peace of mind. So when building your API, build it gently&lt;/p&gt;

&lt;p&gt;See you next time!! Ciaoooo.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>api</category>
      <category>backend</category>
      <category>microservices</category>
    </item>
    <item>
      <title>Must-Know Python Packages for Developers: Tools You Can't Miss</title>
      <dc:creator>Toluwanimi </dc:creator>
      <pubDate>Mon, 13 Oct 2025 14:22:08 +0000</pubDate>
      <link>https://dev.to/toluxx/must-know-python-packages-for-developers-tools-you-cant-miss-4133</link>
      <guid>https://dev.to/toluxx/must-know-python-packages-for-developers-tools-you-cant-miss-4133</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Any problem in computer science can be solved with another level of&lt;br&gt;
indirection. - David Wheeler&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Back in 2017, a developer, Kenneth Reitz, published a package called &lt;strong&gt;Requests&lt;/strong&gt; with the goal of making HTTP requests in Python very easy, and he was able to accomplish it. Today, Requests is being downloaded billions of times because it powers countless apps, APIs, and projects around the world. And if, as a developer, you’ve fetched data from the web using Python, there are chances that you've used it, because that's the magic of Python packages. They don't just save time, they shape the way you build software, whether you’re scraping data, training a machine model, or you’re building a web app. Python packages are the difference between you having a week of frustration and a single elegant line of code.&lt;/p&gt;

&lt;p&gt;But with the large number of packages we have on Python, you’re probably wondering which one you should focus on. Let's walk through the Python packages every developer must know, but first, why do these packages matter?&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Why Packages Matter&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Just imagine you’re building a house, Python is more like the foundation and the tools you'll need for it. Packages, on the other hand, are like the ready-made furniture, the wiring, the plumbing of the house, and instead of you carving your chair from wood, you just place an order for one. For developers, this means&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Faster development&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Fewer bugs&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Focus on solving problems&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With that being said, let's now walk through the must-know packages that you, as a beginner or expert, should keep in your toolkit.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Requests
&lt;/h2&gt;

&lt;p&gt;Take, for example, you’re building a weather app, instead of you writing 50 lines of socket code to connect to a weather API, you can do this.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import requests

response = requests.get("https://api.weatherapi.com/v1/current.json?key=API_KEY&amp;amp;q=London")
print(response.json())
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Just one line and you've got live weather data. Almost every app needs to talk to the web, and requests make it easy for companies like Spotify to use it, so developers can integrate the API quickly&lt;/p&gt;

&lt;h2&gt;
  
  
  2. NumPy
&lt;/h2&gt;

&lt;p&gt;If Python were a car, Numpy would be the engine powering its data capabilities because it allows you to work with large datasets and also perform complex maths quickly. For example, you’re analyzing a list of numbers to add; instead of you looping through the list to add them, with NumPy, you can add millions of numbers in milliseconds, and you can handle thousands of rows of data without slowing down.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Pandas
&lt;/h2&gt;

&lt;p&gt;Have you ever opened an Excel sheet with disorganized rows and columns? That's what real-world data looks like, and Panda helps to clean, organize, and analyze it.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import pandas as pd  

data = pd.read_csv("sales.csv")  
print(data.describe())  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Within seconds, you'll be able to understand your data. Financial analyst uses pandas to process stock market data, detect trends, and make predictions&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Flask &amp;amp; Django
&lt;/h2&gt;

&lt;p&gt;Let's say you're a junior developer at a startup and the team needs a quick prototype of a booking system. With Flask, you can just create a functional demonstration or idea within a short time frame. Web apps run our world, and Python has two powerful frameworks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Flask: great for small apps or APIs&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Django: perfect for larger apps&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  5. TensorFlow &amp;amp; PyTorch
&lt;/h2&gt;

&lt;p&gt;If you are planning to explore AI, these two are your best friends. TensorFlow by Google and PyTorch by Meta are the engines behind image recognition, chatbots, and even self-driving cars. Tesla’s AI team uses a deep learning framework built on PyTorch to train its models for autonomous driving.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. SQLAlchemy
&lt;/h2&gt;

&lt;p&gt;Databases can be very tricky, but SQL Alchemy makes working with them feel natural, and instead of writing raw SQL, you can use Python code. For example, if you're trying to build an app with SQL Alchemy, you can manage all your tasks in a database without drowning in SQL syntax.&lt;/p&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from sqlalchemy import create_engine  

&lt;p&gt;engine = create_engine("sqlite:///users.db")&lt;br&gt;&lt;br&gt;
&lt;/p&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
&lt;br&gt;
  &lt;br&gt;
  &lt;br&gt;
  Note&lt;br&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;Every developer hates bugs, but making sure you catch them early saves you pain later. Companies like Dropbox and Mozilla rely on Pytest to ensure their code works across millions of users. Because Pytest makes writing tests simple and clean.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Virtualenv &amp;amp; Pipenv
&lt;/h2&gt;

&lt;p&gt;Have you ever had a project you're working on break because another project needed a different library version? That's called &lt;strong&gt;dependency hell&lt;/strong&gt;. Let’s say you’re working on two projects, one needs Django 3.2, the other needs Django 4.0. Without a virtual environment, they will clash, and for you to avoid that, that's where virtualenv and pipenv come in. They help you keep your project isolated, so they don't step on each other's toes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Comparison Table
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Package/Framework&lt;/th&gt;
&lt;th&gt;Best For&lt;/th&gt;
&lt;th&gt;Why It Matters&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Request&lt;/td&gt;
&lt;td&gt;HTTP request&lt;/td&gt;
&lt;td&gt;Makes web APIs simple&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Numpy&lt;/td&gt;
&lt;td&gt;Maths &amp;amp; arrays&lt;/td&gt;
&lt;td&gt;Fast, efficient data handling&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Pandas&lt;/td&gt;
&lt;td&gt;Data analysis&lt;/td&gt;
&lt;td&gt;Excel-like power in Python&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Flask &amp;amp; Django&lt;/td&gt;
&lt;td&gt;Web apps&lt;/td&gt;
&lt;td&gt;From small APIs to big sites&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;TensorFlow &amp;amp; PyTorch&lt;/td&gt;
&lt;td&gt;Machine learning&lt;/td&gt;
&lt;td&gt;AI, deep learning, ML&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SQLAlchemy&lt;/td&gt;
&lt;td&gt;Databases&lt;/td&gt;
&lt;td&gt;Clean, pythonic database work&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Pytest&lt;/td&gt;
&lt;td&gt;Testing&lt;/td&gt;
&lt;td&gt;Write cleaner, simpler test&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Virtualenv &amp;amp; Pipenv&lt;/td&gt;
&lt;td&gt;Dependencies&lt;/td&gt;
&lt;td&gt;Avoids dependency hell&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Quick Tips for Using Python Packages
&lt;/h2&gt;

&lt;p&gt;Python packages are more than just tools; they’re building blocks for ideas. They let you go from “I wish I could” to “I just did” faster than you can ever think.&lt;/p&gt;

&lt;p&gt;You don’t need to master them all at once; you can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Start small by picking one package that solves your current problem.&lt;/li&gt;
&lt;li&gt;Read their docs as they’re often full of examples.&lt;/li&gt;
&lt;li&gt;Try a lot of experiments, build side projects.&lt;/li&gt;
&lt;li&gt;Also, make sure you stay updated. Libraries evolve quickly; make sure you’re on stable versions.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Every great developer's story is written one package at a time, and mind you, the next great Python package might not be on this list. It might actually be the one you create, so don’t just consume packages; make sure you use them, build with them, and when you’re ready, contribute back.&lt;/p&gt;

&lt;p&gt;See you next time.&lt;/p&gt;

</description>
      <category>python</category>
      <category>webdev</category>
      <category>programming</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>What are some good websites on which programmers can write articles?</title>
      <dc:creator>Toluwanimi </dc:creator>
      <pubDate>Wed, 01 Oct 2025 14:14:23 +0000</pubDate>
      <link>https://dev.to/toluxx/what-are-some-good-websites-on-which-programmers-can-write-articles-gfm</link>
      <guid>https://dev.to/toluxx/what-are-some-good-websites-on-which-programmers-can-write-articles-gfm</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Writing is thinking. To write well is to think clearly. That’s why&lt;br&gt;
it’s so hard.– David McCullough.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Surprising, isn’t it? A lot of programmers assume, or rather, they think writing is only for journalists or bloggers. But the truth is, most respected developers built their reputation by sharing what they know in writing. Think of &lt;strong&gt;Dan Abramov&lt;/strong&gt;, co-author of Redux, who started his career by writing blog posts that later became a go-to resource for developers all around the world.&lt;/p&gt;

&lt;p&gt;Which reminds me of a friend of mine when he started learning how to code. He thought he needed to keep all his notes private; he didn’t want anyone to access them. All his notion page was packed with half-written tutorials and bugfixes. He told me about it, and I told him to try publishing some of the things he kept to himself. Fortunately, he was able to publish one short article about how he solved a database error, and something surprising happened.&lt;/p&gt;

&lt;p&gt;A junior backend developer from India left a comment saying ’’Thank you, I was stuck on this for four days’’&lt;/p&gt;

&lt;p&gt;That’s when he realized that programmers don’t just write code, they write for people, and sharing what you know can help someone on the other side of the world. Also, writing as a programmer is not just for helping others; it makes you more visible in the tech space.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The best way to learn is to teach – Frank Oppenheimer&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Which then begs the question. Where should you publish your work? We all know how crowded the internet is; most platforms give you good visibility by helping you put your work out there for people to see, while others feel like you’re just shouting into a void. But fear not, let’s go through some of the best platforms I feel you can and should be using to publish your work.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to choose a good platform
&lt;/h2&gt;

&lt;p&gt;Before walking you through the platforms you can be using to publish your work. How do you know the platform that works best for you? To pick a platform suitable and perfect for your work, you need to consider and think about what you want:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Do you want a large audience?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Do you want to be able to connect with other developers?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Do you want to have control over your work?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Do you want to earn money?&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you’ve considered all this and you’ve made your decision, let’s then have a look at the best websites you can choose to work with.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. [Dev. to
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flhi8ors4p4tgzo0ywewx.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flhi8ors4p4tgzo0ywewx.webp" alt="Dev to" width="250" height="250"&gt;&lt;/a&gt;&lt;br&gt;
Dev. to](&lt;a href="http://dev.to"&gt;http://dev.to&lt;/a&gt;) is more like a coffee shop for programmers. It’s a place where most developers love to hang out. A lot of developers post their tutorials, personal experience, and lessons on a project they’re working on or a failed project so others can see and learn from it. Take, for example, you posted a project on your latest debugging tricks, and within an hour, another developer saw your post and commented. ’’Hey, I came across this a week ago. Your solution worked. That’s the kind of vibe you’d get on &lt;a href="http://dev.to"&gt;De&lt;/a&gt;v.to. It’s developer-focused and also a friendly community for developers.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Medium
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4qfht0y1rkfuago9tl9h.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4qfht0y1rkfuago9tl9h.png" alt="Medium" width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
Medium is more like a library for the internet because articles on Medium tend to reach a wider audience and not just programmers. You come across a lot of stories from developers, tech founders, and engineers sharing their knowledge. If you are leaning towards the part of wanting your work to reach a lot of people, Medium is the one for you, and on the other hand, you can also earn a little money through Medium's partner program. Imagine you wrote about a project, and some recruiters or start-up founders come across it; that’s a life-changing opportunity. Quincy Larson, the founder of freecodecamp, also started publishing his works on Medium, and it went viral. That exposure was what helped build one of the biggest coding communities today, so who says you can’t do that, also?&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Daily Dev
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9u72s86o71lknudwsid6.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9u72s86o71lknudwsid6.webp" alt="Daily Dev" width="800" height="271"&gt;&lt;/a&gt;&lt;br&gt;
Daily Dev is more like a newsfeed for developers. It’s designed for developers who want quick or easy-to-understand tech content. You can write, publish your work, and your work gets noticed by other programmers scrolling through the feed. Daily dev is gaining more attention from programmers, even though it's less formal than Medium; it's one of the best platforms to use for quick exposure, if you want your work to reach developers who often check for updates daily.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Hashnode
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmpx6bf26rjeq2o7smmmh.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmpx6bf26rjeq2o7smmmh.jpg" alt="Hashnode" width="400" height="400"&gt;&lt;/a&gt;&lt;br&gt;
Hashnode is also one of the best platforms out there. It's just like you having your own personal blog; you can use your domain, and with that, it makes it look professional. Most programmers who want to grow their personal brand tend to use Hashnode because it gives them control and reach over their work at the same time. If, as a programmer, you are probably looking for a space to share your journey as a programmer, Hashnode is the one for you. Most people even land jobs as a result of them sharing their journey posts and projects because recruiters tend to see their consistent posts.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. GitHub pages/GitHub Gists
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frwyche0aiao5vb4ism09.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frwyche0aiao5vb4ism09.jpg" alt="GitHub" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You are probably wondering, what about GitHub? Well, GitHub is a place where code lives, and a lot of programmers use GitHub pages to publish from their repositories. Repositories are more like a storage location on GitHub, a place where code and other files for projects are stored, and developers often use them to publish their blogs or share code snippets.&lt;/p&gt;

&lt;p&gt;The same thing goes with Gists, which are perfect for small write-ups and explaining a function. If you are looking to document your code or tutorials, this works perfectly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tips to Get Started
&lt;/h2&gt;

&lt;p&gt;You don't need to be an expert to start writing; you just need to share what you know because somewhere, a developer like you is probably searching Google at 2:00 a.m. for an error he/she is having, and your article might be what helps them move forward. So:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Write about what you’ve just learned&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Share mistakes that you've made&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Be consistent, even if it's one article a month&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;As a programmer, when you write, you don't just teach; you learn better. Explaining a work you did forces you to simplify it for others to understand, and the more you write, the more you build credibility and opportunities for yourself. Don't keep your knowledge locked in your head; rather, choose one of these platforms and write that article about the new framework you tested or the API you built using Rust. Someone somewhere is waiting to read it.&lt;/p&gt;

&lt;p&gt;See you next time.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>writing</category>
      <category>coding</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Django Tutorial:The Ultimate Guide (2023)</title>
      <dc:creator>Toluwanimi </dc:creator>
      <pubDate>Thu, 14 Aug 2025 11:00:30 +0000</pubDate>
      <link>https://dev.to/masteringbackend/django-tutorialthe-ultimate-guide-2023-2o53</link>
      <guid>https://dev.to/masteringbackend/django-tutorialthe-ultimate-guide-2023-2o53</guid>
      <description>&lt;p&gt;High scalability, versatility, security, rapid development, well-structured and detailed documentation are some features that make the Django framework one of the best and most consistent web frameworks in the industry.&lt;/p&gt;

&lt;p&gt;With Django, there is only one way to do things, “The Django Way”.&lt;/p&gt;

&lt;p&gt;Yes, Django is built to force you to follow industry-standard ways of developing web applications.&lt;/p&gt;

&lt;p&gt;The advantage this has is that working with Django will make you a better developer.&lt;/p&gt;

&lt;p&gt;The downside is that it doesn’t give room for some flexibility with the sister framework Flask.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;To learn Django in detail, there is no better course to recommend personally than &lt;a href="https://masteringbackend.solomoneseme.com/djangowithAI" rel="noopener noreferrer"&gt;Full stack web development and AI with Python (Django)&lt;/a&gt;. Check it out now for a discount.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;p&gt;Before continuing with this guide, you will need to understand  &lt;a href="https://developer.mozilla.org/en-US/docs/Learn/Server-side/First_steps" rel="noopener noreferrer"&gt;server-side web programming, frameworks&lt;/a&gt;, general &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript" rel="noopener noreferrer"&gt;Knowledge of Python&lt;/a&gt;, which will aid your understanding of the Django framework.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;To learn Python and Django in detail, there is no better course to recommend personally than &lt;a href="https://masteringbackend.solomoneseme.com/pythondjango2021" rel="noopener noreferrer"&gt;Python Django 2021 – Complete Course&lt;/a&gt;. Check it out now for a discount.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;What is Django&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Django is a high-level open-source Python MVT web framework that enables the rapid development of secure and maintainable web applications.&lt;/p&gt;

&lt;p&gt;Django follows the popular MVC (Model View Controller) architecture with a bit of variation. While MVC stands for Model View Controller, Django’s MVT stands for Model View Template.&lt;/p&gt;

&lt;p&gt;When it comes to using Django as a framework of choice, there is only one way to do things, “The Django Way.” It supports an industry standardized way of developing robust web applications.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Features of Django&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Before making any framework your choice for a project, you must have studied it and be satisfied with its features. Django is a framework with vibrant and attractive features. Let’s explore them.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Django’s excellent interactive documentation makes it easy and exciting for any new developer to pick a project and finish it in record time.&lt;/li&gt;
&lt;li&gt; Django is a framework built upon Python. Being about the most straightforward programming language with numerous packages and libraries, you can quickly build websites, web apps, data science, machine learning, and artificial intelligence projects using Django and other python packages.&lt;/li&gt;
&lt;li&gt; Django is, by default, Search Engine Optimized.&lt;/li&gt;
&lt;li&gt; It is Highly Scalable. The Instagram team that developed the popular Instagram using Django should quickly tell you what you can do with Django.&lt;/li&gt;
&lt;li&gt; Django is Versatile&lt;/li&gt;
&lt;li&gt; It is highly secured.&lt;/li&gt;
&lt;li&gt; With over a decade of solid performance and consistency, it is no joke that Django is thoroughly tested.&lt;/li&gt;
&lt;li&gt; Django provides rapid development.&lt;/li&gt;
&lt;li&gt; It comes with a prebuilt admin area. This feature means you don’t necessarily need to build a new admin area to manage your web application.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Why you should learn Django&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Django, as stated above, follows industry standard best practices for web application and software development. This standard forces you to write clean codes while you learn.&lt;/p&gt;

&lt;p&gt;Django works best and easily with SQL databases. With Django, you don’t need to know how to query SQL to create your applications.&lt;/p&gt;

&lt;p&gt;As stated earlier, Django is built on Python, which is the language of choice for any Data Science, Data Analytics, Artificial Intelligence, and Machine Learning project.&lt;/p&gt;

&lt;p&gt;So, if your application requires ML, AI, Analytics, or Data Science functionalities, you should go with Django.&lt;/p&gt;

&lt;p&gt;When learning any language, the importance of community cannot be overemphasized.&lt;/p&gt;

&lt;p&gt;Luckily, Django boasts an active community that will help hold you by the hands and make you a professional software developer.&lt;/p&gt;

&lt;p&gt;When you want to build complex web applications in less time with the industry’s best practices, Django is the Python framework of choice.&lt;/p&gt;

&lt;p&gt;From the somewhat difficult Django 1.0 to today’s simple and elegant looking Django 3.0+, we have seen consistent growth in developing and maintaining the Django framework.&lt;/p&gt;

&lt;p&gt;The key features and functionalities that make Django outstanding are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Open Source.&lt;/li&gt;
&lt;li&gt;  It supports the Full Stack Framework.&lt;/li&gt;
&lt;li&gt;  Authentication.&lt;/li&gt;
&lt;li&gt;  URL Routing.&lt;/li&gt;
&lt;li&gt;  Templating Engine.&lt;/li&gt;
&lt;li&gt;  DRY (Don’t Repeat Yourself).&lt;/li&gt;
&lt;li&gt;  ORM Mappers.&lt;/li&gt;
&lt;li&gt;  It provides Database schema migrations for common databases like PostgreSQL, MySQL, SQLite, Oracle under the third-party drivers.&lt;/li&gt;
&lt;li&gt;  A Variation of MVC Architecture called MVT&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Inbuilt Admin Panel&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Excellent and Fast debugger interface&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;ASGI (Asynchronous Server Gateway Interface) and WSGI (Web Server Gateway Interface compliant in Django 3.0+&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Wow! You now have a complete overview of what Django stands for and the things you can do with it.&lt;/p&gt;

&lt;p&gt;You can pause a little, take a sip of your coffee and follow us as we discuss the Django Framework in more detail.&lt;/p&gt;

&lt;h2&gt;
  
  
  Chapter 2: The Django Framework
&lt;/h2&gt;

&lt;p&gt;In this chapter, we will deep-dive into the Django framework. We will explore "The Django way" and learn the architectural patterns that governs Django&lt;/p&gt;

&lt;p&gt;The chapter will set pace for the next chapter. Therefore, we recommend that you spend sometime understanding the patterns and philosophies of Django.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftxghv5su2rdnjlka91ss.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftxghv5su2rdnjlka91ss.png" alt="The Ultimate Guide"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So far, the buzzword here has been “Framework.” But what does framework mean? There is no doubt that we could be using the word without understanding its meaning and why we should use it.&lt;/p&gt;

&lt;p&gt;According to Isaac Newton, “If I have seen further, it is by standing on the shoulders of giants.”&lt;/p&gt;

&lt;p&gt;This quote by Isaac Newton gives light to how far and powerful frameworks can be. Why reinvent the wheel when you can ride on it and add more functionalities?&lt;/p&gt;

&lt;p&gt;Let us elucidate. You want to build a house and need all the necessary timber to start and finish it.&lt;/p&gt;

&lt;p&gt;You are faced with two options:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Building from scratch, where you will need to cut down some timbers and shape them to your desired shape and sizes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Building with already made frameworks of woods of different sizes and save yourself some precious time, energy, and sometimes money.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Django web framework was developed to force you to build industry-standard web applications by providing the framework of woods of different sizes to save you time, energy, and cost while developing your MVP.&lt;/p&gt;

&lt;p&gt;In this section, we will discuss the three main parts of the framework. This is called the MVT, which stands for Model View Template.&lt;/p&gt;

&lt;p&gt;Are you ready? Please fasten your seatbelt. We will be going for an exciting ride.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;What is MVT?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;MVT stands for Model View Template. It is a software and design pattern variation of MVC (Model View Controller).&lt;/p&gt;

&lt;p&gt;MVC is a standard architectural pattern that many languages employ with slight variations such as  &lt;a href="https://masteringbackend.com/posts/laravel-framework-the-ultimate-guide" rel="noopener noreferrer"&gt;Laravel&lt;/a&gt;, Ruby on rails,  &lt;a href="https://masteringbackend.com/posts/adonisjs-tutorial-the-ultimate-guide" rel="noopener noreferrer"&gt;AdonisJS&lt;/a&gt;, etc.&lt;/p&gt;

&lt;p&gt;The Django framework handles all the controller parts of the MVC by itself. This means Django has done a lot of the heavy lifting for you and helps reduce the code you will need for a minimum viable product (MVP).&lt;/p&gt;

&lt;p&gt;This made Django introduce and implement templating as a pattern. Let us briefly discuss them separately.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Model&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Models in Django are the single definitive source of information about your data. Generally, each model maps to a single database table. It helps provide the interface for the data stored in the databases.&lt;/p&gt;

&lt;p&gt;For instance, assuming we have a Car class in our model, the class name will correspond to the table name in our database. This means we don’t have to create a table in our database manually, but we only run migrations to generate the tables.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;View&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Definitions for Django views are somewhat not simple to understand.&lt;/p&gt;

&lt;p&gt;So we will try explaining it with what it does so that a non-technical person can easily understand it.&lt;/p&gt;

&lt;p&gt;Think of this as the file where you write the functions that retrieve data from the database and display it on your website’s templates.&lt;/p&gt;

&lt;p&gt;With this explanation of Django views, one can say that it supplies the dynamic content to HTML/CSS/Javascript files and its templating language.&lt;/p&gt;

&lt;p&gt;At the same time, the Django template fully represents the static part. Next, let’s discuss the last part of the Django MVT architecture.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Template&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;As we discussed briefly in view, the Django template represents the static part of your desired output.&lt;/p&gt;

&lt;p&gt;Again, to explain this for easy understanding, your template will contain the HTML, CSS, Javascript, and Django templating language.&lt;/p&gt;

&lt;p&gt;So while the HTML provides the static structure of your website, the templating language is used to dynamically display data on the HTML file from the view file.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;URL Routing: Request and Response Analogy&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5o4mzrd7l3myu82yltby.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5o4mzrd7l3myu82yltby.png" alt="request response"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Chapter 3: Build a Todo Web App with Django
&lt;/h2&gt;

&lt;p&gt;In this chapter, we will build a simple Todo application by implementing the knowledge we have gathered from previous chapters.&lt;/p&gt;

&lt;p&gt;This is to help us get ready for real world project which might be a little bigger.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7t9n1as4wkt6kp460710.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7t9n1as4wkt6kp460710.png" alt="The Ultimate Guide"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To build a Django application for this Django tutorial, you need to have python installed on your computer. We assume you have it.&lt;/p&gt;

&lt;p&gt;It is good practice to develop your application in a virtual environment. We used Virtualenv. The code below will help you install it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cmake"&gt;&lt;code&gt;pip install virtualenv
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next is to create a virtual environment.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight awk"&gt;&lt;code&gt;&lt;span class="nx"&gt;virtualenv&lt;/span&gt; &lt;span class="nx"&gt;virt&lt;/span&gt;

&lt;span class="nx"&gt;source&lt;/span&gt; &lt;span class="nx"&gt;virt&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;Scripts&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;activate&lt;/span&gt;   &lt;span class="c1"&gt;# this will activate the virtual environment.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The other packages are:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cmake"&gt;&lt;code&gt;pip install django
pip install mysqlclient
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhansqbcuudbjajmaq2rr.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhansqbcuudbjajmaq2rr.jpeg" alt="unnamed.jpeg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Start a Django project using the following command.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;django-admin startproject mytodo
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Move into the created project with &lt;code&gt;cd  mytodo&lt;/code&gt;. This is the root directory of your application.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffc9iif17ai5udqdsndwl.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffc9iif17ai5udqdsndwl.jpeg" alt="djangofolder.jpeg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Create Task App
&lt;/h3&gt;

&lt;p&gt;The above image is the structure of a Django project. Now let’s create an app.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight viml"&gt;&lt;code&gt;&lt;span class="k"&gt;python&lt;/span&gt; manage&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;py&lt;/span&gt; startapp task
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After starting a new app, the new project structure will look this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwx7qeg0h4x8q9kq48z80.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwx7qeg0h4x8q9kq48z80.jpeg" alt="djangowithapp.jpeg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Add the app  &lt;code&gt;task&lt;/code&gt;  into your  &lt;code&gt;settings.py&lt;/code&gt;  file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sml"&gt;&lt;code&gt;&lt;span class="nl"&gt;# Application&lt;/span&gt; &lt;span class="n"&gt;definition&lt;/span&gt;

&lt;span class="n"&gt;INSTALLED_APPS&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="nd"&gt;'django&lt;/span&gt;&lt;span class="err"&gt;.&lt;/span&gt;&lt;span class="nn"&gt;contrib&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;admin'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nd"&gt;'django&lt;/span&gt;&lt;span class="err"&gt;.&lt;/span&gt;&lt;span class="nn"&gt;contrib&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;auth'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nd"&gt;'django&lt;/span&gt;&lt;span class="err"&gt;.&lt;/span&gt;&lt;span class="nn"&gt;contrib&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;contenttypes'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nd"&gt;'django&lt;/span&gt;&lt;span class="err"&gt;.&lt;/span&gt;&lt;span class="nn"&gt;contrib&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sessions'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nd"&gt;'django&lt;/span&gt;&lt;span class="err"&gt;.&lt;/span&gt;&lt;span class="nn"&gt;contrib&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;messages'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nd"&gt;'django&lt;/span&gt;&lt;span class="err"&gt;.&lt;/span&gt;&lt;span class="nn"&gt;contrib&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;staticfiles'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nd"&gt;'task'&lt;/span&gt;
&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Database set up
&lt;/h3&gt;

&lt;p&gt;Still on this file, recall we installed  &lt;code&gt;mysqlclient&lt;/code&gt;  earlier, we did because we will be using MySQL for our database.&lt;/p&gt;

&lt;p&gt;Now, go to your PHPMyAdmin or any  &lt;a href="https://masteringbackend.solomoneseme.com/posts/top-10-database-clients-for-developers/" rel="noopener noreferrer"&gt;database client&lt;/a&gt;  of your choice, create your database.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.mysql',
        'NAME': 'todoapplication',
        'USER': 'root',
        'PASSWORD': 'password',
        'HOST': 'localhost',
        'PORT': '3306',
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It is time to create our model. Let’s go to our task folder and open  &lt;code&gt;Models.py&lt;/code&gt;  and paste the code below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight haskell"&gt;&lt;code&gt;&lt;span class="n"&gt;from&lt;/span&gt; &lt;span class="n"&gt;django&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;db&lt;/span&gt; &lt;span class="kr"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;models&lt;/span&gt;

&lt;span class="o"&gt;#&lt;/span&gt; &lt;span class="kt"&gt;Create&lt;/span&gt; &lt;span class="n"&gt;your&lt;/span&gt; &lt;span class="n"&gt;models&lt;/span&gt; &lt;span class="n"&gt;here&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;

&lt;span class="kr"&gt;class&lt;/span&gt; &lt;span class="kt"&gt;Task&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;models&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="kt"&gt;Model&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;title&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;models&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="kt"&gt;CharField&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;max_length&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;completed&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;models&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="kt"&gt;BooleanField&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kr"&gt;default&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kt"&gt;False&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;created&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;models&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="kt"&gt;DateTimeField&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;auto_now_add&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kt"&gt;True&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="n"&gt;def&lt;/span&gt; &lt;span class="n"&gt;__str__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;return&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;title&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is a simple model with a class name “Task”. It has three attributes and a method.&lt;/p&gt;

&lt;p&gt;The title of the todo task, a boolean field “completed” and created time.&lt;/p&gt;

&lt;p&gt;The method is used to display the title in the admin panel of the app.&lt;/p&gt;

&lt;p&gt;Everything is looking good. Let’s make the migration. This will help make successful connections to the database and create tables with the prebuilt Django models and our model.&lt;/p&gt;

&lt;p&gt;Before we make the initial migration, it is important to see that the  &lt;code&gt;migration&lt;/code&gt;  folder and the  &lt;code&gt;__init__.py&lt;/code&gt;  is empty.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv3hutkmbzpm7w21d91g9.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv3hutkmbzpm7w21d91g9.jpeg" alt="djanginit.jpeg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Run this command to create migrations for your database:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight viml"&gt;&lt;code&gt;&lt;span class="k"&gt;python&lt;/span&gt; manage&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;py&lt;/span&gt; makemigration
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will display all the files available for migrations where there are no changes, it will indicate so.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr8n1ewc3kleykiqzcszk.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr8n1ewc3kleykiqzcszk.jpeg" alt="migrationdjango.jpeg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When you make migrations, Django prepares a migration file for you as above,&lt;/p&gt;

&lt;p&gt;Run this command to migrate your database:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight viml"&gt;&lt;code&gt;&lt;span class="k"&gt;python&lt;/span&gt; manage&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;py&lt;/span&gt; migrate
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Create Task Files
&lt;/h3&gt;

&lt;p&gt;Go to the  &lt;code&gt;task&lt;/code&gt;  folder and create the following folders “templates”, inside the  &lt;code&gt;templates&lt;/code&gt;  folder create “task”. Then create the following HTML files.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fntuv5eqcq0x9tr9847be.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fntuv5eqcq0x9tr9847be.jpeg" alt="djangofiles.jpeg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Open the  &lt;code&gt;views.py&lt;/code&gt;  file in the  &lt;code&gt;task&lt;/code&gt;  folder and paste this code below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;#views.py
&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;django.shortcuts&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;render&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;redirect&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;django.http&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;HttpResponse&lt;/span&gt;

&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;.models&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;.forms&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;

&lt;span class="c1"&gt;# Create your views here.
&lt;/span&gt;
&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;index&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;tasks&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Task&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;objects&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;all&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

    &lt;span class="n"&gt;form&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;TaskForm&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;method&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;POST&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;form&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;TaskForm&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;POST&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;is_valid&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
            &lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;save&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;redirect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;/&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="n"&gt;context&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;tasks&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;tasks&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;form&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;render&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;task/list.html&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;


&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;updatingTask&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;pk&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;task&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Task&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;objects&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;pk&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="n"&gt;form&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;TaskForm&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;instance&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;task&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;method&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;POST&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;form&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;TaskForm&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;POST&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;instance&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;task&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;is_valid&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
            &lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;save&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;redirect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;/&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="n"&gt;context&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;form&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;render&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;task/update.html&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;deleteTask&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;pk&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;item&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Task&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;objects&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;pk&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;method&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;POST&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;item&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;delete&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;redirect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;/&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="n"&gt;context&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;item&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;item&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;render&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;task/delete.html&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next is the  &lt;code&gt;urls.py&lt;/code&gt;, but the app doesn’t come with a  &lt;code&gt;urls.py&lt;/code&gt;, this is because we can do all our routing in the project’s  &lt;code&gt;urls.py&lt;/code&gt;  or we can create a new one for the  &lt;code&gt;task&lt;/code&gt;  folder. Let’s create it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# task.urls.py

from django.urls import path
from . import views

urlpatterns = [
    path('', views.index, name='list'),
    path('update/&amp;lt;str:pk&amp;gt;/', views.updatingTask, name='update'),
    path('delete/&amp;lt;str:pk&amp;gt;/', views.deleteTask, name='delete'),
]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For the Django project to see it, it will need to be routed to the project’s URLs. Let’s do that:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# urls.py

from django.contrib import admin
from django.urls import path
from django.urls.conf import include

urlpatterns = [
    path('admin/', admin.site.urls),
    path('', include('task.urls'))
]

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, we just imported the module name  &lt;code&gt;include&lt;/code&gt;  to help us include the app URLs.&lt;/p&gt;

&lt;p&gt;Next, Let us create  &lt;code&gt;form.py&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight coffeescript"&gt;&lt;code&gt;&lt;span class="nx"&gt;from&lt;/span&gt; &lt;span class="nx"&gt;django&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;forms&lt;/span&gt;
&lt;span class="nx"&gt;from&lt;/span&gt; &lt;span class="nx"&gt;django&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;forms&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;ModelForm&lt;/span&gt;

&lt;span class="nx"&gt;from&lt;/span&gt; &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;models&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;


&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nx"&gt;TaskForm&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;forms&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;ModelForm&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;

    &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="na"&gt;Meta&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;
        &lt;span class="nx"&gt;model&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;Task&lt;/span&gt;
        &lt;span class="nx"&gt;fields&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;'__all__'&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Register the model to your  &lt;code&gt;admin.py&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from django.contrib import admin
from .models import Task

# Register your models here.


admin.site.register(Task)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The last path is our HTML files:&lt;/p&gt;

&lt;h3&gt;
  
  
  List.html
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jinja"&gt;&lt;code&gt;# list.html

&lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"stylesheet"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/semantic.min.css"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;style&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;body&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;fit-content&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;20px&lt;/span&gt; &lt;span class="nb"&gt;auto&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/style&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;div&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;h3&amp;gt;&lt;/span&gt;Todos&lt;span class="nt"&gt;&amp;lt;/h3&amp;gt;&lt;/span&gt;

    &lt;span class="nt"&gt;&amp;lt;form&lt;/span&gt; &lt;span class="na"&gt;method=&lt;/span&gt;&lt;span class="s"&gt;"POST"&lt;/span&gt; &lt;span class="na"&gt;action=&lt;/span&gt;&lt;span class="s"&gt;"/"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"ui form"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"ui field action input"&lt;/span&gt; &lt;span class="na"&gt;style=&lt;/span&gt;&lt;span class="s"&gt;"width: 525px;"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="cp"&gt;{%&lt;/span&gt; &lt;span class="nv"&gt;csrf_token&lt;/span&gt; &lt;span class="cp"&gt;%}&lt;/span&gt; &lt;span class="cp"&gt;{{&lt;/span&gt;&lt;span class="nv"&gt;form.title&lt;/span&gt;&lt;span class="cp"&gt;}}&lt;/span&gt;
            &lt;span class="cp"&gt;{%&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nv"&gt;form.title&lt;/span&gt; &lt;span class="cp"&gt;%}&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"submit"&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"Create Task"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"ui primary button"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
            &lt;span class="cp"&gt;{%&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="cp"&gt;%}&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"submit"&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"Update Task"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"ui primary basic button"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
            &lt;span class="cp"&gt;{{&lt;/span&gt; &lt;span class="nv"&gt;form.complete&lt;/span&gt; &lt;span class="cp"&gt;}}&lt;/span&gt;
            &lt;span class="cp"&gt;{%&lt;/span&gt; &lt;span class="k"&gt;endif&lt;/span&gt; &lt;span class="cp"&gt;%}&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/form&amp;gt;&lt;/span&gt;


    &lt;span class="cp"&gt;{%&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="nv"&gt;task&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nv"&gt;tasks&lt;/span&gt; &lt;span class="cp"&gt;%}&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"ui segment"&lt;/span&gt; &lt;span class="na"&gt;style=&lt;/span&gt;&lt;span class="s"&gt;"width: 600px;"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="cp"&gt;{%&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nv"&gt;task.complete&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="kp"&gt;True&lt;/span&gt; &lt;span class="cp"&gt;%}&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;strike&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;{{&lt;/span&gt; &lt;span class="nv"&gt;task&lt;/span&gt; &lt;span class="cp"&gt;}}&lt;/span&gt;&lt;span class="nt"&gt;&amp;lt;/strike&amp;gt;&lt;/span&gt;
        &lt;span class="cp"&gt;{%&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="cp"&gt;%}&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;{{&lt;/span&gt;&lt;span class="nv"&gt;task&lt;/span&gt;&lt;span class="cp"&gt;}}&lt;/span&gt;&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
        &lt;span class="cp"&gt;{%&lt;/span&gt; &lt;span class="k"&gt;endif&lt;/span&gt; &lt;span class="cp"&gt;%}&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"right-align"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="cp"&gt;{%&lt;/span&gt; &lt;span class="nv"&gt;url&lt;/span&gt; &lt;span class="s1"&gt;'update'&lt;/span&gt; &lt;span class="nv"&gt;task.id&lt;/span&gt; &lt;span class="cp"&gt;%}&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"ui secondary basic button "&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Update&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="cp"&gt;{%&lt;/span&gt; &lt;span class="nv"&gt;url&lt;/span&gt; &lt;span class="s1"&gt;'delete'&lt;/span&gt; &lt;span class="nv"&gt;task.id&lt;/span&gt; &lt;span class="cp"&gt;%}&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"ui negative basic button right hide-on-med-and-down"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Delete&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;

&lt;span class="cp"&gt;{%&lt;/span&gt; &lt;span class="k"&gt;endfor&lt;/span&gt; &lt;span class="cp"&gt;%}&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Update.html
&lt;/h3&gt;

&lt;p&gt;Next, let’s update the  &lt;code&gt;update.html&lt;/code&gt;  by pasting the following code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jinja"&gt;&lt;code&gt;# update.html

&lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"stylesheet"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/semantic.min.css"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;style&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;body&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;fit-content&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;20px&lt;/span&gt; &lt;span class="nb"&gt;auto&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="nt"&gt;form&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="m"&gt;5px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/style&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;h3&amp;gt;&lt;/span&gt;Update Task&lt;span class="nt"&gt;&amp;lt;/h3&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;form&lt;/span&gt; &lt;span class="na"&gt;method=&lt;/span&gt;&lt;span class="s"&gt;"POST"&lt;/span&gt; &lt;span class="na"&gt;action=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"ui form"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;" ui field action input"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="cp"&gt;{%&lt;/span&gt; &lt;span class="nv"&gt;csrf_token&lt;/span&gt; &lt;span class="cp"&gt;%}&lt;/span&gt;

        &lt;span class="cp"&gt;{{&lt;/span&gt; &lt;span class="nv"&gt;form&lt;/span&gt; &lt;span class="cp"&gt;}}&lt;/span&gt;

        &lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"submit"&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"Update Task"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"ui primary basic button"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;

    &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/form&amp;gt;&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Delete.html
&lt;/h3&gt;

&lt;p&gt;Lastly, let’s update the  &lt;code&gt;detele.html&lt;/code&gt;  by pasting the following code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jinja"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"stylesheet"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/semantic.min.css"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;style&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;body&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;fit-content&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;50px&lt;/span&gt; &lt;span class="nb"&gt;auto&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="nt"&gt;form&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nl"&gt;float&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;right&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/style&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;" container"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Are you sure you want to delete " &lt;span class="cp"&gt;{{&lt;/span&gt;&lt;span class="nv"&gt;item&lt;/span&gt;&lt;span class="cp"&gt;}}&lt;/span&gt;"?&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;div&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="cp"&gt;{%&lt;/span&gt; &lt;span class="nv"&gt;url&lt;/span&gt; &lt;span class="s1"&gt;'list'&lt;/span&gt; &lt;span class="cp"&gt;%}&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"ui secondary basic button"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Cancel&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&lt;/span&gt;

    &lt;span class="nt"&gt;&amp;lt;form&lt;/span&gt; &lt;span class="na"&gt;method=&lt;/span&gt;&lt;span class="s"&gt;"POST"&lt;/span&gt; &lt;span class="na"&gt;action=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="cp"&gt;{%&lt;/span&gt; &lt;span class="nv"&gt;csrf_token&lt;/span&gt; &lt;span class="cp"&gt;%}&lt;/span&gt;

        &lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"submit"&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"Confirm"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"ui negative basic button"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/form&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Everything is fine, let’s run our migration:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight viml"&gt;&lt;code&gt;&lt;span class="k"&gt;python&lt;/span&gt; manage&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;py&lt;/span&gt; migrate
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Testing the app
&lt;/h3&gt;

&lt;p&gt;And also start the development server with this command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight viml"&gt;&lt;code&gt;&lt;span class="k"&gt;python&lt;/span&gt; manage&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;py&lt;/span&gt; runserver
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Your app should be running on  &lt;a href="http://127.0.0.1:8000/" rel="noopener noreferrer"&gt;http://127.0.0.1:8000/&lt;/a&gt;. If you visit the URL, you should be presented with the webpage below, if you set up everything correctly.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhx4n6ed2q0ykqeha8jk3.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhx4n6ed2q0ykqeha8jk3.jpeg" alt="DjangoTodoApp.jpeg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion: Django
&lt;/h2&gt;

&lt;p&gt;This  Django tutorial explains the fundamentals of creating an application with Django using Django function-based views, MySQL database, and deployed to Heroku.&lt;/p&gt;

&lt;p&gt;This is just the basics of Django. There are so many, and no better place to go than Django’s official documentation.&lt;/p&gt;

&lt;p&gt;*&lt;strong&gt;&lt;em&gt;To learn Django in detail, there is no better course to recommend personally than &lt;a href="https://masteringbackend.solomoneseme.com/djangowithAI" rel="noopener noreferrer"&gt;Full stack web development and AI with Python (Django)&lt;/a&gt;. Check it out now for a discount.&lt;/em&gt;&lt;/strong&gt;*&lt;/p&gt;

&lt;p&gt;Let us know in the comment if you have any challenges, and we will fix them together.&lt;/p&gt;

&lt;p&gt;Thank you&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Author: Solomon Eseme&lt;/strong&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  Thank you for being a part of the community
&lt;/h3&gt;

&lt;p&gt;Before you go:&lt;/p&gt;

&lt;h4&gt;
  
  
  Whenever you’re ready
&lt;/h4&gt;

&lt;p&gt;There are 4 ways we can help you become a great backend engineer:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://masteringbackend.com/?ref=medium" rel="noopener noreferrer"&gt;&lt;strong&gt;The MB Platform:&lt;/strong&gt;&lt;/a&gt; Join thousands of backend engineers learning backend engineering. Build real-world backend projects, learn from expert-vetted courses and roadmaps, track your learnings and set schedules, and solve backend engineering tasks, exercises, and challenges.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://masteringbackend.com/academy?ref=medium" rel="noopener noreferrer"&gt;&lt;strong&gt;The MB Academy:&lt;/strong&gt;&lt;/a&gt; The “MB Academy” is a 6-month intensive Advanced Backend Engineering BootCamp to produce great backend engineers.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://backendweeky.dev/?ref=medium" rel="noopener noreferrer"&gt;&lt;strong&gt;Join Backend Weekly:&lt;/strong&gt;&lt;/a&gt; If you like posts like this, you will absolutely enjoy our exclusive weekly newsletter, sharing exclusive backend engineering resources to help you become a great Backend Engineer.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://getbackendjobs.com/?ref=medium" rel="noopener noreferrer"&gt;&lt;strong&gt;Get Backend Jobs:&lt;/strong&gt;&lt;/a&gt; Find over 2,000+ Tailored International Remote Backend Jobs or Reach 50,000+ backend engineers on the #1 Backend Engineering Job Board.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>tutorial</category>
      <category>beginners</category>
      <category>backend</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Top 5 backend frameworks</title>
      <dc:creator>Toluwanimi </dc:creator>
      <pubDate>Tue, 12 Aug 2025 11:00:30 +0000</pubDate>
      <link>https://dev.to/masteringbackend/top-5-backend-frameworks-1fj9</link>
      <guid>https://dev.to/masteringbackend/top-5-backend-frameworks-1fj9</guid>
      <description>&lt;p&gt;Hey guys, so am super excited today to share with you my top 5 “backend frameworks” as a  &lt;a href="https://masteringbackend.com/posts/getting-started-with-backend-development/" rel="noopener noreferrer"&gt;backend developer&lt;/a&gt;  you can start learning now or even in the future to come.&lt;/p&gt;

&lt;p&gt;As you also know, I discuss and write articles mainly about  &lt;a href="https://masteringbackend.com/" rel="noopener noreferrer"&gt;backend developments&lt;/a&gt;, so in this article am going to show my top 5 “backend frameworks” based on my personal research and experiences.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Laravel&lt;/li&gt;
&lt;li&gt; Express&lt;/li&gt;
&lt;li&gt; Spring&lt;/li&gt;
&lt;li&gt; Django&lt;/li&gt;
&lt;li&gt; ASP.net Core&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Am going to explain the “backend frameworks” from the bottom-top approach.&lt;/p&gt;

&lt;h4&gt;
  
  
  ASP .NET CORE:
&lt;/h4&gt;

&lt;p&gt;ASP .NET Core is a lean and composable framework for building web and cloud applications. ASP .NET Core is fully open-source and available on GitHub it includes the latest features and innovations in MVC.&lt;/p&gt;

&lt;p&gt;Its also a significant redesign of ASP .NET, This framework is very popular amount enterprises and companies who use the C# and windows products.&lt;/p&gt;

&lt;p&gt;So learning ASP .NET Core now is very relevant and definitely worth the time.&lt;/p&gt;

&lt;h4&gt;
  
  
  DJANGO:
&lt;/h4&gt;

&lt;p&gt;Django is a high — level python web framework that encourages rapid development and clean, pragmatic design, built by experienced developers, it takes care of much of the hassle of web development, so you can focus on writing your application without needing to reinvent the wheel.&lt;/p&gt;

&lt;p&gt;Python which happens to be the easiest programming language to learn has been getting lots of traction, becoming the most popular and in-demand language after JavaScript in some cases recently, therefore, making Django a good sort after skills in the web industry.&lt;/p&gt;

&lt;h4&gt;
  
  
  SPRING FRAMEWORK:
&lt;/h4&gt;

&lt;p&gt;The spring framework is an application framework and inversion of control container for the java platform.&lt;/p&gt;

&lt;p&gt;The framework’s core features can be used by any java application. Although the framework does not impose any specific programming model, it has become popular in the Java community.&lt;/p&gt;

&lt;p&gt;Because of the popularity of Java as a programming language and the number of devices that run it, it makes Spring framework very popular among the Java Enterprises community.&lt;/p&gt;

&lt;p&gt;So if you are a Java developer learning the Spring framework is a plus to your career.&lt;/p&gt;

&lt;h4&gt;
  
  
  EXPRESS:
&lt;/h4&gt;

&lt;p&gt;Express is a web application framework for NodeJS. It is designed for building web applications and APIs.&lt;/p&gt;

&lt;p&gt;Because of the current rise of JavaScript and the trending nature of NodeJS (a JavaScript run-time environment).&lt;/p&gt;

&lt;p&gt;Express has become a very popular and high demand skill as a backend developer.&lt;/p&gt;

&lt;h4&gt;
  
  
  LARAVEL:
&lt;/h4&gt;

&lt;p&gt;Laravel is a PHP framework for web artisans. It’s a free, open-source PHP framework intended for the development of web applications following the MVC pattern and based on Symfony.&lt;/p&gt;

&lt;p&gt;We all know that PHP powers about 78.9% of all websites on the web, so the PHP programming language is vastly used for both enterprise and start-up web apps.&lt;/p&gt;

&lt;p&gt;By the way, if you’re just STARTING out with Laravel, I have created a  &lt;a href="https://masteringbackend.com/posts/laravel-framework-the-ultimate-guide/" rel="noopener noreferrer"&gt;Complete Laravel Guide&lt;/a&gt;  just for you.&lt;/p&gt;

&lt;p&gt;It’s also the most preferred language for startups, these statistics make Laravel even more popular and eventually the best backend framework to learn as a backend developer in my opinion.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;em&gt;WRAPPING UP&lt;/em&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Thanks for reading my top 5 backend frameworks that you can learn now or in the future.&lt;/p&gt;

&lt;p&gt;Everything I have listed above is from my personal experience.&lt;/p&gt;

&lt;p&gt;So those are my top 5 backend frameworks. This list is not complete until you add or remove from it. So let me hear your thought in the comment section below.&lt;/p&gt;

&lt;p&gt;If you enjoy this post make sure you share it with your friends.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;If you are interested in backend development (or you’re internet enthusiast) both (Mobile | Web | Desktop) subscribe to my&lt;/em&gt; &lt;a href="http://bit.ly/multimegaschool" rel="noopener noreferrer"&gt;&lt;em&gt;Youtube channel&lt;/em&gt;&lt;/a&gt;&lt;em&gt;, we will be posting a collection of help full tutorials and guides like this one for artisans.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Author: Solomon Eseme&lt;/strong&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  Thank you for being a part of the community
&lt;/h3&gt;

&lt;p&gt;Before you go:&lt;/p&gt;

&lt;h4&gt;
  
  
  Whenever you’re ready
&lt;/h4&gt;

&lt;p&gt;There are 4 ways we can help you become a great backend engineer:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://masteringbackend.com/?ref=medium" rel="noopener noreferrer"&gt;&lt;strong&gt;The MB Platform:&lt;/strong&gt;&lt;/a&gt; Join thousands of backend engineers learning backend engineering. Build real-world backend projects, learn from expert-vetted courses and roadmaps, track your learnings and set schedules, and solve backend engineering tasks, exercises, and challenges.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://masteringbackend.com/academy?ref=medium" rel="noopener noreferrer"&gt;&lt;strong&gt;The MB Academy:&lt;/strong&gt;&lt;/a&gt; The “MB Academy” is a 6-month intensive Advanced Backend Engineering BootCamp to produce great backend engineers.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://backendweeky.dev/?ref=medium" rel="noopener noreferrer"&gt;&lt;strong&gt;Join Backend Weekly:&lt;/strong&gt;&lt;/a&gt; If you like posts like this, you will absolutely enjoy our exclusive weekly newsletter, sharing exclusive backend engineering resources to help you become a great Backend Engineer.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://getbackendjobs.com/?ref=medium" rel="noopener noreferrer"&gt;&lt;strong&gt;Get Backend Jobs:&lt;/strong&gt;&lt;/a&gt; Find over 2,000+ Tailored International Remote Backend Jobs or Reach 50,000+ backend engineers on the #1 Backend Engineering Job Board.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>tutorial</category>
      <category>beginners</category>
      <category>backend</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Rust Programming: The Ultimate Guide (2023)</title>
      <dc:creator>Toluwanimi </dc:creator>
      <pubDate>Mon, 11 Aug 2025 11:00:30 +0000</pubDate>
      <link>https://dev.to/masteringbackend/rust-programming-the-ultimate-guide-2023-5e2f</link>
      <guid>https://dev.to/masteringbackend/rust-programming-the-ultimate-guide-2023-5e2f</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffaczpbvmxqg7ha4cu0xq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffaczpbvmxqg7ha4cu0xq.png" alt="Rust Programming: The Ultimate Guide " width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Rust programming language brings to the table, new and opinionated ways of doing things.&lt;/p&gt;

&lt;p&gt;Concepts such as the Borrow Checker sound new to most developers coming from Garbage-Collected languages such as Go, Javascript, and Python.&lt;/p&gt;

&lt;p&gt;In place of Garbage-Collection, Rust programming language allows the developer to make the choices of memory management with concepts such as Ownership and Borrowing.&lt;/p&gt;

&lt;p&gt;The Borrow Checker, which most Rust developers would fight every now and then, ensures memory safety, a foreign concept to core C and C++.&lt;/p&gt;

&lt;h2&gt;
  
  
  Chapter 2: Advanced Rust Concepts
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftxghv5su2rdnjlka91ss.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftxghv5su2rdnjlka91ss.png" alt="Rust Programming: The Ultimate Guide " width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next, we’d want to call the function that handles user input in accordance with the previously initialized variables.&lt;/p&gt;

&lt;p&gt;We’ll momentarily leave the  &lt;code&gt;main&lt;/code&gt;  function and head to the  &lt;code&gt;handle_input&lt;/code&gt;  function:&lt;/p&gt;

&lt;p&gt;Before we do that, let’s take a look at the concept of  &lt;strong&gt;Ownership and Borrowing&lt;/strong&gt;  in Rust&lt;/p&gt;

&lt;h3&gt;
  
  
  Ownership
&lt;/h3&gt;

&lt;p&gt;Take a look at this short snippet:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="n"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="c1"&gt;//for brevity sake, we won’t specify this main function in subsequent snippets&lt;/span&gt;
    &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;hello&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="err"&gt;“&lt;/span&gt;&lt;span class="n"&gt;hello&lt;/span&gt;&lt;span class="err"&gt;”&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="c1"&gt;// at this point, hello no longer exists.&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;By default, variables are block-scoped.  &lt;code&gt;Hello&lt;/code&gt;  is an example of what we call a string literal:  &lt;em&gt;hardcoded string values.&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;hello&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nn"&gt;String&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;from&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="err"&gt;“&lt;/span&gt;&lt;span class="n"&gt;hello&lt;/span&gt;&lt;span class="err"&gt;”&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;bye&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;hello&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nd"&gt;println!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;“&lt;span class="p"&gt;{}&lt;/span&gt;”&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;hello&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;//the remaining arguments to the println macro are variables that would replace ‘{}’ in the string.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Running this code would throw an error(called panicking in Rust):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="n"&gt;error&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;E0382&lt;/span&gt;&lt;span class="p"&gt;]:&lt;/span&gt; &lt;span class="n"&gt;borrow&lt;/span&gt; &lt;span class="n"&gt;of&lt;/span&gt; &lt;span class="n"&gt;moved&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="err"&gt;`&lt;/span&gt;&lt;span class="n"&gt;hello&lt;/span&gt;&lt;span class="err"&gt;`&lt;/span&gt;
 &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="k"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;main&lt;/span&gt;&lt;span class="py"&gt;.rs&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;
  &lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt;     &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;hello&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nn"&gt;String&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;from&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"hello"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;|&lt;/span&gt;         &lt;span class="o"&gt;-----&lt;/span&gt; &lt;span class="k"&gt;move&lt;/span&gt; &lt;span class="n"&gt;occurs&lt;/span&gt; &lt;span class="n"&gt;because&lt;/span&gt; &lt;span class="err"&gt;`&lt;/span&gt;&lt;span class="n"&gt;hello&lt;/span&gt;&lt;span class="err"&gt;`&lt;/span&gt; &lt;span class="n"&gt;has&lt;/span&gt; &lt;span class="k"&gt;type&lt;/span&gt; &lt;span class="err"&gt;`&lt;/span&gt;&lt;span class="nn"&gt;std&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nn"&gt;string&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="err"&gt;`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;which&lt;/span&gt; &lt;span class="n"&gt;does&lt;/span&gt; &lt;span class="n"&gt;not&lt;/span&gt; &lt;span class="n"&gt;implement&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="err"&gt;`&lt;/span&gt;&lt;span class="nb"&gt;Copy&lt;/span&gt;&lt;span class="err"&gt;`&lt;/span&gt; &lt;span class="k"&gt;trait&lt;/span&gt;
&lt;span class="mi"&gt;3&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt;     &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;bye&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;hello&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;|&lt;/span&gt;               &lt;span class="o"&gt;-----&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt; &lt;span class="n"&gt;moved&lt;/span&gt; &lt;span class="n"&gt;here&lt;/span&gt;
&lt;span class="mi"&gt;4&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt;     &lt;span class="nd"&gt;println!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"{}"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;hello&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;|&lt;/span&gt;                    &lt;span class="o"&gt;^^^^^&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt; &lt;span class="n"&gt;borrowed&lt;/span&gt; &lt;span class="n"&gt;here&lt;/span&gt; &lt;span class="n"&gt;after&lt;/span&gt; &lt;span class="k"&gt;move&lt;/span&gt;

&lt;span class="n"&gt;error&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;aborting&lt;/span&gt; &lt;span class="n"&gt;due&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="n"&gt;previous&lt;/span&gt; &lt;span class="n"&gt;error&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For more information about this error, try  &lt;code&gt;rustc  --explain E0382&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;This signifies a concept called  &lt;strong&gt;Moving&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This means in Rust, an attempt to free unused memory, since both  &lt;code&gt;hello&lt;/code&gt;  and  &lt;code&gt;bye&lt;/code&gt;  are pointing to the same memory address, will invalidate the variable  &lt;code&gt;hello&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Any attempt to call the variable would result in an error. As a systems programming language with a focus on memory safety, this is a useful feature that prevents access to a memory address after it is no longer needed.&lt;/p&gt;

&lt;p&gt;Rust performs a form of copying, known as  &lt;strong&gt;shallow copying&lt;/strong&gt;. This way, both variables reference the same thing.&lt;/p&gt;

&lt;p&gt;In another example shown below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;let &lt;/span&gt;hello &lt;span class="o"&gt;=&lt;/span&gt; String::from&lt;span class="o"&gt;(&lt;/span&gt;“hello”&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nb"&gt;let &lt;/span&gt;bye &lt;span class="o"&gt;=&lt;/span&gt; “ and bye”&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nb"&gt;let &lt;/span&gt;greeting &lt;span class="o"&gt;=&lt;/span&gt; hello + bye&lt;span class="p"&gt;;&lt;/span&gt;
println!&lt;span class="o"&gt;(&lt;/span&gt;“&lt;span class="o"&gt;{}&lt;/span&gt;&lt;span class="nb"&gt;.&lt;/span&gt; Again, &lt;span class="o"&gt;{}&lt;/span&gt;? &lt;span class="o"&gt;{}&lt;/span&gt;”, greeting, hello, bye&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Again, as expected, this code won’t compile.  &lt;code&gt;bye&lt;/code&gt;  ceases to exist the moment it is used somewhere else.&lt;/p&gt;

&lt;p&gt;The new variable takes  &lt;strong&gt;ownership&lt;/strong&gt;  of  &lt;code&gt;bye&lt;/code&gt;  and  &lt;code&gt;bye&lt;/code&gt;  ceases to exist.  &lt;code&gt;hello&lt;/code&gt;  on the other hand, has no problems with this. This is because, due to the use of  &lt;code&gt;String::new()&lt;/code&gt;, the size of  &lt;code&gt;hello&lt;/code&gt;  is known at compile-time, therefore, there’s no  &lt;strong&gt;deep or shallow copying&lt;/strong&gt;  here.&lt;/p&gt;

&lt;p&gt;Using the code above, we can solve this problem by performing explicit deep copying like so:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;hello&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nn"&gt;String&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;from&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="err"&gt;“&lt;/span&gt;&lt;span class="n"&gt;hello&lt;/span&gt;&lt;span class="err"&gt;”&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;bye&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;hello&lt;/span&gt;&lt;span class="nf"&gt;.copy&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="nd"&gt;println!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;“&lt;span class="p"&gt;{}&lt;/span&gt;”&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;hello&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This time we’d have no errors since the underlying data is copied to  &lt;code&gt;bye&lt;/code&gt;  and ownership of  &lt;code&gt;bye&lt;/code&gt;  isn’t performed.&lt;/p&gt;

&lt;h4&gt;
  
  
  Borrowing
&lt;/h4&gt;

&lt;p&gt;How about functions?&lt;/p&gt;

&lt;p&gt;How do we pass arguments into functions and still reuse the variables? Rust has some sort of pointer-like magic called  &lt;strong&gt;Borrowing&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;With it, we can pass to functions, references to variables and access underlying data, and even mutate it (as we’ll see in the  &lt;code&gt;handle_input&lt;/code&gt;  function).&lt;/p&gt;

&lt;p&gt;Let’s go on to create the  &lt;code&gt;handle_input&lt;/code&gt;  function and learn  &lt;strong&gt;Borrowing&lt;/strong&gt;  from it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scss"&gt;&lt;code&gt;&lt;span class="na"&gt;fn&lt;/span&gt;&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="na"&gt;handle_input&lt;/span&gt;&lt;span class="err"&gt;(&lt;/span&gt;&lt;span class="na"&gt;var&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;mut&lt;/span&gt; &lt;span class="n"&gt;String&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="err"&gt;→&lt;/span&gt; &lt;span class="n"&gt;i32&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;io&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="nf"&gt;stdin&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
        &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;read_line&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Failed to read line"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="nt"&gt;var&lt;/span&gt;&lt;span class="nc"&gt;.chars&lt;/span&gt;&lt;span class="o"&gt;()&lt;/span&gt;
        &lt;span class="nc"&gt;.count&lt;/span&gt;&lt;span class="o"&gt;()&lt;/span&gt;
        &lt;span class="nc"&gt;.try_into&lt;/span&gt;&lt;span class="o"&gt;()&lt;/span&gt;
        &lt;span class="nc"&gt;.expect&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Length of name is too large!"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The function accepts a funny argument type,  &lt;code&gt;&amp;amp;mut  String&lt;/code&gt;. You’ll probably recognize it as expecting a mutable String as an argument, but it goes farther than that:&lt;/p&gt;

&lt;p&gt;The  &lt;code&gt;&amp;amp;&lt;/code&gt;  sign indicates that the function is expecting a reference to that data type since we’d like to mutate its value rather than take ownership of it as Rust would normally expect.&lt;/p&gt;

&lt;p&gt;This concept is called  &lt;strong&gt;Borrowing&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;At the end of the function’s execution, control of the memory address is returned back to the initial variable.&lt;/p&gt;

&lt;p&gt;So, we call the  &lt;code&gt;stdin&lt;/code&gt;  method of the  &lt;code&gt;io&lt;/code&gt;  module for input-related functionalities,  &lt;code&gt;read_line&lt;/code&gt;  does the magic of passing the user input into the variable specified.&lt;/p&gt;

&lt;p&gt;The  &lt;code&gt;expect&lt;/code&gt;  method is used for error propagation:&lt;/p&gt;

&lt;p&gt;There are cases where we’d want our function to return an error type to the calling code to handle if an error occurs while performing an operation.&lt;/p&gt;

&lt;p&gt;The  &lt;code&gt;expect&lt;/code&gt;  function (similar to  &lt;code&gt;unwrap&lt;/code&gt;  ) allows us to specify a custom message for the panic (as exceptions are called in Rust).&lt;/p&gt;

&lt;p&gt;While  &lt;code&gt;unwrap&lt;/code&gt;  would instead return the error to the calling code without a custom message.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Return value (data types)&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;The  &lt;code&gt;handle_input&lt;/code&gt;  function has a return type of  &lt;code&gt;i32&lt;/code&gt;, which is a signed 32-bit integer.&lt;/p&gt;

&lt;p&gt;Other integer data types include  &lt;code&gt;i8&lt;/code&gt;,  &lt;code&gt;i16&lt;/code&gt;,  &lt;code&gt;i64&lt;/code&gt;,  &lt;code&gt;i128&lt;/code&gt;  for signed integers of 8, 16, 64 and 128 respectively.&lt;/p&gt;

&lt;p&gt;Unsigned integer types are of the  &lt;code&gt;u&lt;/code&gt;  prefix with variants such as  &lt;code&gt;u8&lt;/code&gt;,  &lt;code&gt;u16&lt;/code&gt;,  &lt;code&gt;u32&lt;/code&gt;,  &lt;code&gt;u64&lt;/code&gt;, and  &lt;code&gt;u128&lt;/code&gt;  with their obvious precision levels.&lt;/p&gt;

&lt;p&gt;For floating-point values, only two types are available:  &lt;code&gt;f32&lt;/code&gt;  and  &lt;code&gt;f64&lt;/code&gt;  for 32 and 64-bit precision respectively.&lt;/p&gt;

&lt;p&gt;Taking a look at the return value snippet:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var.chars()
        .count()
        .try_into()
        .expect("Length of name is too large!")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The  &lt;code&gt;chars&lt;/code&gt;  method first breaks the text given by the user into an array of individual characters,  &lt;code&gt;count&lt;/code&gt;  gives its count with a type of  &lt;code&gt;usize&lt;/code&gt;, an integer type for the size of data in Rust.&lt;/p&gt;

&lt;p&gt;The  &lt;code&gt;try_into&lt;/code&gt;  function on the other hand attempts to convert  &lt;code&gt;usize&lt;/code&gt;  type into  &lt;code&gt;i32&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;You would notice that  &lt;code&gt;try_into&lt;/code&gt;  automatically knows the type we need due to the function’s return type – another Rust magic.&lt;/p&gt;

&lt;p&gt;Finally, we wrap it all with an  &lt;code&gt;expect&lt;/code&gt;  for possible errors that might occur.&lt;/p&gt;

&lt;h5&gt;
  
  
  &lt;strong&gt;Back to the main function&lt;/strong&gt;
&lt;/h5&gt;

&lt;p&gt;At this point, we can then attempt to call the function and initialized our variables like so:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight reasonml"&gt;&lt;code&gt;&lt;span class="n"&gt;println&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="err"&gt;“&lt;/span&gt;&lt;span class="nc"&gt;Enter&lt;/span&gt; &lt;span class="n"&gt;first&lt;/span&gt; &lt;span class="n"&gt;person&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="err"&gt;“&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;name1_count&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;get_input&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;mut&lt;/span&gt; &lt;span class="n"&gt;name1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="n"&gt;println&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="err"&gt;“&lt;/span&gt;&lt;span class="nc"&gt;Enter&lt;/span&gt; &lt;span class="n"&gt;second&lt;/span&gt; &lt;span class="n"&gt;person&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="err"&gt;“&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;name2_count&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;get_input&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;mut&lt;/span&gt; &lt;span class="n"&gt;name2&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  &lt;strong&gt;Matches&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Next, we’ll need a function to compute the compatibility:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;calculate_compatibility&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;name1_count&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;i32&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;name2_count&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;i32&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="err"&gt;→&lt;/span&gt; &lt;span class="nb"&gt;f32&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;match&lt;/span&gt; &lt;span class="n"&gt;name1_count&lt;/span&gt;&lt;span class="nf"&gt;.cmp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;name2_count&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nn"&gt;Ordering&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;Less&lt;/span&gt; &lt;span class="k"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="n"&gt;name1_count&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nb"&gt;f32&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="n"&gt;name2_count&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nb"&gt;f32&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nb"&gt;f32&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mf"&gt;100.0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nb"&gt;f32&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="nn"&gt;Ordering&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;Greater&lt;/span&gt; &lt;span class="k"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="n"&gt;name2_count&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nb"&gt;f32&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="n"&gt;name1_count&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nb"&gt;f32&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nb"&gt;f32&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mf"&gt;100.0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nb"&gt;f32&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="nn"&gt;Ordering&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;Equal&lt;/span&gt; &lt;span class="k"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="mf"&gt;50.0&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Since we’ll be doing a bit of arithmetic, the function should be returning a float type.&lt;/p&gt;

&lt;p&gt;Next, we compare both values to see which is higher. To do that, instead of the  &lt;code&gt;if&lt;/code&gt;  statement with a syntax of:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight armasm"&gt;&lt;code&gt;&lt;span class="nl"&gt;if&lt;/span&gt; &lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nb"&gt;condition&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="nb"&gt;block&lt;/span&gt; &lt;span class="nv"&gt;of&lt;/span&gt; &lt;span class="nv"&gt;code&lt;/span&gt;
&lt;span class="err"&gt;}&lt;/span&gt; &lt;span class="nb"&gt;else&lt;/span&gt; &lt;span class="nv"&gt;if&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nv"&gt;condition&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="nb"&gt;block&lt;/span&gt; &lt;span class="nv"&gt;of&lt;/span&gt; &lt;span class="nv"&gt;code&lt;/span&gt;
&lt;span class="err"&gt;}&lt;/span&gt; &lt;span class="nb"&gt;else&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="nb"&gt;block&lt;/span&gt; &lt;span class="nv"&gt;of&lt;/span&gt; &lt;span class="nv"&gt;code&lt;/span&gt;
&lt;span class="err"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We’ll be making use of  &lt;code&gt;match&lt;/code&gt;, since the comparison of two number in Rust yields a data type rather than a boolean:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;match name1_count.cmp(&amp;amp;name2_count) {
    Ordering::Less =&amp;gt; {
    },
    Ordering::Greater =&amp;gt; {
    },
    Ordering::Equal =&amp;gt; {
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A  &lt;strong&gt;match&lt;/strong&gt;  statement is made up of  &lt;code&gt;match&lt;/code&gt;  followed by a type, or an operation that returns a type. In the block of code following, it is  &lt;code&gt;arms&lt;/code&gt;  with pathways of code to run depending on what type is expected.&lt;/p&gt;

&lt;p&gt;With this functionality of types returned for comparison, we have to bring into scope, the types expected to be returned with the statement:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight elixir"&gt;&lt;code&gt;&lt;span class="kn"&gt;use&lt;/span&gt; &lt;span class="n"&gt;std&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;cmp&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="no"&gt;Ordering&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We’re done! We’ll compile and run our program with  &lt;code&gt;cargo  run&lt;/code&gt;  in the code directory.&lt;/p&gt;

&lt;p&gt;Alas! We have an error:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;error[E0599]: no method named `try_into` found for type `usize` in the current scope
  --&amp;gt; src/main.rs:10:25
   |
10 |     var.chars().count().try_into().expect("Length of name is too large!")
   |                         ^^^^^^^^ method not found in `usize`
   |
   = help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
   |
1  | use std::convert::TryInto;
   |

error: aborting due to previous error

For more information about this error, try `rustc --explain E0599`.
error: could not compile `love_calculator`.

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Something about traits.&lt;/p&gt;

&lt;h4&gt;
  
  
  A not very useful example
&lt;/h4&gt;

&lt;p&gt;So, what are traits? Well, traits are a way Rust says:  &lt;strong&gt;Inheritance&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;As codebase increases, we notice that some structs seem to have similar characteristics, and it is important that future structs with such characteristics should be able to perform actions these structs can do.&lt;/p&gt;

&lt;p&gt;An example, as culled from the Rust documentation will be used. Let’s say we’re implementing Tweets like so:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;struct Tweet {
    username: String,
    content: String,
    location: String,
    retweet: bool,
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We might want to implement a  &lt;code&gt;summarize&lt;/code&gt;  method that displays a short form of the tweet:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="k"&gt;impl&lt;/span&gt; &lt;span class="n"&gt;Tweet&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;summarize&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="k"&gt;self&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="err"&gt;→&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="k"&gt;self&lt;/span&gt;&lt;span class="py"&gt;.retweet&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nd"&gt;format!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;“&lt;span class="p"&gt;{}&lt;/span&gt; &lt;span class="n"&gt;retweeted&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt; &lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt;”&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;self&lt;/span&gt;&lt;span class="py"&gt;.username&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;self&lt;/span&gt;&lt;span class="py"&gt;.content&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;self&lt;/span&gt;&lt;span class="py"&gt;.location&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nd"&gt;format!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;“&lt;span class="p"&gt;{}&lt;/span&gt; &lt;span class="n"&gt;tweeted&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt; &lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt;”&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;self&lt;/span&gt;&lt;span class="py"&gt;.username&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;self&lt;/span&gt;&lt;span class="py"&gt;.content&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;self&lt;/span&gt;&lt;span class="py"&gt;.location&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Consider another code where we implemented a news article like so:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;struct Article {
    title: String,
    author: String,
    content: String,
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and need to implement a summarize method. While we could as well implement it as a separate method:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="k"&gt;impl&lt;/span&gt; &lt;span class="n"&gt;Article&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;summarize&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="k"&gt;self&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="err"&gt;→&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nd"&gt;format!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;“&lt;span class="p"&gt;{}&lt;/span&gt; &lt;span class="n"&gt;posted&lt;/span&gt; &lt;span class="n"&gt;an&lt;/span&gt; &lt;span class="n"&gt;article&lt;/span&gt; &lt;span class="n"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt;”&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;self&lt;/span&gt;&lt;span class="py"&gt;.author&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;self&lt;/span&gt;&lt;span class="py"&gt;.title&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;we could standardize our code by creating a trait both structs could implement. This way, we can ensure consistency when working with different structs with similar functionality.&lt;/p&gt;

&lt;p&gt;So our trait is implemented like so:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="kd"&gt;trait&lt;/span&gt; &lt;span class="nc"&gt;Summary&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="n"&gt;summarize&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="k"&gt;self&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="err"&gt;→&lt;/span&gt; &lt;span class="nc"&gt;String&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, we attach the trait to our structs and implement the methods since it would be enforced anyway:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="c1"&gt;// for Tweet&lt;/span&gt;
&lt;span class="k"&gt;impl&lt;/span&gt; &lt;span class="n"&gt;Summary&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;Tweet&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;summarize&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="k"&gt;self&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="err"&gt;→&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="k"&gt;self&lt;/span&gt;&lt;span class="py"&gt;.retweet&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nd"&gt;format!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;“&lt;span class="p"&gt;{}&lt;/span&gt; &lt;span class="n"&gt;retweeted&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt; &lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt;”&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;self&lt;/span&gt;&lt;span class="py"&gt;.username&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;self&lt;/span&gt;&lt;span class="py"&gt;.content&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;self&lt;/span&gt;&lt;span class="py"&gt;.location&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nd"&gt;format!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;“&lt;span class="p"&gt;{}&lt;/span&gt; &lt;span class="n"&gt;tweeted&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt; &lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt;”&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;self&lt;/span&gt;&lt;span class="py"&gt;.username&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;self&lt;/span&gt;&lt;span class="py"&gt;.content&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;self&lt;/span&gt;&lt;span class="py"&gt;.location&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// for Article&lt;/span&gt;

&lt;span class="k"&gt;impl&lt;/span&gt; &lt;span class="n"&gt;Summary&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;Article&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;summarize&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="k"&gt;self&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="err"&gt;→&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nd"&gt;format!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;“&lt;span class="p"&gt;{}&lt;/span&gt; &lt;span class="n"&gt;posted&lt;/span&gt; &lt;span class="n"&gt;an&lt;/span&gt; &lt;span class="n"&gt;article&lt;/span&gt; &lt;span class="n"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt;”&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;self&lt;/span&gt;&lt;span class="py"&gt;.author&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;self&lt;/span&gt;&lt;span class="py"&gt;.title&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then we can call our methods:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;tweet&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Tweet&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nn"&gt;String&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;from&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="err"&gt;“&lt;/span&gt;&lt;span class="n"&gt;Lord_Sarcastic&lt;/span&gt;&lt;span class="err"&gt;”&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
        &lt;span class="nn"&gt;String&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;from&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="err"&gt;“&lt;/span&gt;&lt;span class="n"&gt;Hello&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nd"&gt;world!&lt;/span&gt; &lt;span class="n"&gt;Bye&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nd"&gt;world!&lt;/span&gt;”&lt;span class="p"&gt;),&lt;/span&gt;
        &lt;span class="nn"&gt;String&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;from&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;“&lt;span class="n"&gt;Lagos&lt;/span&gt;”&lt;span class="p"&gt;),&lt;/span&gt;
        &lt;span class="kc"&gt;false&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;article&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Article&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nn"&gt;String&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;from&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;“&lt;span class="n"&gt;Python&lt;/span&gt; &lt;span class="n"&gt;and&lt;/span&gt; &lt;span class="n"&gt;Rust&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;”&lt;span class="p"&gt;),&lt;/span&gt;
        &lt;span class="nn"&gt;String&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;from&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;“&lt;span class="n"&gt;Lord_Sarcastic&lt;/span&gt;”&lt;span class="p"&gt;),&lt;/span&gt;
        &lt;span class="nn"&gt;String&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;from&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;“&lt;span class="n"&gt;Python&lt;/span&gt; &lt;span class="n"&gt;and&lt;/span&gt; &lt;span class="n"&gt;Rust&lt;/span&gt; &lt;span class="n"&gt;make&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="n"&gt;good&lt;/span&gt; &lt;span class="k"&gt;match&lt;/span&gt;”&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="nd"&gt;println!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;“&lt;span class="n"&gt;Tweet&lt;/span&gt; &lt;span class="n"&gt;summary&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; ‘&lt;span class="p"&gt;{}&lt;/span&gt;’”&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;tweet&lt;/span&gt;&lt;span class="nf"&gt;.summarize&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
    &lt;span class="nd"&gt;println!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;“&lt;span class="n"&gt;Article&lt;/span&gt; &lt;span class="n"&gt;summary&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; ‘&lt;span class="p"&gt;{}&lt;/span&gt;’”&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;article&lt;/span&gt;&lt;span class="nf"&gt;.summarize&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  A very useful example
&lt;/h4&gt;

&lt;p&gt;With traits, we could also have a default implementation for methods. As an example, if we wanted a display method that made use of the  &lt;code&gt;summarize&lt;/code&gt;  method under the hood, we could have a trait like so:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="k"&gt;trait&lt;/span&gt; &lt;span class="n"&gt;Summary&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;summarize&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="k"&gt;self&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="err"&gt;→&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;display&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="k"&gt;self&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="err"&gt;→&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nd"&gt;format!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;“&lt;span class="n"&gt;Summary&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt;”&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;self&lt;/span&gt;&lt;span class="nf"&gt;.summarize&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;At this point, both structs can call  &lt;code&gt;display&lt;/code&gt;  without having implemented methods for it, but  &lt;code&gt;summarize&lt;/code&gt;  must be implemented for it to work.&lt;/p&gt;

&lt;h4&gt;
  
  
  Lest we go offtrack…
&lt;/h4&gt;

&lt;p&gt;Why this? The thing is for us to use functionalities that involve traits, the trait has to be in scope.&lt;/p&gt;

&lt;p&gt;We can see that the Rust compiler insists that we bring a trait into scope before it would allow type conversion. That can be fixed with a simple line:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight elixir"&gt;&lt;code&gt;&lt;span class="kn"&gt;use&lt;/span&gt; &lt;span class="n"&gt;std&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="ss"&gt;convert:&lt;/span&gt;&lt;span class="no"&gt;TryInto&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;At this point, you’ll see that there are two ways we call methods:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;type.method()&lt;/code&gt;: This is for instance methods – methods bound to a specific instance of the type.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;type::method()&lt;/code&gt;: This is for static methods – methods that are bound to the type itself and do not need self(the instance reference) as a parameter.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;As mentioned earlier, Rust uses Structs and Enums for data abstractions. A struct is represented syntactically like so:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;struct User {
    username: String,
    first_name: String,
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And then methods for this struct is done with the  &lt;code&gt;impl&lt;/code&gt;  keyword:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="k"&gt;impl&lt;/span&gt; &lt;span class="n"&gt;User&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;username&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;first_name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="err"&gt;→&lt;/span&gt; &lt;span class="n"&gt;User&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="n"&gt;User&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;username&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;first_name&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

 &lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;say_name&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="k"&gt;self&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="err"&gt;→&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="nd"&gt;println!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;“&lt;span class="p"&gt;{}&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="n"&gt;is&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt;”&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;self&lt;/span&gt;&lt;span class="py"&gt;.username&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;self&lt;/span&gt;&lt;span class="py"&gt;.first_name&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
 &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As you can guess,  &lt;code&gt;new&lt;/code&gt;  is a static method, while  &lt;code&gt;say_name&lt;/code&gt;  is an instance method.&lt;/p&gt;

&lt;p&gt;Enums on the other hand are used to group similar structs under an abstraction.&lt;/p&gt;

&lt;p&gt;For example, if we wanted to extend the User struct to contain a gender field, we could implement a gender structs like so:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;struct Male {
    symbol: u8,
}

struct Female {
    symbol: u8,
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and then group them under a gender enum like so:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;enum Gender {
    Female,
    Male,
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Our User struct can then make use of this abstraction like so:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;struct User {
    username: String,
    first_name: String,
    gender: Gender,
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Accessing structs associated with an enum is done with the  &lt;code&gt;::&lt;/code&gt;  operator.&lt;/p&gt;

&lt;p&gt;Going back to the Ordering Code above, we can see that Ordering is an enum with struct types: Less, Greater, and Equal.&lt;/p&gt;

&lt;p&gt;When the comparison is done with the  &lt;code&gt;cmp&lt;/code&gt;  method, the method yields one of these types, we can then take advantage of the graceful match syntax to perform our calculations based on these types:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="nn"&gt;Ordering&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;Less&lt;/span&gt; &lt;span class="k"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="n"&gt;name1_count&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nb"&gt;f32&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="n"&gt;name2_count&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nb"&gt;f32&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nb"&gt;f32&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mf"&gt;100.0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nb"&gt;f32&lt;/span&gt;
&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="nn"&gt;Ordering&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;Greater&lt;/span&gt; &lt;span class="k"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="n"&gt;name2_count&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nb"&gt;f32&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="n"&gt;name1_count&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nb"&gt;f32&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nb"&gt;f32&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mf"&gt;100.0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nb"&gt;f32&lt;/span&gt;
&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="nn"&gt;Ordering&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;Equal&lt;/span&gt; &lt;span class="k"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="mf"&gt;50.0&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Since we’ll be working with fractions here, it’s important to switch data types to floating values in order to maintain precision.&lt;/p&gt;

&lt;p&gt;This is done using the  &lt;code&gt;as&lt;/code&gt;  keyword. We have to cast all values into the f32 type before our code works successfully.&lt;/p&gt;

&lt;p&gt;For the Equal arm, we also have to make 50 as a floating-point value to match the return type. It’s easy to miss.&lt;/p&gt;

&lt;h4&gt;
  
  
  Return value(match)
&lt;/h4&gt;

&lt;p&gt;Since we have one-liner operations as a resolved value, we do not need the  &lt;code&gt;return&lt;/code&gt;  keyword. The values would be returned implicitly due to the lack of a semicolon as a delimiter.&lt;/p&gt;

&lt;h4&gt;
  
  
  Back to main(the end?)
&lt;/h4&gt;

&lt;p&gt;We can head back to the main function and call the  &lt;code&gt;calculate_compatibility&lt;/code&gt;  function and display the results:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight reasonml"&gt;&lt;code&gt;&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;compat_value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;calculate_compatibility&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;name1_count&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="n"&gt;name2_count&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;floor&lt;/span&gt;&lt;span class="bp"&gt;()&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="n"&gt;println&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Love compatibility between {} and {} is {}%"&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="n"&gt;name1&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;trim&lt;/span&gt;&lt;span class="bp"&gt;()&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="n"&gt;name2&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;trim&lt;/span&gt;&lt;span class="bp"&gt;()&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="n"&gt;compat_value&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The  &lt;code&gt;trim&lt;/code&gt;  method removes whitespace characters at the beginning and end of the string.&lt;/p&gt;

&lt;h2&gt;
  
  
  Chapter 3: Building with Rust
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffaczpbvmxqg7ha4cu0xq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffaczpbvmxqg7ha4cu0xq.png" alt="Rust Programming: The Ultimate Guide " width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Installing Rust is quite easy. Head to the official website &lt;a href="https://www.rust-lang.org/tools/install" rel="noopener noreferrer"&gt;https://www.rust-lang.org/tools/install&lt;/a&gt;  and follow the steps.&lt;/p&gt;

&lt;p&gt;From your CLI, confirm your installation with  &lt;code&gt;rustc –-version&lt;/code&gt;  and  &lt;code&gt;cargo –-version&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The former is the standard Rust tool for compiling and executing your code.&lt;/p&gt;

&lt;p&gt;The latter is an abstraction that provides common tools needed by developers to organize their code and other external libraries.&lt;/p&gt;

&lt;p&gt;You also get a linter:  &lt;code&gt;clippy&lt;/code&gt;, and a nice way to run tests for your code.&lt;/p&gt;

&lt;p&gt;We all had our own shares of love plays while young. Perhaps you remember the popular “flames” method.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmasteringbackend.solomoneseme.com%2Fwp-content%2Fuploads%2F2021%2F01%2Fflames.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmasteringbackend.solomoneseme.com%2Fwp-content%2Fuploads%2F2021%2F01%2Fflames.jpeg" alt="Rust Programming: The Ultimate Guide " width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here we’ll be using a basic formula to derive compatibility percentages:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="o"&gt;(&lt;/span&gt;length_of_shorter_name/length_of_longer_name&lt;span class="o"&gt;)&lt;/span&gt; × 100
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Pseudocode:&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Rust way of doing things diverges from the other languages, hence the need for pseudocode to outline steps in our code.&lt;/p&gt;

&lt;p&gt;This program calculates the love compatibility of a male and a female with their names as input:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight reasonml"&gt;&lt;code&gt;&lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;handle_input&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;arg&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;memory_address_to_store_input&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;accepts&lt;/span&gt; &lt;span class="nt"&gt;`memory&lt;/span&gt; &lt;span class="n"&gt;address&lt;/span&gt;&lt;span class="err"&gt;`&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;
    &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;returns&lt;/span&gt; &lt;span class="n"&gt;nothing&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;

    &lt;span class="n"&gt;request&lt;/span&gt; &lt;span class="n"&gt;input&lt;/span&gt; &lt;span class="n"&gt;from&lt;/span&gt; &lt;span class="n"&gt;user&lt;/span&gt;
    &lt;span class="n"&gt;trim&lt;/span&gt; &lt;span class="n"&gt;whitespace&lt;/span&gt; &lt;span class="n"&gt;from&lt;/span&gt; &lt;span class="n"&gt;user&lt;/span&gt; &lt;span class="n"&gt;input&lt;/span&gt;
    &lt;span class="n"&gt;store&lt;/span&gt; &lt;span class="n"&gt;cleaned&lt;/span&gt; &lt;span class="n"&gt;input&lt;/span&gt; &lt;span class="n"&gt;into&lt;/span&gt; &lt;span class="nt"&gt;`arg&lt;/span&gt;&lt;span class="err"&gt;`&lt;/span&gt;

    &lt;span class="n"&gt;returns&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;length&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;input&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;calculate_compatibility&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;name1&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="n"&gt;name2&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;accepts&lt;/span&gt; &lt;span class="nc"&gt;Strings&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;both&lt;/span&gt; &lt;span class="n"&gt;input&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;
    &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;returns&lt;/span&gt; &lt;span class="n"&gt;number&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;percentage&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;length&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="n"&gt;name1&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;length&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="n"&gt;name2&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;percentage&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;length&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="n"&gt;name2&lt;/span&gt; &lt;span class="err"&gt;⁄&lt;/span&gt; &lt;span class="n"&gt;length&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="n"&gt;name1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;
    &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;length&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="n"&gt;name2&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;length&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="n"&gt;name1&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;percentage&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;length&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="n"&gt;name1&lt;/span&gt; &lt;span class="err"&gt;⁄&lt;/span&gt; &lt;span class="n"&gt;length&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="n"&gt;name2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;
    &lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;lengths&lt;/span&gt; &lt;span class="n"&gt;are&lt;/span&gt; &lt;span class="n"&gt;equal&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;
        &lt;span class="n"&gt;percentage&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;50&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;main&lt;/span&gt;&lt;span class="bp"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;initialize&lt;/span&gt; &lt;span class="nt"&gt;`name1&lt;/span&gt;&lt;span class="err"&gt;`&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt;
    &lt;span class="n"&gt;initialize&lt;/span&gt; &lt;span class="nt"&gt;`name2&lt;/span&gt;&lt;span class="err"&gt;`&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt;

    &lt;span class="n"&gt;name1_count&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;handle_input&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;memory&lt;/span&gt; &lt;span class="n"&gt;address&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="n"&gt;name1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;name2_count&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;handle_input&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;memory&lt;/span&gt; &lt;span class="n"&gt;address&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="n"&gt;name2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="n"&gt;compatibility&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;  &lt;span class="n"&gt;calculate_compatibility&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;name1_count&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="n"&gt;name2_count&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="n"&gt;print&lt;/span&gt; &lt;span class="n"&gt;compatibility&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Code&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;First, we’ll use  &lt;code&gt;cargo&lt;/code&gt;  to initialize our project. Cargo will help manage compilation and other nitty-gritty things involved in running out of code.&lt;/p&gt;

&lt;p&gt;To initialize, head to the terminal and type:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight actionscript"&gt;&lt;code&gt;&lt;span class="nx"&gt;cargo&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;love_calculator&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  &lt;strong&gt;The main function&lt;/strong&gt;
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="k"&gt;use&lt;/span&gt; &lt;span class="nn"&gt;std&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;io&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="k"&gt;mut&lt;/span&gt; &lt;span class="n"&gt;name1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nn"&gt;String&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="k"&gt;mut&lt;/span&gt; &lt;span class="n"&gt;name2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nn"&gt;String&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The first line of our program would involve bringing functionality from the standard library into scope.&lt;/p&gt;

&lt;p&gt;The  &lt;code&gt;io&lt;/code&gt;  module as explained in its  &lt;a href="https://doc.rust-lang.org/std/io/index.html" rel="noopener noreferrer"&gt;documentation&lt;/a&gt;  &lt;em&gt;“… contains a number of common things you’ll need when doing input and output”&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;As with many C-like languages, the entry point of any Rust program is the  &lt;code&gt;main&lt;/code&gt;  function. Declaring a function uses the keyword  &lt;code&gt;fn&lt;/code&gt;  and the name of the function.&lt;/p&gt;

&lt;p&gt;It has a syntax like so:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight reasonml"&gt;&lt;code&gt;&lt;span class="n"&gt;fn&lt;/span&gt; &lt;span class="n"&gt;function_name&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;arg1&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="k"&gt;type&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="n"&gt;arg2&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="k"&gt;type&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="o"&gt;...&lt;/span&gt;&lt;span class="n"&gt;argn&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="k"&gt;type&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="err"&gt;→&lt;/span&gt; &lt;span class="n"&gt;return_type&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;body&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;//statements end in a semicolon&lt;/span&gt;
    &lt;span class="n"&gt;return&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt;    &lt;span class="c1"&gt;//return values do not require a semicolon or the ‘return’ keyword. If you need a semicolon, perhaps as part of a logic, you can then use the return keyword&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the absence of a return type, Rust implicitly returns what is called the  &lt;a href="https://doc.rust-lang.org/std/result/enum.Result.html#variant.Ok" rel="noopener noreferrer"&gt;Unit Type&lt;/a&gt;, written as  &lt;code&gt;Ok()&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The concept of Null does not exist in Rust, instead, Rust represents it with a type called  &lt;code&gt;None&lt;/code&gt;  as showing the absence of a value. Its counterpart is  &lt;code&gt;Some&lt;/code&gt;  which could be used to wrap any data type.&lt;/p&gt;

&lt;p&gt;In the  &lt;code&gt;main&lt;/code&gt;  function, we declare two variables,  &lt;code&gt;name1&lt;/code&gt;  and  &lt;code&gt;name2&lt;/code&gt;  using the  &lt;code&gt;let&lt;/code&gt;  keyword as:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Being mutable, with the  &lt;code&gt;mut&lt;/code&gt;  keyword;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;As a String:&lt;/strong&gt;  There are two types of strings you’ll encounter in Rust, the other is a string literal.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;As with many other languages, the  &lt;code&gt;new&lt;/code&gt;  method is used to initialize an instance of an object or Struct in this case.&lt;/p&gt;

&lt;p&gt;Rust makes use of Structs and Enums as opposed to objects and classes for abstracting data.&lt;/p&gt;

&lt;p&gt;We’ll be taking a closer look at these two concepts later on.&lt;/p&gt;

&lt;p&gt;Right now, let’s get the our actual Love Calculator Code out of the way.&lt;/p&gt;

&lt;p&gt;Below is the code that will produce our love calculator in Rust based on the name input of the user.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="k"&gt;use&lt;/span&gt; &lt;span class="nn"&gt;std&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nn"&gt;cmp&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;Ordering&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;use&lt;/span&gt; &lt;span class="nn"&gt;std&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nn"&gt;convert&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nb"&gt;TryInto&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;use&lt;/span&gt; &lt;span class="nn"&gt;std&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;io&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;


&lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;get_input&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="k"&gt;mut&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;i32&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nn"&gt;io&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;stdin&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
        &lt;span class="nf"&gt;.read_line&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="nf"&gt;.expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Failed to read line"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="nf"&gt;.chars&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
        &lt;span class="nf"&gt;.count&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
        &lt;span class="nf"&gt;.try_into&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
        &lt;span class="nf"&gt;.expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Length of name is too large!"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;calculate_compatibility&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;name1_count&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;i32&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;name2_count&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;i32&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;f32&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;match&lt;/span&gt; &lt;span class="n"&gt;name1_count&lt;/span&gt;&lt;span class="nf"&gt;.cmp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;name2_count&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nn"&gt;Ordering&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;Less&lt;/span&gt; &lt;span class="k"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="n"&gt;name1_count&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nb"&gt;f32&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="n"&gt;name2_count&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nb"&gt;f32&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nb"&gt;f32&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mf"&gt;100.0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nb"&gt;f32&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="nn"&gt;Ordering&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;Greater&lt;/span&gt; &lt;span class="k"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="n"&gt;name2_count&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nb"&gt;f32&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="n"&gt;name1_count&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nb"&gt;f32&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nb"&gt;f32&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mf"&gt;100.0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nb"&gt;f32&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="nn"&gt;Ordering&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;Equal&lt;/span&gt; &lt;span class="k"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="mf"&gt;50.0&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;


&lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="k"&gt;mut&lt;/span&gt; &lt;span class="n"&gt;name1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nn"&gt;String&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="k"&gt;mut&lt;/span&gt; &lt;span class="n"&gt;name2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nn"&gt;String&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

    &lt;span class="nd"&gt;println!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Enter first person name: "&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;name1_count&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;get_input&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="k"&gt;mut&lt;/span&gt; &lt;span class="n"&gt;name1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="nd"&gt;println!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Enter second person name: "&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;name2_count&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;get_input&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="k"&gt;mut&lt;/span&gt; &lt;span class="n"&gt;name2&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;compat_value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;calculate_compatibility&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;name1_count&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;name2_count&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="nf"&gt;.floor&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

    &lt;span class="nd"&gt;println!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Love compatibility between {} and {} is {}%"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;name1&lt;/span&gt;&lt;span class="nf"&gt;.trim&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="n"&gt;name2&lt;/span&gt;&lt;span class="nf"&gt;.trim&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="n"&gt;compat_value&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, let’s move down to explaining each of the concepts used in the code below to get a clearer understanding of how Rust handles certain programming concepts.&lt;/p&gt;

&lt;p&gt;The final code listing looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="k"&gt;use&lt;/span&gt; &lt;span class="nn"&gt;std&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nn"&gt;cmp&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;Ordering&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;use&lt;/span&gt; &lt;span class="nn"&gt;std&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nn"&gt;convert&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nb"&gt;TryInto&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;use&lt;/span&gt; &lt;span class="nn"&gt;std&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;io&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;


&lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;get_input&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="k"&gt;mut&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;i32&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nn"&gt;io&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;stdin&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
        &lt;span class="nf"&gt;.read_line&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="nf"&gt;.expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Failed to read line"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="nf"&gt;.chars&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
        &lt;span class="nf"&gt;.count&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
        &lt;span class="nf"&gt;.try_into&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
        &lt;span class="nf"&gt;.expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Length of name is too large!"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;calculate_compatibility&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;name1_count&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;i32&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;name2_count&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;i32&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;f32&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;match&lt;/span&gt; &lt;span class="n"&gt;name1_count&lt;/span&gt;&lt;span class="nf"&gt;.cmp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;name2_count&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nn"&gt;Ordering&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;Less&lt;/span&gt; &lt;span class="k"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="n"&gt;name1_count&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nb"&gt;f32&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="n"&gt;name2_count&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nb"&gt;f32&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nb"&gt;f32&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mf"&gt;100.0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nb"&gt;f32&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="nn"&gt;Ordering&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;Greater&lt;/span&gt; &lt;span class="k"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="n"&gt;name2_count&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nb"&gt;f32&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="n"&gt;name1_count&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nb"&gt;f32&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nb"&gt;f32&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mf"&gt;100.0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nb"&gt;f32&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="nn"&gt;Ordering&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;Equal&lt;/span&gt; &lt;span class="k"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="mf"&gt;50.0&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;


&lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="k"&gt;mut&lt;/span&gt; &lt;span class="n"&gt;name1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nn"&gt;String&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="k"&gt;mut&lt;/span&gt; &lt;span class="n"&gt;name2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nn"&gt;String&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

    &lt;span class="nd"&gt;println!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Enter first person name: "&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;name1_count&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;get_input&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="k"&gt;mut&lt;/span&gt; &lt;span class="n"&gt;name1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="nd"&gt;println!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Enter second person name: "&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;name2_count&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;get_input&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="k"&gt;mut&lt;/span&gt; &lt;span class="n"&gt;name2&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;compat_value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;calculate_compatibility&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;name1_count&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;name2_count&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="nf"&gt;.floor&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

    &lt;span class="nd"&gt;println!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Love compatibility between {} and {} is {}%"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;name1&lt;/span&gt;&lt;span class="nf"&gt;.trim&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="n"&gt;name2&lt;/span&gt;&lt;span class="nf"&gt;.trim&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="n"&gt;compat_value&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The final code can be gotten here,  &lt;a href="https://www.github.com/Lord-sarcastic/learn-rust/tree/master/love_calculator" rel="noopener noreferrer"&gt;a repo of mine&lt;/a&gt;  dedicated to learning Rust and its paradigms.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;More Resources&lt;/strong&gt;
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.rust-lang.org/learn" rel="noopener noreferrer"&gt;Official Documentation&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://serokell.io/blog/rust-guide" rel="noopener noreferrer"&gt;Introduction to Rust&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.corrosionhour.com/rust-beginners-tips-tricks-guide-2020/" rel="noopener noreferrer"&gt;RUST Beginners Tips &amp;amp; Tricks Guide 2020&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://learning-rust.github.io/" rel="noopener noreferrer"&gt;Learing Rust&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="http://masteringbackend.solomoneseme.com/rust-crash-course" rel="noopener noreferrer"&gt;Ultimate Rust Crash Course&lt;/a&gt; is among the best courses for Rust programming language. The instructor explaining complex terms with ease and aid the understanding of the language.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="http://masteringbackend.solomoneseme.com/rust-fundamental" rel="noopener noreferrer"&gt;Learn Rust by Building Real Applications&lt;/a&gt; takes you to build real-life applications using the Rust programming language. If you’re looking at getting your hands duty with projects, this course is definitely for you.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Conclusion:Rust
&lt;/h2&gt;

&lt;p&gt;Despite its fame as a systems language, we’ve succeeded in using Rust for trivial tasks such as building a Calculator.&lt;/p&gt;

&lt;p&gt;Rust programming language is used in other domains besides love calculators, such as servers, compilers, web application back-end, WASM(web assembly), and anything you’d write with a programming language.&lt;/p&gt;

&lt;p&gt;If you want to dive into Rust programming language, as we didn’t touch many important concepts, you’d want to check out the official  &lt;a href="https://doc.rust-lang.org/1.30.0/book/2018-edition/index.html" rel="noopener noreferrer"&gt;documentation&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Author: Solomon Eseme&lt;/strong&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  Thank you for being a part of the community
&lt;/h3&gt;

&lt;p&gt;Before you go:&lt;/p&gt;

&lt;h4&gt;
  
  
  Whenever you’re ready
&lt;/h4&gt;

&lt;p&gt;There are 4 ways we can help you become a great backend engineer:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://masteringbackend.com/?ref=medium" rel="noopener noreferrer"&gt;&lt;strong&gt;The MB Platform:&lt;/strong&gt;&lt;/a&gt; Join thousands of backend engineers learning backend engineering. Build real-world backend projects, learn from expert-vetted courses and roadmaps, track your learnings and set schedules, and solve backend engineering tasks, exercises, and challenges.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://masteringbackend.com/academy?ref=medium" rel="noopener noreferrer"&gt;&lt;strong&gt;The MB Academy:&lt;/strong&gt;&lt;/a&gt; The “MB Academy” is a 6-month intensive Advanced Backend Engineering BootCamp to produce great backend engineers.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://backendweeky.dev/?ref=medium" rel="noopener noreferrer"&gt;&lt;strong&gt;Join Backend Weekly:&lt;/strong&gt;&lt;/a&gt; If you like posts like this, you will absolutely enjoy our exclusive weekly newsletter, sharing exclusive backend engineering resources to help you become a great Backend Engineer.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://getbackendjobs.com/?ref=medium" rel="noopener noreferrer"&gt;&lt;strong&gt;Get Backend Jobs:&lt;/strong&gt;&lt;/a&gt; Find over 2,000+ Tailored International Remote Backend Jobs or Reach 50,000+ backend engineers on the #1 Backend Engineering Job Board.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>tutorial</category>
      <category>beginners</category>
      <category>backend</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Top 5 Python Backend Projects to Boost Your Skills in 2025</title>
      <dc:creator>Toluwanimi </dc:creator>
      <pubDate>Tue, 05 Aug 2025 11:00:30 +0000</pubDate>
      <link>https://dev.to/masteringbackend/top-5-python-backend-projects-to-boost-your-skills-in-2025-18la</link>
      <guid>https://dev.to/masteringbackend/top-5-python-backend-projects-to-boost-your-skills-in-2025-18la</guid>
      <description>&lt;p&gt;Python is an incredible programming language that is easy to pick up for both beginner and experienced Programmers alike. It boasts of a relatively straightforward syntax, powerful libraries and extensive community support. Unfortunately however, Python when mentioned in today’s developer circles generally has backend developers not&lt;/p&gt;

&lt;p&gt;particularly enthusiastic especially when compared to languages like Go, Rust, or Node.js, due to its &lt;a href="https://analyticsindiamag.com/deep-tech/python-may-not-be-great-for-backend-but-is-still-preferred-for-ml/" rel="noopener noreferrer"&gt;relatively slow performance&lt;/a&gt;  and has been dismissed by some as the “data science language”. This however, overlooks one key truth: Python excels in backend development especially when paired with the right tools. In this article, we’ll explore  &lt;strong&gt;five powerful backend projects&lt;/strong&gt;  you can build using Python to sharpen your skills, improve your portfolio, and learn core backend concepts like asynchronous programming, API design, and job queues.&lt;/p&gt;

&lt;h2&gt;
  
  
  Project 1: Real-Time Chat App with WebSockets
&lt;/h2&gt;

&lt;p&gt;In a world smitten by connection and interaction, a real-time chat app is a wonderful opportunity to showcase backend prowess and innovation as it deals with concepts that are cornerstones of the backend process such as user authentication, message history, real-time data and data manipulation, persistence and websockets handling. This project when done correctly exposes one to healthy bouts of asynchronous programming in live communication which is deeply relevant today. Popular tool choices may be  &lt;a href="https://fastapi.tiangolo.com/" rel="noopener noreferrer"&gt;FastAPI&lt;/a&gt;,  &lt;a href="https://masteringbackend.com/posts/django-tutorial-the-ultimate-guide" rel="noopener noreferrer"&gt;Django&lt;/a&gt;  and  &lt;a href="https://redis.io/docs/latest/" rel="noopener noreferrer"&gt;Redis&lt;/a&gt;  for persistence. You could try&lt;/p&gt;

&lt;p&gt;making your chat app standout with suitable concepts that reflect your&lt;/p&gt;

&lt;p&gt;personality such as a chat app for introverts which is bound to scale since introverts would rather chat than call anyway.&lt;/p&gt;

&lt;h2&gt;
  
  
  Project 2: Machine Learning Serving Backend
&lt;/h2&gt;

&lt;p&gt;It is no secret that Python is a popular choice when it comes to machine learning tasks and projects. Backend infrastructure and development is also important in such projects for actions such as uploading files, logging requests, handling timeouts and&lt;/p&gt;

&lt;p&gt;receiving predictions. This makes the backend useful in introducing machine&lt;/p&gt;

&lt;p&gt;learning inference APIs and for data handling. Good tools that prove invaluable here are  &lt;a href="https://docs.pydantic.dev/latest/" rel="noopener noreferrer"&gt;Pydantic&lt;/a&gt;,  &lt;a href="https://masteringbackend.com/resources/docker/docker-guide" rel="noopener noreferrer"&gt;Docker&lt;/a&gt;  and FastAPI.&lt;/p&gt;

&lt;h2&gt;
  
  
  Project 3: Notification System and Job Queue
&lt;/h2&gt;

&lt;p&gt;Any notification system is an interesting undertaking with Python. Here we are faced with scalable architecture and message-based workflows as well as queued tasks, job workers and retry logic - definitely in the arena of backend development. Python makes&lt;/p&gt;

&lt;p&gt;this a worthwhile venture with tools like  &lt;a href="https://flask.palletsprojects.com/en/stable/" rel="noopener noreferrer"&gt;Flask&lt;/a&gt;  and FastAPI in conjunction with  &lt;a href="https://docs.celeryq.dev/en/stable/" rel="noopener noreferrer"&gt;Celery&lt;/a&gt;, Redis and  &lt;a href="https://www.smtp.com/resources/api-documentation/" rel="noopener noreferrer"&gt;SMTP&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Project 4: Podcast Platform Backend
&lt;/h2&gt;

&lt;p&gt;If you’ve ever been impressed by your favorite podcast platforms so much that you have tried to understand their inner workings from the perspective of the backend, you could accomplish that using Python. This project may be considered a bit complex because it is a capsule of a number of features that include streaming audio, managing media uploads, user subscriptions and comment systems. You’ll also get to explore concepts like  &lt;a href="https://www.moesif.com/blog/technical/api-development/Mastering-API-Rate-Limiting-Strategies-for-Efficient-Management/" rel="noopener noreferrer"&gt;rate limiting&lt;/a&gt;  and  &lt;a href="https://www.lifewire.com/what-is-an-rss-feed-4684568" rel="noopener noreferrer"&gt;RSS feed&lt;/a&gt;  generation. If you want to show off your file handling and scalable API skills it is a great project to build. Tools that may come in handy here are FastAPI, PostgreSQL,  &lt;a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/GetStartedWithS3.html" rel="noopener noreferrer"&gt;AWS S3&lt;/a&gt; and  &lt;a href="https://dev.to/leapcell/mastering-jwt-json-web-tokens-a-deep-dive-3o36"&gt;Json Web Tokens (JWT)&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Project 5: Blogging Platform
&lt;/h2&gt;

&lt;p&gt;This blogging platform project constitutes a platform with very real world scenarios and consequences. Features could include authentication and authorization, admin roles, image upload, markdown support, multiple user handling and more. It is a safe haven of backend development made possible by Python tools such as Django and  &lt;a href="https://www.postgresql.org/docs/" rel="noopener noreferrer"&gt;PostgreSQL&lt;/a&gt;. The good thing about this is that backend complexity grows with scale. You could add  &lt;a href="https://masteringbackend.com/hubs/system-design/what-is-caching" rel="noopener noreferrer"&gt;caching&lt;/a&gt;, tag filtering and permissions. It is favored by backend developers for personal projects because it is flexible enough to allow varying complexities for any skill level.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;These five projects represent just a small glimpse of what you can build with Python on the backend. While there’s no absolute ranking of the “top” backend projects, each one featured here was selected because it challenges you to apply real-world backend development concepts, such as asynchronous communication, API design, job queues, and authentication. What makes a project truly valuable isn’t popularity, it’s how much it aligns with your learning goals and career path.&lt;/p&gt;

&lt;p&gt;So if you're building your portfolio, preparing for job interviews, or just curious about backend architecture, keep experimenting. Python’s flexibility and powerful ecosystem make it one of the best languages to explore and master backend development.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Ready to go further?&lt;/strong&gt;  Explore more Python backend project ideas, contribute to open-source, or scale these five to production level.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Author: Amanda Adoyi&lt;/strong&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  Thank you for being a part of the community
&lt;/h3&gt;

&lt;p&gt;Before you go:&lt;/p&gt;

&lt;h4&gt;
  
  
  Whenever you’re ready
&lt;/h4&gt;

&lt;p&gt;There are 4 ways we can help you become a great backend engineer:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://masteringbackend.com/?ref=medium" rel="noopener noreferrer"&gt;&lt;strong&gt;The MB Platform:&lt;/strong&gt;&lt;/a&gt; Join thousands of backend engineers learning backend engineering. Build real-world backend projects, learn from expert-vetted courses and roadmaps, track your learnings and set schedules, and solve backend engineering tasks, exercises, and challenges.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://masteringbackend.com/academy?ref=medium" rel="noopener noreferrer"&gt;&lt;strong&gt;The MB Academy:&lt;/strong&gt;&lt;/a&gt; The “MB Academy” is a 6-month intensive Advanced Backend Engineering BootCamp to produce great backend engineers.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://backendweeky.dev/?ref=medium" rel="noopener noreferrer"&gt;&lt;strong&gt;Join Backend Weekly:&lt;/strong&gt;&lt;/a&gt; If you like posts like this, you will absolutely enjoy our exclusive weekly newsletter, sharing exclusive backend engineering resources to help you become a great Backend Engineer.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://getbackendjobs.com/?ref=medium" rel="noopener noreferrer"&gt;&lt;strong&gt;Get Backend Jobs:&lt;/strong&gt;&lt;/a&gt; Find over 2,000+ Tailored International Remote Backend Jobs or Reach 50,000+ backend engineers on the #1 Backend Engineering Job Board.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>tutorial</category>
      <category>beginners</category>
      <category>backend</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Laravel Tutorial:The Ultimate Guide (2023)</title>
      <dc:creator>Toluwanimi </dc:creator>
      <pubDate>Mon, 04 Aug 2025 11:00:30 +0000</pubDate>
      <link>https://dev.to/masteringbackend/laravel-tutorialthe-ultimate-guide-2023-1hn5</link>
      <guid>https://dev.to/masteringbackend/laravel-tutorialthe-ultimate-guide-2023-1hn5</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;In this laravel tutorial, you will learn how to use the most popular PHP framework Laravel.&lt;/p&gt;

&lt;p&gt;This tutorial will teach you Laravel from scratch to an advanced level, you will learn how to install Laravel, how to set up database connectivity, how to create a full-blown application, and deploy it to HEROKU.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffaczpbvmxqg7ha4cu0xq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffaczpbvmxqg7ha4cu0xq.png" alt=" laravel tutorial" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Before we delve in, if you’re a backend developer or looking at delving into this career path, join other developers to receive daily articles on backend development that will boost your productivity.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Start Learning Backend Dev. Now
&lt;/h3&gt;

&lt;p&gt;Stop waiting and start learning! Get my 10 tips on teaching yourself backend development.&lt;/p&gt;

&lt;p&gt;Get the tips!&lt;/p&gt;

&lt;p&gt;Don't worry. I'll never, ever spam you!&lt;/p&gt;

&lt;h3&gt;
  
  
  What is Laravel?
&lt;/h3&gt;

&lt;p&gt;Laravel Framework is an open-source PHP MVC framework for building simple to complex web applications. Laravel strictly follows the MVC (Model-View-Controller) architectural pattern. it is known for its beautiful and elegant syntax as a web framework.&lt;/p&gt;

&lt;h3&gt;
  
  
  Features of Laravel
&lt;/h3&gt;

&lt;p&gt;Laravel has many great features of web development built in such as:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; One of the best routing system in PHP.&lt;/li&gt;
&lt;li&gt; It has the Service Container for easy dependency Injection.&lt;/li&gt;
&lt;li&gt; Built-in authentication mechanism with Logic, Registration, etc processes built-in.&lt;/li&gt;
&lt;li&gt; One of the best ORM called Eloquent for handling database connection, migration, and queries easily.&lt;/li&gt;
&lt;li&gt; Easy to use a templating engine called Blade and also integrations with popular Frontend frameworks like Vue, React out of the box.&lt;/li&gt;
&lt;li&gt; Building real-time applications with Laravel is made very easy with real-time event broadcasting.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Why you should learn Laravel?
&lt;/h3&gt;

&lt;p&gt;There are many reasons why you should learn the Laravel framework, in this tutorial, we will just only point out a few:&lt;/p&gt;

&lt;p&gt;Laravel follows strictly web/software development best practices and industry standards forcing you to master them while you work with the framework.&lt;/p&gt;

&lt;p&gt;As mentioned above, PHP is used in up to  &lt;strong&gt;79.1%&lt;/strong&gt;  across the internet making Laravel a top choice for developers.&lt;/p&gt;

&lt;p&gt;With Laravel, you can build simple to complex projects faster using the Rapid Application Development practices and approach.&lt;/p&gt;

&lt;p&gt;Laravel has one of the most beautiful and elegant syntax making the codebase easy to understand.&lt;/p&gt;

&lt;p&gt;It also very easy to spin a microservice with Laravel API and maybe Vue ad the frontend framework.&lt;/p&gt;

&lt;p&gt;Vuejs and Laravel are well integrated together making them a perfect couple for faster or rapid application development.&lt;/p&gt;

&lt;p&gt;That’s obviously enough reason why you should learn Laravel, let’s try to compare Laravel with other PHP frameworks. You know you’re not making a mistake choosing to learn Laravel.&lt;/p&gt;

&lt;h3&gt;
  
  
  Laravel Framework vs Other Framework
&lt;/h3&gt;

&lt;p&gt;Comparing Laravel with other PHP frameworks shows that Laravel is one of the top PHP frameworks with a total of 52.8% priority, Phalcon 16.7%, Symfony has 10.6%, etc. You can read more  &lt;a href="https://www.tutorialandexample.com/laravel-vs-other-frameworks/" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;What makes Laravel to have these high priorities, well, Laravel supports the following out of the box.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Advanced Authentication and Authorisation techniques&lt;/li&gt;
&lt;li&gt; The Artisan CLI of Laravel is one of the magic and a great tool of the framework.&lt;/li&gt;
&lt;li&gt; Advanced and strictly support the MVC architectural pattern.&lt;/li&gt;
&lt;li&gt; The complexity of Database migration and management is made very simple with Eloquent ORM&lt;/li&gt;
&lt;li&gt; Following the OWASP security model out of the box.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now you have a complete overview of Laravel Framework, Let’s dive right into the framework itself.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;When it comes to learning Laravel, I will personally and highly recommend  _these 3 courses&lt;/em&gt;. With it, I was able to learn and start building projects within a week._&lt;/p&gt;

&lt;p&gt;&lt;a href="http://masteringbackend.solomoneseme.com/laravel8advanced" rel="noopener noreferrer"&gt;Laravel 8 Beginner to Advance with Complete News Portal&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="http://masteringbackend.solomoneseme.com/laravelmaster" rel="noopener noreferrer"&gt;PHP with Laravel for beginners – Become a Master in Laravel&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="http://masteringbackend.solomoneseme.com/laravel2019" rel="noopener noreferrer"&gt;Laravel 2019, the complete guide with real world projects&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Chapter 2:Laravel The Framework
&lt;/h2&gt;

&lt;p&gt;In this chapter, the tutorial will explore a little about the Laravel framework.&lt;/p&gt;

&lt;p&gt;We will discuss the structure of the framework and how the MVC pattern is used to structure the Laravel framework in this tutorial.&lt;/p&gt;

&lt;p&gt;This tutorial will discuss the 3 important elements/components of MVC and how Laravel utilizes them.&lt;/p&gt;

&lt;p&gt;Finally, we will discuss the Models, Views, and Controllers.&lt;/p&gt;

&lt;p&gt;If you’re excited as I am, let’s dive right in.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftxghv5su2rdnjlka91ss.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftxghv5su2rdnjlka91ss.png" alt=" laravel tutorial" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This tutorial will discuss the 3 important elements/components of MVC and how Laravel utilizes them.&lt;/p&gt;

&lt;p&gt;Finally, we will discuss the Models, Views, and Controllers.&lt;/p&gt;

&lt;p&gt;If you’re excited as I am, let’s dive right in.&lt;/p&gt;

&lt;p&gt;As you may have noticed already, Laravel strongly follows the MVC architectural pattern.&lt;/p&gt;
&lt;h3&gt;
  
  
  What is MVC?
&lt;/h3&gt;

&lt;p&gt;MVC (Model-Views-Controller) is a design pattern in software development that divides the logic of the program into 3 interconnected elements.&lt;/p&gt;

&lt;p&gt;These 3 elements are called, you guess Model, Views, Controllers&lt;/p&gt;

&lt;p&gt;The internal structuring of Laravel follows this design pattern.  &lt;/p&gt;

&lt;p&gt;Let’s explore how?&lt;/p&gt;
&lt;h4&gt;
  
  
  &lt;strong&gt;Model&lt;/strong&gt;s:
&lt;/h4&gt;

&lt;p&gt;This is the central component of the pattern, or in Laravel, the model class contains all the methods and attributes needed to interact with the database schema specified for it.&lt;/p&gt;

&lt;p&gt;For example, assuming we have a User table in our database, in Laravel, the corresponding Model will be called  &lt;code&gt;User&lt;/code&gt;  where you will be able to operate on the database table (users) as if the schema is just a plain PHP object.&lt;/p&gt;
&lt;h4&gt;
  
  
  &lt;strong&gt;Views&lt;/strong&gt;:
&lt;/h4&gt;

&lt;p&gt;Views represent how the Information is displayed, it is used for all the UI logic of the software. You are right if you say that the View represents the Frontend of your web page.&lt;/p&gt;

&lt;p&gt;This is how users interact with your application, sends inputs to the Model, and receive output from the Model too.&lt;/p&gt;

&lt;p&gt;In Laravel, the View part is very customizable and lots of the job has been done out of the box to give you a good look and feel when working with Laravel.&lt;/p&gt;

&lt;p&gt;Laravel uses the Blade template to present the View of your application and you can easily customize Laravel to work with other Frontend libraries like Vue, React, and even Angular.&lt;/p&gt;
&lt;h4&gt;
  
  
  &lt;strong&gt;Controllers&lt;/strong&gt;:
&lt;/h4&gt;

&lt;p&gt;Controllers act as a middleman between Models and Views, it processes all the inputs sent by the user from the View.&lt;br&gt;&lt;br&gt;
It processes all the business logic and incoming requests, manipulates data using the Model component, and interacts with the Views to render the final output.&lt;/p&gt;

&lt;p&gt;In Laravel, Controllers are like the chief executors because everything you do revolves around them, from handling incoming requests, handling validating to manipulating data in the database using the Model component to sending the output to the Views component to render the final output.&lt;/p&gt;

&lt;p&gt;Now that we have a clear understanding of the structure of Laravel, I will add that every other thing you might notice in Laravel like Request, Response, Queues, Cache, etc revolves around these three components.&lt;/p&gt;

&lt;p&gt;Let’s take a look at this diagram for a clearer picture:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F90e74y5qajvb6425o381.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F90e74y5qajvb6425o381.png" alt="mvc-diagram.png" width="718" height="430"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;From the diagram above, you can spot that the controller does all the job and calls out to the individual components (Model) needed to achieve a particular task before sending the output to the View.&lt;/p&gt;

&lt;p&gt;Read more on  &lt;a href="https://blog.pusher.com/laravel-mvc-use/" rel="noopener noreferrer"&gt;how Laravel implements MVC effectively&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Now that we understand the inner workings of the Laravel Framework, let’s start building our first project following the structure from this tutorial:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;When it comes to learning Laravel with courses, I will personally and highly recommend these 3 courses. With it, I was able to learn and start building projects within a week.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://masteringbackend.solomoneseme.com/laravel8advanced" rel="noopener noreferrer"&gt;Laravel 8 Beginner to Advance with Complete News Portal&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="http://masteringbackend.solomoneseme.com/laravelmaster" rel="noopener noreferrer"&gt;PHP with Laravel for beginners – Become a Master in Laravel&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="http://masteringbackend.solomoneseme.com/laravel2019" rel="noopener noreferrer"&gt;Laravel 2019, the complete guide with real world projects&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Take a break and subscribe to get access to our free Laravel tips that will improve your productivity.&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Chapter 3:Building an App with Laravel
&lt;/h2&gt;

&lt;p&gt;Now that we understand the nitty-gritty of Laravel theoretically, let’s dive into the practicals by creating a real project.&lt;/p&gt;

&lt;p&gt;If you’re just starting out creating applications with your computer, you need to install any of these packages and set them up properly (Wamp, Lamp, Mamp).&lt;/p&gt;

&lt;p&gt;You can read through how to install and set them up properly  &lt;a href="http://ampps.com/lamp" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;In this tutorial, we are going to demonstrate how to use Laravel to create a simple Todo application, with this we are going to explore how to set up Laravel, we will explore Laravel Requests and Responses, we will discuss the Controller component and how it interacts with Models and Views.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7t9n1as4wkt6kp460710.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7t9n1as4wkt6kp460710.png" alt=" laravel tutorial" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Setting up Laravel
&lt;/h3&gt;

&lt;p&gt;A lot has changed in setting up Laravel since the release of the  &lt;a href="https://masteringbackend.solomoneseme.com/posts/laravel-8-new-features/" rel="noopener noreferrer"&gt;current version 8&lt;/a&gt;, you can get full details on how to install and set up Laravel  &lt;a href="https://laravel.com/docs/8.x#your-first-laravel-project" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;We are going to use the conventional way assuming you have  &lt;a href="https://getcomposer.org/" rel="noopener noreferrer"&gt;composer&lt;/a&gt;  installed already. We will create a todo-app with our Laravel installation, just run the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;composer create-project laravel/laravel todo-app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, change your directory to the current created directory:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight stata"&gt;&lt;code&gt;&lt;span class="k"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;todo&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;app&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Open your project with any code editor of your choice, I will be using  &lt;a href="https://code.visualstudio.com/" rel="noopener noreferrer"&gt;Visual Studio Code&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Lastly, run the following command to serve your webpage.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;php artisan serve
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Visit  &lt;code&gt;http://127.0.0.1:8000&lt;/code&gt;  in your browser to test your newly created Laravel project.&lt;/p&gt;

&lt;p&gt;Cheers 🙂&lt;/p&gt;

&lt;h3&gt;
  
  
  Setting up Database
&lt;/h3&gt;

&lt;p&gt;After installing Laravel, you almost do not need any additional set up except if you want to change timezones or other specific configurations, then you can review the  &lt;code&gt;config/app&lt;/code&gt;  file to see the different configurations available.&lt;/p&gt;

&lt;p&gt;But if you’re good with the defaults, let’s look at how to configure our database:&lt;/p&gt;

&lt;p&gt;First, create a new database using any  &lt;a href="https://masteringbackend.com/posts/top-10-database-clients-for-developers" rel="noopener noreferrer"&gt;Database Client&lt;/a&gt; of your choice and note the login credentials.&lt;/p&gt;

&lt;p&gt;Next, open the  &lt;code&gt;.env&lt;/code&gt;  file (or create a new one if not exists), update the following information.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ini"&gt;&lt;code&gt;&lt;span class="py"&gt;DB_CONNECTION&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;mysql&lt;/span&gt;
&lt;span class="py"&gt;DB_HOST&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;127.0.0.1&lt;/span&gt;
&lt;span class="py"&gt;DB_PORT&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;3306&lt;/span&gt;
&lt;span class="py"&gt;DB_DATABASE&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;DB NAME HERE&lt;/span&gt;
&lt;span class="py"&gt;DB_USERNAME&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;DB USERNAME HERE&lt;/span&gt;
&lt;span class="py"&gt;DB_PASSWORD&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;DB PASSWORD HERE&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In our case, we will stick with  &lt;code&gt;mysql&lt;/code&gt;  database.&lt;/p&gt;

&lt;h3&gt;
  
  
  Setting up the Schema
&lt;/h3&gt;

&lt;p&gt;The next step is to set up your database migrations and configure your database Eloquent Relationships.&lt;/p&gt;

&lt;p&gt;Run the following command in the same terminal, to create a database schema file for our Todo table.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;php artisan make:migration create_todos_table --create=todos
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That command will create a new migration file inside  &lt;code&gt;database/migrations/xxx_create_todos_table.php&lt;/code&gt;, open it and paste in the following codes.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;
&lt;span class="cp"&gt;&amp;lt;?php&lt;/span&gt;
&lt;span class="kn"&gt;use&lt;/span&gt; &lt;span class="nc"&gt;Illuminate\Support\Facades\Schema&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kn"&gt;use&lt;/span&gt; &lt;span class="nc"&gt;Illuminate\Database\Schema\Blueprint&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kn"&gt;use&lt;/span&gt; &lt;span class="nc"&gt;Illuminate\Database\Migrations\Migration&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;CreateTodosTable&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="nc"&gt;Migration&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="cd"&gt;/**
     * Run the migrations.
     *
     * @return void
     */&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;up&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nc"&gt;Schema&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'todos'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;Blueprint&lt;/span&gt; &lt;span class="nv"&gt;$table&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nv"&gt;$table&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;id&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
            &lt;span class="nv"&gt;$table&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'title'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
            &lt;span class="nv"&gt;$table&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'desc'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;nullable&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
            &lt;span class="nv"&gt;$table&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;integer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'status'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="k"&gt;default&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
            &lt;span class="nv"&gt;$table&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;integer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'user_id'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
            &lt;span class="nv"&gt;$table&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;timestamps&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
        &lt;span class="p"&gt;});&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="cd"&gt;/**
     * Reverse the migrations.
     *
     * @return void
     */&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;down&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nc"&gt;Schema&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;dropIfExists&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'todos'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Lastly, before you migrate the database, note that you can set up  &lt;a href="https://laravel.com/docs/8.x/seeding" rel="noopener noreferrer"&gt;Database Seeders&lt;/a&gt;  to generate fake data for your database, or  &lt;a href="https://github.com/Kaperskyguru/laravel-todo-app" rel="noopener noreferrer"&gt;clone my  &lt;strong&gt;repository&lt;/strong&gt;&lt;/a&gt;  since I have configured database seeders already.&lt;/p&gt;

&lt;p&gt;Now, run the migration:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;php artisan migrate
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Set up User Authentication with Laravel Breeze
&lt;/h3&gt;

&lt;p&gt;Initially, setting up authentication without the use of packages can be tedious because you will have to code everything from Registration, Login to Forgot Password logic.&lt;/p&gt;

&lt;p&gt;But with the use of Laravel Breeze, the authentication process is made very easy and less time-consuming.&lt;/p&gt;

&lt;p&gt;Let’s install and set up our authentication process with minutes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight coffeescript"&gt;&lt;code&gt;&lt;span class="nx"&gt;composer&lt;/span&gt; &lt;span class="nx"&gt;require&lt;/span&gt; &lt;span class="nx"&gt;laravel&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;breeze&lt;/span&gt; &lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="nx"&gt;dev&lt;/span&gt;

&lt;span class="nx"&gt;php&lt;/span&gt; &lt;span class="nx"&gt;artisan&lt;/span&gt; &lt;span class="na"&gt;breeze&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="nx"&gt;install&lt;/span&gt;

&lt;span class="nx"&gt;npm&lt;/span&gt; &lt;span class="nx"&gt;install&lt;/span&gt;

&lt;span class="nx"&gt;npm&lt;/span&gt; &lt;span class="nx"&gt;run&lt;/span&gt; &lt;span class="nx"&gt;dev&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With these few commands, your authentication process is set, navigate to  &lt;code&gt;http://127.0.0.1:8000/register&lt;/code&gt;  or  &lt;code&gt;http://127.0.0.1:8000/login&lt;/code&gt;, if you see the following screenshots then everything is properly set up.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhrmbsoxvu7clem1vzgno.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhrmbsoxvu7clem1vzgno.png" alt="lar.png" width="800" height="640"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;All Laravel Breeze configuration can be found at  &lt;code&gt;config/auth.php&lt;/code&gt;, then all the Authentication logic is found in  &lt;code&gt;app/Http/Controllers/Auth&lt;/code&gt;, and all the UI interface files can be found at  &lt;code&gt;resources/views/auth&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;You can start studying the authentication process from there.&lt;/p&gt;

&lt;h3&gt;
  
  
  Creating Models
&lt;/h3&gt;

&lt;p&gt;If you look at the App folder, you might see a Models folder if  &lt;a href="https://masteringbackend.solomoneseme.com/posts/laravel-8-new-features/" rel="noopener noreferrer"&gt;Laravel 8&lt;/a&gt;  and a  &lt;code&gt;User.php&lt;/code&gt;  file inside it or you might see  &lt;code&gt;User.php&lt;/code&gt;  file inside the  &lt;code&gt;App&lt;/code&gt;  folder.&lt;/p&gt;

&lt;p&gt;That is exactly what a Model is:&lt;/p&gt;

&lt;p&gt;Just a file that contains methods and properties to interact with our Database Schema, inside the  &lt;code&gt;User.php&lt;/code&gt;, you will notice that it extends (inherit) the Model parent class that is where all the methods and properties to interact with our Database Schema is coming from.&lt;/p&gt;

&lt;p&gt;We can use the pre-defined User model to retrieve or create a new user in our application by providing the data needed in the User schema at  &lt;code&gt;database/migrations/xxxx_create_users_xxxx.php&lt;/code&gt;  file.&lt;/p&gt;

&lt;p&gt;Let’s take a look:&lt;/p&gt;

&lt;p&gt;To retrieve all the users in our database, we will simply do:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="nv"&gt;$users&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;User&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;all&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="k"&gt;foreach&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$users&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nv"&gt;$user&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
  &lt;span class="k"&gt;echo&lt;/span&gt; &lt;span class="nv"&gt;$user&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To retrieve a particular user based on ID:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="nv"&gt;$user&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;User&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;find&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// ID of 1&lt;/span&gt;

&lt;span class="k"&gt;echo&lt;/span&gt; &lt;span class="nv"&gt;$user&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Create a new User (No need for SQL insert statement)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$user = new User;
$user-&amp;gt;name = "Solomon Eseme";
$user-&amp;gt;email = "test@example.com";
$user-&amp;gt;password = "strongpassword";
$user-&amp;gt;save();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;By calling the  &lt;code&gt;save()&lt;/code&gt;  method of the model instance, Laravel will either create a new User or update the existing User.&lt;/p&gt;

&lt;p&gt;To delete a User from your Database, simply run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight livescript"&gt;&lt;code&gt;&lt;span class="nv"&gt;$deletedUser&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;User&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="na"&gt;find&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="kd"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="k"&gt;delete&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Deleting a User is simply done by calling the  &lt;code&gt;delete&lt;/code&gt;  method of the Model.&lt;/p&gt;

&lt;p&gt;To retrieve Users with certain conditions, you can user the where method the Laravel Models&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="nv"&gt;$users&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;User&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;where&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'email'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'!='&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;''&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="k"&gt;foreach&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$users&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nv"&gt;$user&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
  &lt;span class="k"&gt;echo&lt;/span&gt; &lt;span class="nv"&gt;$user&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Again, that will retrieve all the users that have email addresses added.&lt;/p&gt;

&lt;p&gt;Now that we have a glimpse of what Laravel Models are, let’s create our own Todo Model to interact with the Todo schema we create above.&lt;/p&gt;

&lt;p&gt;Open your project terminal and run the following command.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;php artisan make:model Todo
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The command will generate a new Todo Model inside  &lt;code&gt;app&lt;/code&gt;  folder or  &lt;code&gt;app/Models&lt;/code&gt;  folder (&lt;a href="https://masteringbackend.solomoneseme.com/posts/laravel-8-new-features/" rel="noopener noreferrer"&gt;Laravel 8&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;Open the file and go through it to see if the content is familiar from the User’s model we explored earlier.&lt;/p&gt;

&lt;p&gt;You don’t need to do anything, for now, let’s move on to creating controllers.&lt;/p&gt;

&lt;h3&gt;
  
  
  Creating Controllers
&lt;/h3&gt;

&lt;p&gt;Again, controllers are like the middleman between requests (views) and models.&lt;/p&gt;

&lt;p&gt;When a user sends a request to your backend either by clicking a button or submitting a form, the request passes through the routes to the controller and the controller calls out to your model to serve the request and returns a response back to the user (View).&lt;/p&gt;

&lt;p&gt;With this flow in mind, let’s create our first controller to handle any request for the Todos:&lt;/p&gt;

&lt;p&gt;Run the following command in your project terminal to create a new controller.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;php artisan make:controller TodosController
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;There are naming conventions in the official documentation, but any name will do.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The command above will create a controller file inside  &lt;code&gt;app/Https/Controllers&lt;/code&gt;, open the  &lt;code&gt;TodosController&lt;/code&gt;  file and look at the generated content.&lt;/p&gt;

&lt;h4&gt;
  
  
  CRUD Controller
&lt;/h4&gt;

&lt;p&gt;Next, we are going to create a CRUD operation to interact with our Model and serve the users of our application (Views).&lt;/p&gt;

&lt;p&gt;Add the following codes to the newly created controller:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;?php&lt;/span&gt;
&lt;span class="kn"&gt;namespace&lt;/span&gt; &lt;span class="nn"&gt;App\Http\Controllers&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kn"&gt;use&lt;/span&gt; &lt;span class="nc"&gt;Illuminate\Http\Request&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;TodosController&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="nc"&gt;Controller&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;//&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;index&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;Request&lt;/span&gt; &lt;span class="nv"&gt;$request&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="c1"&gt;# code...&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;show&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;Request&lt;/span&gt; &lt;span class="nv"&gt;$request&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="c1"&gt;# code...&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;edit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;Request&lt;/span&gt; &lt;span class="nv"&gt;$request&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="c1"&gt;# code...&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;update&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;Request&lt;/span&gt; &lt;span class="nv"&gt;$request&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="c1"&gt;# code...&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;Request&lt;/span&gt; &lt;span class="nv"&gt;$request&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="c1"&gt;# code...&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;store&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;Request&lt;/span&gt; &lt;span class="nv"&gt;$request&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="c1"&gt;# code...&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;delete&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;Request&lt;/span&gt; &lt;span class="nv"&gt;$request&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="c1"&gt;# code...&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is just a skeleton of how the controller will look like. Now, let’s fill in the content of each method.&lt;/p&gt;

&lt;p&gt;A complete code for our controller will look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;?php&lt;/span&gt;

&lt;span class="kn"&gt;namespace&lt;/span&gt; &lt;span class="nn"&gt;App\Http\Controllers&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kn"&gt;use&lt;/span&gt; &lt;span class="nc"&gt;App\Models\Todo&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kn"&gt;use&lt;/span&gt; &lt;span class="nc"&gt;Illuminate\Http\Request&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kn"&gt;use&lt;/span&gt; &lt;span class="nc"&gt;App\Http\Controllers\Controller&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kn"&gt;use&lt;/span&gt; &lt;span class="nc"&gt;Illuminate\Support\Facades\Auth&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;TodosController&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="nc"&gt;Controller&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;//&lt;/span&gt;

    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;index&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;Request&lt;/span&gt; &lt;span class="nv"&gt;$request&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="c1"&gt;# code...&lt;/span&gt;

        &lt;span class="nv"&gt;$todos&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Todo&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;all&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;view&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'dashboard'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;with&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="s1"&gt;'todos'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nv"&gt;$todos&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;byUserId&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;Request&lt;/span&gt; &lt;span class="nv"&gt;$request&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="c1"&gt;# code...&lt;/span&gt;

        &lt;span class="nv"&gt;$todos&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Todo&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;where&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'user_id'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;Auth&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;user&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;view&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'dashboard'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;with&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="s1"&gt;'todos'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nv"&gt;$todos&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;show&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;Request&lt;/span&gt; &lt;span class="nv"&gt;$request&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="c1"&gt;# code...&lt;/span&gt;
        &lt;span class="nv"&gt;$todo&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Todo&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;find&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$id&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;view&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'show'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;with&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="s1"&gt;'todo'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nv"&gt;$todo&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;edit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;Request&lt;/span&gt; &lt;span class="nv"&gt;$request&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="c1"&gt;# code...&lt;/span&gt;
        &lt;span class="nv"&gt;$todo&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Todo&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;find&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$id&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;view&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'edit'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'todo'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nv"&gt;$todo&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;update&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;Request&lt;/span&gt; &lt;span class="nv"&gt;$request&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="c1"&gt;# Validations before updating&lt;/span&gt;
        &lt;span class="nv"&gt;$todo&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Todo&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;where&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'user_id'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;Auth&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;user&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;where&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'id'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;first&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$todo&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nv"&gt;$todo&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;title&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;$request&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;title&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="nv"&gt;$todo&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;desc&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;$request&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;desc&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="nv"&gt;$todo&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;status&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;$request&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;status&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s1"&gt;'on'&lt;/span&gt; &lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$todo&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;save&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;view&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'show'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'todo'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nv"&gt;$todo&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// 422&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;

        &lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// 401&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;Request&lt;/span&gt; &lt;span class="nv"&gt;$request&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="c1"&gt;# code...&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;view&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'add'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;store&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;Request&lt;/span&gt; &lt;span class="nv"&gt;$request&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="c1"&gt;# Validations before updating&lt;/span&gt;
        &lt;span class="nv"&gt;$todo&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Todo&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nv"&gt;$todo&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;title&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;$request&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;title&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nv"&gt;$todo&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;desc&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;$request&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;desc&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nv"&gt;$todo&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;user_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Auth&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;user&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$todo&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;save&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;view&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'show'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'todo'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nv"&gt;$todo&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;

        &lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// 422&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;delete&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;Request&lt;/span&gt; &lt;span class="nv"&gt;$request&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="c1"&gt;# code...&lt;/span&gt;
        &lt;span class="nv"&gt;$todo&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Todo&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;where&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'user_id'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;Auth&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;user&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;where&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'id'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;first&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$todo&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nv"&gt;$todo&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nb"&gt;delete&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;view&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'index'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// 404&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As this is a beginner’s guide, there are lots we did not bother checking, like validations, clean code, errors, and others.&lt;/p&gt;

&lt;p&gt;From the code above, you can see how we interact with our Todo model and serve the User’s request by calling the  &lt;code&gt;view&lt;/code&gt;  method and passing on the HTML page we want the user to see.&lt;/p&gt;

&lt;p&gt;For example, if a user clicks on our edit button, the request is sent to the  &lt;code&gt;edit&lt;/code&gt;  method of the  &lt;code&gt;TodosController&lt;/code&gt;, then, the controller will find the particular Todo by ID (using the Todo model methods) and return back an Edit Form (HTML) filled with that particular Todo data to the user.&lt;/p&gt;

&lt;p&gt;The  &lt;code&gt;Request&lt;/code&gt;  object contains lots of Information about the current request the user is sending to our application but for now, we only used it to retrieve the data we need to create or update our Todo model.&lt;/p&gt;

&lt;p&gt;To learn more about Requests, check  &lt;a href="https://laravel.com/docs/8.x/requests" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Creating Routes
&lt;/h3&gt;

&lt;p&gt;Next, we are going to look at creating routes that map user’s requests to individual methods in any controller based on the user’s request.&lt;/p&gt;

&lt;p&gt;When a user clicks on a button or submits a form, how does Laravel know which method to call or which controller to send the request to?&lt;/p&gt;

&lt;p&gt;Well, everything is defined and mapped using a  &lt;a href="https://laravel.com/docs/8.x/routing" rel="noopener noreferrer"&gt;Routing System&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Laravel has an elegant routing system build in already:&lt;/p&gt;

&lt;p&gt;Now, open the  &lt;code&gt;web.php&lt;/code&gt;  file inside the  &lt;code&gt;routes&lt;/code&gt;  folder and add the following codes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight livescript"&gt;&lt;code&gt;&lt;span class="nc"&gt;Route&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="na"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'/login'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nv"&gt;view&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'welcome'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="nc"&gt;Route&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="na"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'/todos/mine'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nc"&gt;TodosController&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;'byUserId'&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;&lt;span class="kd"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nv"&gt;middleware&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="s"&gt;'auth'&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;&lt;span class="kd"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nv"&gt;name&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'mine'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nc"&gt;Route&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="na"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'/todos/{id}/edit'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nc"&gt;TodosController&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;'edit'&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;&lt;span class="kd"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nv"&gt;middleware&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="s"&gt;'auth'&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;&lt;span class="kd"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nv"&gt;name&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'edit-form'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nc"&gt;Route&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="na"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'/todos/create'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nc"&gt;TodosController&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;'create'&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;&lt;span class="kd"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nv"&gt;middleware&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="s"&gt;'auth'&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;&lt;span class="kd"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nv"&gt;name&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'create-form'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nc"&gt;Route&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="na"&gt;post&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'/todos/{id}/update'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nc"&gt;TodosController&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;'update'&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;&lt;span class="kd"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nv"&gt;middleware&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="s"&gt;'auth'&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;&lt;span class="kd"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nv"&gt;name&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'update'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nc"&gt;Route&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="na"&gt;post&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'/todos/add'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nc"&gt;TodosController&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;'store'&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;&lt;span class="kd"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nv"&gt;middleware&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="s"&gt;'auth'&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;&lt;span class="kd"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nv"&gt;name&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'add'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nc"&gt;Route&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="na"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'/todos/{id}'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nc"&gt;TodosController&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;'show'&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;&lt;span class="kd"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nv"&gt;middleware&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="s"&gt;'auth'&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;&lt;span class="kd"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nv"&gt;name&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'show'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nc"&gt;Route&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="na"&gt;delete&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'/todos/:id'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nc"&gt;TodosController&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;'delete'&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;&lt;span class="kd"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nv"&gt;middleware&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="s"&gt;'auth'&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;&lt;span class="kd"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nv"&gt;name&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'delete'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nc"&gt;Route&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="na"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'/dashboard'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nc"&gt;TodosController&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;'index'&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;&lt;span class="kd"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nv"&gt;middleware&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="s"&gt;'auth'&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;&lt;span class="kd"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nv"&gt;name&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'dashboard'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="k"&gt;require&lt;/span&gt; &lt;span class="nv"&gt;__DIR__&lt;/span&gt; &lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="s"&gt;'/auth.php'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can see that each method in our  &lt;code&gt;TodosController&lt;/code&gt;  is mapped onto a specific URL (route) in the webpage.&lt;/p&gt;

&lt;p&gt;You can get more information about  &lt;a href="https://laravel.com/docs/8.x/routing" rel="noopener noreferrer"&gt;Laravel Routing System&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Creating Views
&lt;/h3&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Dashboard view&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;The Dashboard view is the dashboard when a user successfully registers and login, it will present a list of all the Todos in our application and can also be sorted by individual todos.&lt;/p&gt;

&lt;p&gt;Create a new blade file inside  &lt;code&gt;resources/views/dashboard.blade.php&lt;/code&gt;  and paste in the following codes.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight handlebars"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;x-app-layout&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;x-slot&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"header"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;h2&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"font-semibold text-xl text-gray-800 leading-tight"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="k"&gt;{{&lt;/span&gt; &lt;span class="nv"&gt;__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'Dashboard'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;}}&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/h2&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/x-slot&amp;gt;&lt;/span&gt;

    &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"py-12"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"max-w-7xl mx-auto sm:px-6 lg:px-8"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"bg-white overflow-hidden shadow-sm sm:rounded-lg"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"p-6 bg-white border-b border-gray-200"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
                    &lt;span class="nt"&gt;&amp;lt;x-button-link&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="k"&gt;{{&lt;/span&gt; &lt;span class="nv"&gt;route&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'create-form'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;}}&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Add new todo&lt;span class="nt"&gt;&amp;lt;/x-button-link&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;


    &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"py-12"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"max-w-7xl mx-auto sm:px-6 lg:px-8"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"bg-white overflow-hidden shadow-sm sm:rounded-lg"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"p-6 bg-white border-b border-gray-200"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
                    &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"panel-bod"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class="nt"&gt;&amp;lt;table&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"table"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;

                            &lt;span class="c"&gt;&amp;lt;!-- Table Headings --&amp;gt;&lt;/span&gt;
                            &lt;span class="nt"&gt;&amp;lt;thead&amp;gt;&lt;/span&gt;
                                &lt;span class="nt"&gt;&amp;lt;th&amp;gt;&lt;/span&gt;All Todos&lt;span class="nt"&gt;&amp;lt;/th&amp;gt;&lt;/span&gt;
                                &lt;span class="nt"&gt;&amp;lt;th&amp;gt;&lt;/span&gt;&lt;span class="ni"&gt;&amp;amp;nbsp;&lt;/span&gt;&lt;span class="nt"&gt;&amp;lt;/th&amp;gt;&lt;/span&gt;
                                &lt;span class="nt"&gt;&amp;lt;th&amp;gt;&lt;/span&gt;
                                    &lt;span class="nt"&gt;&amp;lt;x-button-link&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="k"&gt;{{&lt;/span&gt; &lt;span class="nv"&gt;route&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'mine'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;}}&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Show mine&lt;span class="nt"&gt;&amp;lt;/x-button-link&amp;gt;&lt;/span&gt;
                                &lt;span class="nt"&gt;&amp;lt;/th&amp;gt;&lt;/span&gt;
                            &lt;span class="nt"&gt;&amp;lt;/thead&amp;gt;&lt;/span&gt;

                            &lt;span class="c"&gt;&amp;lt;!-- Table Body --&amp;gt;&lt;/span&gt;
                            &lt;span class="nt"&gt;&amp;lt;tbody&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"max-w-full"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
                                @foreach($todos as $todo)
                                &lt;span class="nt"&gt;&amp;lt;tr&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"max-w-full"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
                                    &lt;span class="c"&gt;&amp;lt;!-- Task Name --&amp;gt;&lt;/span&gt;
                                    &lt;span class="nt"&gt;&amp;lt;td&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"pt-5 pb-5 pr-5"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
                                        &lt;span class="c"&gt;&amp;lt;!-- &amp;lt;div class=""&amp;gt; --&amp;gt;&lt;/span&gt;
                                        &lt;span class="nt"&gt;&amp;lt;h1&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"sm:font-bold"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;&lt;span class="k"&gt;{{&lt;/span&gt; &lt;span class="nv"&gt;$todo-&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nv"&gt;title&lt;/span&gt; &lt;span class="k"&gt;}}&lt;/span&gt;&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
                                        &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;&lt;span class="k"&gt;{{&lt;/span&gt; &lt;span class="nv"&gt;$todo-&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nv"&gt;desc&lt;/span&gt; &lt;span class="k"&gt;}}&lt;/span&gt;&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
                                        &lt;span class="nt"&gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"pt-2 text-gray-500"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt; Added By: &lt;span class="k"&gt;{{&lt;/span&gt; &lt;span class="nv"&gt;$todo-&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nv"&gt;user-&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nv"&gt;id&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="nv"&gt;auth&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="nv"&gt;-&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nv"&gt;user&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="nv"&gt;-&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nv"&gt;id&lt;/span&gt;&lt;span class="err"&gt;?&lt;/span&gt; &lt;span class="s1"&gt;'You'&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt;&lt;span class="nv"&gt;$todo-&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nv"&gt;user-&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nv"&gt;name&lt;/span&gt; &lt;span class="k"&gt;}}&lt;/span&gt;&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
                                        &lt;span class="c"&gt;&amp;lt;!-- &amp;lt;/div&amp;gt; --&amp;gt;&lt;/span&gt;

                                    &lt;span class="nt"&gt;&amp;lt;/td&amp;gt;&lt;/span&gt;

                                    &lt;span class="nt"&gt;&amp;lt;td&amp;gt;&lt;/span&gt;
                                        &lt;span class="c"&gt;&amp;lt;!-- TODO: Delete Button --&amp;gt;&lt;/span&gt;
                                        &lt;span class="nt"&gt;&amp;lt;div&amp;gt;&lt;/span&gt;
                                            &lt;span class="nt"&gt;&amp;lt;x-button-link&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"/todos/&lt;/span&gt;&lt;span class="k"&gt;{{&lt;/span&gt;&lt;span class="nv"&gt;$todo-&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nv"&gt;id&lt;/span&gt;&lt;span class="k"&gt;}}&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"bg-green-500"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;View&lt;span class="nt"&gt;&amp;lt;/x-button-link&amp;gt;&lt;/span&gt;
                                            @if($todo-&amp;gt;user_id == auth()-&amp;gt;user()-&amp;gt;id)
                                            &lt;span class="nt"&gt;&amp;lt;x-button-link&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="k"&gt;{{&lt;/span&gt; &lt;span class="nv"&gt;route&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'edit-form'&lt;/span&gt;&lt;span class="err"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'id'&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nv"&gt;$todo-&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nv"&gt;id&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt; &lt;span class="k"&gt;}}&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"bg-yellow-500"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Edit&lt;span class="nt"&gt;&amp;lt;/x-button-link&amp;gt;&lt;/span&gt;
                                            &lt;span class="nt"&gt;&amp;lt;x-button-link&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"/todos/&lt;/span&gt;&lt;span class="k"&gt;{{&lt;/span&gt;&lt;span class="nv"&gt;$todo-&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nv"&gt;id&lt;/span&gt;&lt;span class="k"&gt;}}&lt;/span&gt;&lt;span class="s"&gt;/delete"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"bg-red-500"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Delete&lt;span class="nt"&gt;&amp;lt;/x-button-link&amp;gt;&lt;/span&gt;
                                            @endif
                                        &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
                                    &lt;span class="nt"&gt;&amp;lt;/td&amp;gt;&lt;/span&gt;
                                &lt;span class="nt"&gt;&amp;lt;/tr&amp;gt;&lt;/span&gt;
                                @endforeach
                            &lt;span class="nt"&gt;&amp;lt;/tbody&amp;gt;&lt;/span&gt;
                        &lt;span class="nt"&gt;&amp;lt;/table&amp;gt;&lt;/span&gt;
                    &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/x-app-layout&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Show view
&lt;/h4&gt;

&lt;p&gt;The Show View displays only the information of a particular Todo when a user clicks to see more details.&lt;/p&gt;

&lt;p&gt;Create a new blade file inside  &lt;code&gt;resources/views/show.blade.php&lt;/code&gt;  and paste in the following codes.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight handlebars"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;x-app-layout&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;x-slot&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"header"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;h2&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"font-semibold text-xl text-gray-800 leading-tight"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="k"&gt;{{&lt;/span&gt; &lt;span class="nv"&gt;__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'Dashboard'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;}}&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/h2&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/x-slot&amp;gt;&lt;/span&gt;

    &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"py-12"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"max-w-7xl mx-auto sm:px-6 lg:px-8"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"bg-white overflow-hidden shadow-sm sm:rounded-lg"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"p-6 bg-white border-b border-gray-200"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
                    You're logged in!
                &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;

    &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"py-12"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"max-w-7xl mx-auto sm:px-6 lg:px-8"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"bg-white overflow-hidden shadow-sm sm:rounded-lg"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"p-6 bg-white border-b border-gray-200"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
                    &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"panel-bod"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class="nt"&gt;&amp;lt;table&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"table"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;

                            &lt;span class="c"&gt;&amp;lt;!-- Table Headings --&amp;gt;&lt;/span&gt;
                            &lt;span class="nt"&gt;&amp;lt;thead&amp;gt;&lt;/span&gt;
                                &lt;span class="nt"&gt;&amp;lt;th&amp;gt;&lt;/span&gt;Todo&lt;span class="nt"&gt;&amp;lt;/th&amp;gt;&lt;/span&gt;
                                &lt;span class="nt"&gt;&amp;lt;th&amp;gt;&lt;/span&gt;&lt;span class="ni"&gt;&amp;amp;nbsp;&lt;/span&gt;&lt;span class="nt"&gt;&amp;lt;/th&amp;gt;&lt;/span&gt;
                            &lt;span class="nt"&gt;&amp;lt;/thead&amp;gt;&lt;/span&gt;

                            &lt;span class="c"&gt;&amp;lt;!-- Table Body --&amp;gt;&lt;/span&gt;
                            &lt;span class="nt"&gt;&amp;lt;tbody&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"max-w-full"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
                                &lt;span class="nt"&gt;&amp;lt;tr&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"max-w-full"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
                                    &lt;span class="c"&gt;&amp;lt;!-- Task Name --&amp;gt;&lt;/span&gt;
                                    &lt;span class="nt"&gt;&amp;lt;td&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"pt-5 pb-5 pr-5"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
                                        &lt;span class="c"&gt;&amp;lt;!-- &amp;lt;div class=""&amp;gt; --&amp;gt;&lt;/span&gt;
                                        &lt;span class="nt"&gt;&amp;lt;h1&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"sm:font-bold"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;&lt;span class="k"&gt;{{&lt;/span&gt; &lt;span class="nv"&gt;$todo-&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nv"&gt;title&lt;/span&gt; &lt;span class="k"&gt;}}&lt;/span&gt;&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
                                        &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;&lt;span class="k"&gt;{{&lt;/span&gt; &lt;span class="nv"&gt;$todo-&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nv"&gt;desc&lt;/span&gt; &lt;span class="k"&gt;}}&lt;/span&gt;&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
                                        &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"flex content-between"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
                                            &lt;span class="nt"&gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"pt-2 text-gray-500 pr-5"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt; Added By: &lt;span class="k"&gt;{{&lt;/span&gt; &lt;span class="nv"&gt;$todo-&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nv"&gt;user-&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nv"&gt;name&lt;/span&gt; &lt;span class="k"&gt;}}&lt;/span&gt;&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
                                            &lt;span class="nt"&gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"pt-2 text-gray-500"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt; Status: &lt;span class="k"&gt;{{&lt;/span&gt; &lt;span class="nv"&gt;$todo-&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nv"&gt;status&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="nv"&gt;1&lt;/span&gt;&lt;span class="err"&gt;?&lt;/span&gt; &lt;span class="s2"&gt;"Done"&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Pending"&lt;/span&gt;&lt;span class="k"&gt;}}&lt;/span&gt;&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
                                        &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;

                                    &lt;span class="nt"&gt;&amp;lt;/td&amp;gt;&lt;/span&gt;

                                    &lt;span class="nt"&gt;&amp;lt;td&amp;gt;&lt;/span&gt;
                                        &lt;span class="c"&gt;&amp;lt;!-- TODO: Delete Button --&amp;gt;&lt;/span&gt;
                                        &lt;span class="nt"&gt;&amp;lt;div&amp;gt;&lt;/span&gt;
                                            &lt;span class="nt"&gt;&amp;lt;x-button-link&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"/todos/&lt;/span&gt;&lt;span class="k"&gt;{{&lt;/span&gt;&lt;span class="nv"&gt;$todo-&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nv"&gt;id&lt;/span&gt;&lt;span class="k"&gt;}}&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"bg-green-500"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;View&lt;span class="nt"&gt;&amp;lt;/x-button-link&amp;gt;&lt;/span&gt;
                                            @if($todo-&amp;gt;user_id == auth()-&amp;gt;user()-&amp;gt;id)
                                            &lt;span class="nt"&gt;&amp;lt;x-button-link&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="k"&gt;{{&lt;/span&gt; &lt;span class="nv"&gt;route&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'edit-form'&lt;/span&gt;&lt;span class="err"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'id'&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nv"&gt;$todo-&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nv"&gt;id&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt; &lt;span class="k"&gt;}}&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"bg-yellow-500"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Edit&lt;span class="nt"&gt;&amp;lt;/x-button-link&amp;gt;&lt;/span&gt;
                                            &lt;span class="nt"&gt;&amp;lt;x-button-link&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"/todos/&lt;/span&gt;&lt;span class="k"&gt;{{&lt;/span&gt;&lt;span class="nv"&gt;$todo-&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nv"&gt;id&lt;/span&gt;&lt;span class="k"&gt;}}&lt;/span&gt;&lt;span class="s"&gt;/delete"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"bg-red-500"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Delete&lt;span class="nt"&gt;&amp;lt;/x-button-link&amp;gt;&lt;/span&gt;
                                            @endif
                                        &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
                                    &lt;span class="nt"&gt;&amp;lt;/td&amp;gt;&lt;/span&gt;
                                &lt;span class="nt"&gt;&amp;lt;/tr&amp;gt;&lt;/span&gt;
                            &lt;span class="nt"&gt;&amp;lt;/tbody&amp;gt;&lt;/span&gt;
                        &lt;span class="nt"&gt;&amp;lt;/table&amp;gt;&lt;/span&gt;
                    &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/x-app-layout&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  &lt;strong&gt;Edit&lt;/strong&gt;  &lt;strong&gt;view&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;The Edit View contains a form to update a particular Todo when the owner of the Todo clicks on the edit button.&lt;/p&gt;

&lt;p&gt;Create a new blade file inside  &lt;code&gt;resources/views/edit.blade.php&lt;/code&gt;  and paste in the following codes.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight handlebars"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;x-app-layout&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;x-slot&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"header"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;h2&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"font-semibold text-xl text-gray-800 leading-tight"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="k"&gt;{{&lt;/span&gt; &lt;span class="nv"&gt;__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'Dashboard'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;}}&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/h2&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/x-slot&amp;gt;&lt;/span&gt;

    &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"py-12"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"max-w-7xl mx-auto sm:px-6 lg:px-8"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"bg-white overflow-hidden shadow-sm sm:rounded-lg"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"p-6 bg-white border-b border-gray-200"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
                    &lt;span class="nt"&gt;&amp;lt;form&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"max-w-full"&lt;/span&gt; &lt;span class="na"&gt;method=&lt;/span&gt;&lt;span class="s"&gt;"post"&lt;/span&gt; &lt;span class="na"&gt;action=&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="k"&gt;{{&lt;/span&gt;&lt;span class="nv"&gt;route&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'update'&lt;/span&gt;&lt;span class="err"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'id'&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nv"&gt;$todo-&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nv"&gt;id&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;&lt;span class="k"&gt;}}&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
                        @csrf
                        &lt;span class="nt"&gt;&amp;lt;x-label&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"pt-5 pb-5 pr-5"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
                            Title
                            &lt;span class="nt"&gt;&amp;lt;x-input&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"title"&lt;/span&gt; &lt;span class="na"&gt;placeholder=&lt;/span&gt;&lt;span class="s"&gt;"Enter title"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"p-3 border-gray-900"&lt;/span&gt; &lt;span class="na"&gt;value=&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="k"&gt;{{&lt;/span&gt;&lt;span class="nv"&gt;$todo-&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nv"&gt;title&lt;/span&gt;&lt;span class="k"&gt;}}&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/x-input&amp;gt;&lt;/span&gt;
                        &lt;span class="nt"&gt;&amp;lt;/x-label&amp;gt;&lt;/span&gt;
                        &lt;span class="nt"&gt;&amp;lt;x-label&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"pt-5 pb-5 pr-5"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
                            Description
                            &lt;span class="nt"&gt;&amp;lt;textarea&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"desc"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;&lt;span class="k"&gt;{{&lt;/span&gt; &lt;span class="nv"&gt;$todo-&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nv"&gt;desc&lt;/span&gt; &lt;span class="k"&gt;}}&lt;/span&gt;&lt;span class="nt"&gt;&amp;lt;/textarea&amp;gt;&lt;/span&gt;
                        &lt;span class="nt"&gt;&amp;lt;/x-label&amp;gt;&lt;/span&gt;
                        &lt;span class="nt"&gt;&amp;lt;x-label&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"pt-5 pb-5 pr-5"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
                            Status
                            &lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"status"&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"checkbox"&lt;/span&gt; &lt;span class="k"&gt;{{&lt;/span&gt;&lt;span class="nv"&gt;$todo-&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nv"&gt;status&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="nv"&gt;1&lt;/span&gt; &lt;span class="err"&gt;?&lt;/span&gt; &lt;span class="s1"&gt;'checked'&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;''&lt;/span&gt;&lt;span class="k"&gt;}}&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Done
                            &lt;span class="nt"&gt;&amp;lt;/&lt;/span&gt; &lt;span class="nt"&gt;input&amp;gt;&lt;/span&gt;
                        &lt;span class="nt"&gt;&amp;lt;/x-label&amp;gt;&lt;/span&gt;
                        &lt;span class="nt"&gt;&amp;lt;x-button&amp;gt;&lt;/span&gt;Submit&lt;span class="nt"&gt;&amp;lt;/x-button&amp;gt;&lt;/span&gt;
                    &lt;span class="nt"&gt;&amp;lt;/form&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/x-app-layout&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Add view
&lt;/h4&gt;

&lt;p&gt;The Add View contains a form to add/create a new particular Todo when a user clicks on the add button.&lt;/p&gt;

&lt;p&gt;Create a new blade file inside  &lt;code&gt;resources/views/add.blade.php&lt;/code&gt;  and paste in the following codes.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight handlebars"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;x-app-layout&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;x-slot&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"header"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;h2&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"font-semibold text-xl text-gray-800 leading-tight"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="k"&gt;{{&lt;/span&gt; &lt;span class="nv"&gt;__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'Dashboard'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;}}&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/h2&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/x-slot&amp;gt;&lt;/span&gt;

    &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"py-12"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"max-w-7xl mx-auto sm:px-6 lg:px-8"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"bg-white overflow-hidden shadow-sm sm:rounded-lg"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"p-6 bg-white border-b border-gray-200"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
                    &lt;span class="nt"&gt;&amp;lt;form&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"max-w-full"&lt;/span&gt; &lt;span class="na"&gt;method=&lt;/span&gt;&lt;span class="s"&gt;"post"&lt;/span&gt; &lt;span class="na"&gt;action=&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="k"&gt;{{&lt;/span&gt; &lt;span class="nv"&gt;route&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'add'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;}}&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
                        @csrf
                        &lt;span class="nt"&gt;&amp;lt;x-label&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"pt-5 pb-5 pr-5"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
                            Title
                            &lt;span class="nt"&gt;&amp;lt;x-input&lt;/span&gt; &lt;span class="na"&gt;required&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"title"&lt;/span&gt; &lt;span class="na"&gt;placeholder=&lt;/span&gt;&lt;span class="s"&gt;"Enter title"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"p-3 border-gray-900"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/x-input&amp;gt;&lt;/span&gt;
                        &lt;span class="nt"&gt;&amp;lt;/x-label&amp;gt;&lt;/span&gt;
                        &lt;span class="nt"&gt;&amp;lt;x-label&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"pt-5 pb-5 pr-5"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
                            Description
                            &lt;span class="nt"&gt;&amp;lt;textarea&lt;/span&gt; &lt;span class="na"&gt;required&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"desc"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/textarea&amp;gt;&lt;/span&gt;
                        &lt;span class="nt"&gt;&amp;lt;/x-label&amp;gt;&lt;/span&gt;
                        &lt;span class="nt"&gt;&amp;lt;x-button&amp;gt;&lt;/span&gt;Submit&lt;span class="nt"&gt;&amp;lt;/x-button&amp;gt;&lt;/span&gt;
                    &lt;span class="nt"&gt;&amp;lt;/form&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/x-app-layout&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Preview.
&lt;/h4&gt;

&lt;p&gt;If you get everything correctly, you should be presented with a dashboard like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzdbi8jzal98v8oqkf603.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzdbi8jzal98v8oqkf603.png" alt="todo-preview.png" width="800" height="452"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Congratulations on making it this far!&lt;/p&gt;

&lt;p&gt;&lt;em&gt;When it comes to learning Laravel, I will personally and highly recommend these 3 courses. With it, I was able to learn and start building projects within a week.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://masteringbackend.solomoneseme.com/laravel8advanced" rel="noopener noreferrer"&gt;Laravel 8 Beginner to Advance with Complete News Portal&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="http://masteringbackend.solomoneseme.com/laravelmaster" rel="noopener noreferrer"&gt;PHP with Laravel for beginners – Become a Master in Laravel&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="http://masteringbackend.solomoneseme.com/laravel2019" rel="noopener noreferrer"&gt;Laravel 2019, the complete guide with real world projects&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Take a break and subscribe to get access to our free Laravel tips that will improve your productivity.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Chapter 4:Deploying Laravel Project
&lt;/h2&gt;

&lt;p&gt;Now, deploying your Laravel project can be tedious especially if it is your first time, but in this chapter, we will look at deploying your first Laravel project easily and successfully.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7t9n1as4wkt6kp460710.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7t9n1as4wkt6kp460710.png" alt=" laravel tutorial" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Deploying Laravel to Heroku
&lt;/h3&gt;

&lt;p&gt;To deploy Laravel to Heroku is a rather fun and straightforward process, it comes with great benefits and supports auto-deployment and auto testing that’s why I have prepared a work through an article on  &lt;a href="https://masteringbackend.solomoneseme.com/posts/deploy-laravel-to-heroku/" rel="noopener noreferrer"&gt;deploying Laravel to Heroku&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Deploying Laravel to Shared Hosting
&lt;/h3&gt;

&lt;p&gt;Deploying Laravel to shared hosting might be the cheapest option available right now for testing purposes, that’s why I have prepared a work through article on  &lt;a href="https://masteringbackend.com/posts/how-to-host-a-laravel-project-on-a-shared-hosting-via-cpanel" rel="noopener noreferrer"&gt;deploying Laravel to Shared Hosting&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  More Resources
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt; &lt;a href="https://laravel.com/docs/" rel="noopener noreferrer"&gt;Official Laravel Docs&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt; &lt;a href="https://laravel-news.com/" rel="noopener noreferrer"&gt;Laravel News&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt; &lt;a href="https://www.larashout.com/" rel="noopener noreferrer"&gt;LaraShout&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt; &lt;a href="https://www.youtube.com/watch?v=30qk04BG9G4" rel="noopener noreferrer"&gt;Let’s Build with Laravel: A Linktree Clone&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt; &lt;a href="https://www.youtube.com/watch?v=ImtZ5yENzgE" rel="noopener noreferrer"&gt;Laravel PHP Framework Tutorial&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt; &lt;a href="https://laracasts.com/" rel="noopener noreferrer"&gt;LaraCasts&lt;/a&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Conclusion:Laravel
&lt;/h2&gt;

&lt;p&gt;In this tutorial, we have looked at the nitty-gritty of Laravel and have created a Todo application to practically demonstrate the knowledge we have gained so far.&lt;/p&gt;

&lt;p&gt;We have even looked at how to deploy the application to different hosting platforms.&lt;/p&gt;

&lt;p&gt;Now, it’s your turn to practice everything you have learned until you master them by building real world projects. Let me know what you will be building, if none, just comment “Laravel is Great”, we may connect from there.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;When it comes to learning Laravel with courses, I will personally and highly recommend these 3 courses. With it, I was able to learn and start building projects within a week.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://masteringbackend.solomoneseme.com/laravel8advanced" rel="noopener noreferrer"&gt;Laravel 8 Beginner to Advance with Complete News Portal&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="http://masteringbackend.solomoneseme.com/laravelmaster" rel="noopener noreferrer"&gt;PHP with Laravel for beginners – Become a Master in Laravel&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="http://masteringbackend.solomoneseme.com/laravel2019" rel="noopener noreferrer"&gt;Laravel 2019, the complete guide with real world projects&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Author: Solomon Eseme&lt;/strong&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  Thank you for being a part of the community
&lt;/h3&gt;

&lt;p&gt;Before you go:&lt;/p&gt;

&lt;h4&gt;
  
  
  Whenever you’re ready
&lt;/h4&gt;

&lt;p&gt;There are 4 ways we can help you become a great backend engineer:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://masteringbackend.com/?ref=medium" rel="noopener noreferrer"&gt;&lt;strong&gt;The MB Platform:&lt;/strong&gt;&lt;/a&gt; Join thousands of backend engineers learning backend engineering. Build real-world backend projects, learn from expert-vetted courses and roadmaps, track your learnings and set schedules, and solve backend engineering tasks, exercises, and challenges.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://masteringbackend.com/academy?ref=medium" rel="noopener noreferrer"&gt;&lt;strong&gt;The MB Academy:&lt;/strong&gt;&lt;/a&gt; The “MB Academy” is a 6-month intensive Advanced Backend Engineering BootCamp to produce great backend engineers.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://backendweeky.dev/?ref=medium" rel="noopener noreferrer"&gt;&lt;strong&gt;Join Backend Weekly:&lt;/strong&gt;&lt;/a&gt; If you like posts like this, you will absolutely enjoy our exclusive weekly newsletter, sharing exclusive backend engineering resources to help you become a great Backend Engineer.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://getbackendjobs.com/?ref=medium" rel="noopener noreferrer"&gt;&lt;strong&gt;Get Backend Jobs:&lt;/strong&gt;&lt;/a&gt; Find over 2,000+ Tailored International Remote Backend Jobs or Reach 50,000+ backend engineers on the #1 Backend Engineering Job Board.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>tutorial</category>
      <category>beginners</category>
      <category>backend</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
