<?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: Emmanuel sofuwa</title>
    <description>The latest articles on DEV Community by Emmanuel sofuwa (@emmanuel_sofs).</description>
    <link>https://dev.to/emmanuel_sofs</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%2F2589736%2Fead96f4b-4a56-4358-ac4b-8ceee60172dc.png</url>
      <title>DEV Community: Emmanuel sofuwa</title>
      <link>https://dev.to/emmanuel_sofs</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/emmanuel_sofs"/>
    <language>en</language>
    <item>
      <title>Virtual Machines vs. Docker: A Beginner-Friendly Guide</title>
      <dc:creator>Emmanuel sofuwa</dc:creator>
      <pubDate>Sun, 31 Aug 2025 21:52:28 +0000</pubDate>
      <link>https://dev.to/emmanuel_sofs/virtual-machines-vs-docker-a-beginner-friendly-guide-58h9</link>
      <guid>https://dev.to/emmanuel_sofs/virtual-machines-vs-docker-a-beginner-friendly-guide-58h9</guid>
      <description>&lt;p&gt;If you’ve ever wondered why people keep talking about virtual machines and Docker containers, you’re not alone. Both are powerful technologies for running applications, but they work in different ways. Let’s break it down in simple terms.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Virtualization?
&lt;/h2&gt;

&lt;p&gt;Virtualization is the process of running a “virtual” version of a computer inside your actual computer.&lt;/p&gt;

&lt;p&gt;This magic is made possible by something called a hypervisor.&lt;br&gt;
Think of it as a manager that sits between your physical hardware and your virtual machines. It decides how much CPU, memory, and storage each virtual machine gets, and makes sure everything runs smoothly.&lt;/p&gt;

&lt;p&gt;A Virtual Machine (VM) is like a full-fledged computer living inside your physical one. It comes with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Virtual hardware (CPU, RAM, storage, network interfaces).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A guest operating system (which could be totally different from your host OS).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Applications running on top of that OS.&lt;/p&gt;&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffylboyaij5tv0ul5zuyz.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%2Ffylboyaij5tv0ul5zuyz.png" alt="Working principle of a virtual Machine" width="462" height="452"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The trade-off?&lt;/strong&gt; VMs are powerful but heavy. Each one needs its own OS, which makes them slower to start and more resource-hungry.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Containerization?
&lt;/h2&gt;

&lt;p&gt;Now let’s talk about containerization.&lt;/p&gt;

&lt;p&gt;Unlike VMs, containers don’t need a full operating system of their own. Instead, they share the host OS but stay completely isolated from each other.&lt;/p&gt;

&lt;p&gt;A container includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Your application’s code.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Dependencies and libraries.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Runtimes needed to execute the app.&lt;/p&gt;&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1x3g0p7su7ou60r1mmlq.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%2F1x3g0p7su7ou60r1mmlq.png" alt="Docker Working Principles" width="800" height="272"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Components of Docker
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Docker Engine: The “brain” that runs and manages containers.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Docker Images: Think of these as blueprints. Just like a recipe tells you how to make a dish, an image tells Docker how to create a container.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Docker Containers: The actual running instance of an image. Containers are immutable—once created, they don’t change. If you need updates, you edit the Dockerfile and rebuild the image.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Virtual Machines vs. Containers
&lt;/h2&gt;

&lt;p&gt;Here’s the simplest way to understand the difference:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Virtual Machines:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Run a full operating system on virtualized hardware.&lt;/li&gt;
&lt;li&gt;Heavier and slower to start.&lt;/li&gt;
&lt;li&gt;Offer stronger isolation.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;Containers (Docker):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Share the host OS kernel.&lt;/li&gt;
&lt;li&gt;Lightweight and fast.&lt;/li&gt;
&lt;li&gt;Perfect for running lots of small, distributed apps.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  When Should You Use Each?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Use Virtual Machines when:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You need different operating systems on the same hardware.&lt;/li&gt;
&lt;li&gt;You’re running legacy applications that don’t play well with modern OSs.&lt;/li&gt;
&lt;li&gt;Strong isolation is a priority.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;Use Docker (Containers) when:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You want resource efficiency.&lt;/li&gt;
&lt;li&gt;You’re iterating quickly and need fast deployment.&lt;/li&gt;
&lt;li&gt;You’re building microservices or cloud-native applications.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Wrapping Up&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Virtual machines and containers solve similar problems—running applications in isolated environments—but they go about it differently.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;VMs give you complete virtual computers.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Containers give you lightweight, fast, and portable application environments.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Neither is “better” in all cases—it depends on what you’re building.&lt;/p&gt;

