<?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>Forem: Mohamed nagh</title>
    <description>The latest articles on Forem by Mohamed nagh (@mohamed_nagh).</description>
    <link>https://forem.com/mohamed_nagh</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%2F1913734%2Ffec576c8-9aaf-42b4-88fd-24ac33d2de14.jpg</url>
      <title>Forem: Mohamed nagh</title>
      <link>https://forem.com/mohamed_nagh</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/mohamed_nagh"/>
    <language>en</language>
    <item>
      <title>Static and dynamic pages</title>
      <dc:creator>Mohamed nagh</dc:creator>
      <pubDate>Tue, 07 Jan 2025 02:00:05 +0000</pubDate>
      <link>https://forem.com/mohamed_nagh/static-and-dynamic-pages-4di8</link>
      <guid>https://forem.com/mohamed_nagh/static-and-dynamic-pages-4di8</guid>
      <description>&lt;p&gt;The difference between Static and Dynamic web pages can be understood easily if you think about them in terms of how they are built and updated.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Static Pages:
&lt;/h2&gt;

&lt;p&gt;What are they?&lt;br&gt;
Static pages are web pages with fixed content. They are created once and don’t change unless manually updated by a developer.&lt;/p&gt;

&lt;p&gt;How do they work?&lt;br&gt;
A static page is just a file (usually HTML) stored on a web server. When you visit the page, you’re seeing the exact same content every time, because the page doesn't change.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
Imagine a brochure that you receive in the mail. It’s the same for everyone and doesn’t change unless someone prints a new one.&lt;/p&gt;

&lt;p&gt;Example of Static Page:&lt;br&gt;
A simple "About Us" page that just tells you some information about a company, and that text will stay the same unless someone updates it.&lt;/p&gt;

&lt;p&gt;Pros:&lt;br&gt;
Faster loading because there's no need to generate content.&lt;br&gt;
Simpler to build.&lt;/p&gt;

&lt;p&gt;Cons:&lt;br&gt;
Less flexible. You can’t personalize or update content without editing the actual file.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Dynamic Pages:
&lt;/h2&gt;

&lt;p&gt;What are they?&lt;br&gt;
Dynamic pages are web pages that can change based on user interaction, time, or other factors. They are generated "on the fly" by a web server when you visit the page.&lt;/p&gt;

&lt;p&gt;How do they work?&lt;br&gt;
These pages are usually powered by databases and server-side scripts (like PHP, Python, or JavaScript). The server builds the page and sends it to you based on your request.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
Think of a social media page where content like your feed, messages, and notifications change every time you refresh or interact with the page.&lt;/p&gt;

&lt;p&gt;Example of Dynamic Page:&lt;br&gt;
A user profile page where the content changes based on who’s logged in. For example, you’ll see different content depending on whether you're logged in as John, Sarah, or another user.&lt;/p&gt;

&lt;p&gt;Pros:&lt;br&gt;
More interactive and personalized.&lt;br&gt;
Content can change automatically, so it’s always up-to-date.&lt;/p&gt;

&lt;p&gt;Cons:&lt;br&gt;
Requires more resources and can be slower because the page is being generated dynamically.&lt;br&gt;
More complex to develop.&lt;/p&gt;

&lt;p&gt;Summary:&lt;br&gt;
Static Pages = Same content every time, faster, simpler.&lt;br&gt;
Dynamic Pages = Content changes based on input or time, more complex but flexible.&lt;br&gt;
In short, static pages are like a printed brochure, while dynamic pages are like a personalized dashboard that changes based on your activity or the time of day.&lt;/p&gt;

</description>
      <category>programming</category>
    </item>
  </channel>
</rss>