&lt;p&gt;So the next time someone mentions Docker or virtual machines, you’ll know exactly what they’re talking about—and which one might fit your project best.&lt;/p&gt;

</description>
      <category>docker</category>
      <category>virtualmachine</category>
      <category>devops</category>
      <category>webdev</category>
    </item>
    <item>
      <title>How to Set Up Laravel with PostgreSQL (Step-by-Step Guide)</title>
      <dc:creator>Emmanuel sofuwa</dc:creator>
      <pubDate>Sun, 17 Aug 2025 20:11:09 +0000</pubDate>
      <link>https://dev.to/emmanuel_sofs/how-to-set-up-laravel-with-postgresql-step-by-step-guide-2gn0</link>
      <guid>https://dev.to/emmanuel_sofs/how-to-set-up-laravel-with-postgresql-step-by-step-guide-2gn0</guid>
      <description>&lt;p&gt;In this article, we’ll focus on how to set up a new Laravel application with PostgreSQL as the database.&lt;/p&gt;

&lt;p&gt;Before we dive into the setup, let’s briefly understand what PostgreSQL and Laravel are.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is PostgreSQL?
&lt;/h2&gt;

&lt;p&gt;PostgreSQL is a powerful, open-source object-relational database management system (ORDBMS). It extends SQL (Structured Query Language) with advanced features designed to safely store and scale complex data workloads. PostgreSQL is often preferred for its reliability, support for JSON, and ability to handle large applications.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Laravel?
&lt;/h2&gt;

&lt;p&gt;Laravel is a PHP web development framework built for web artisans. It can be used to build full-stack applications and APIs (Application Programming Interfaces) that integrate with JavaScript libraries such as React or Vue.&lt;/p&gt;

&lt;p&gt;By default, Laravel supports multiple databases. Depending on your project requirements, you can choose any of the following:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;MySQL&lt;/li&gt;
&lt;li&gt;SQLite&lt;/li&gt;
&lt;li&gt;PostgreSQL&lt;/li&gt;
&lt;li&gt;SQL Server&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Step-by-Step Setup Guide
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Install PostgreSQL&lt;/p&gt;

&lt;p&gt;Visit the official PostgreSQL website and download the version best suited for your operating system (Windows, macOS, or Linux).&lt;/p&gt;

&lt;p&gt;During installation:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create a password for the default postgres user.&lt;/li&gt;
&lt;li&gt;Leave the default port as 5432.&lt;/li&gt;
&lt;li&gt;Ensure pgAdmin is installed (it comes bundled by default).&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Enable PostgreSQL in PHP&lt;/p&gt;

&lt;p&gt;Locate your php.ini file (for me, it’s inside Laragon). Search for these two lines and uncomment them (remove the leading ;):&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;extension=pgsql
extension=pdo_pgsql
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create a Database in pgAdmin&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Open pgAdmin.&lt;/li&gt;
&lt;li&gt;Connect to the server (enter the password you set for the postgres user).&lt;/li&gt;
&lt;li&gt;Right-click on Databases → Create → Database.&lt;/li&gt;
&lt;li&gt;Name your database, e.g., laravel_db.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create a New Laravel Application&lt;/p&gt;

&lt;p&gt;Open your terminal and run the following:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd C:\laragon\www
composer create-project laravel/laravel laravel_pg

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

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Configure the .env File&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%2Fskkveco94lmb3o5757jm.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%2Fskkveco94lmb3o5757jm.png" alt="Database Section, Laravel .env" width="800" height="188"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Run Database Migrations&lt;/p&gt;

&lt;p&gt;In your terminal, navigate to the project folder and run:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;php artisan migrate

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


&lt;p&gt;If successful, you’ll see messages like:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Migrating: 2014_10_12_000000_create_users_table
Migrated:  2014_10_12_000000_create_users_table

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

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Serve the Application&lt;/p&gt;

&lt;p&gt;Finally, start the development server:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;php artisan serve

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


&lt;p&gt;Visit &lt;a href="http://127.0.0.1:8000" rel="noopener noreferrer"&gt;http://127.0.0.1:8000&lt;/a&gt; in your browser to confirm your Laravel application is running with PostgreSQL.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;

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

&lt;p&gt;You’ve successfully set up a Laravel application with PostgreSQL.&lt;/p&gt;

&lt;p&gt;From here, you can begin building models, controllers, and APIs backed by PostgreSQL. In upcoming tutorials, we’ll explore how to configure relationships, authentication, and advanced PostgreSQL features inside Laravel.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>database</category>
      <category>php</category>
      <category>laravel</category>
    </item>
  </channel>
</rss>
