<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Diana Wangui on Medium]]></title>
        <description><![CDATA[Stories by Diana Wangui on Medium]]></description>
        <link>https://medium.com/@dianawangui?source=rss-ad009de7992c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*BDqzMoXr8vk8xXWi</url>
            <title>Stories by Diana Wangui on Medium</title>
            <link>https://medium.com/@dianawangui?source=rss-ad009de7992c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 13:34:48 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@dianawangui/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Introduction to ReactJS]]></title>
            <link>https://medium.com/@dianawangui/introduction-to-reactjs-11dee50ad2eb?source=rss-ad009de7992c------2</link>
            <guid isPermaLink="false">https://medium.com/p/11dee50ad2eb</guid>
            <dc:creator><![CDATA[Diana Wangui]]></dc:creator>
            <pubDate>Wed, 31 Jul 2024 19:22:27 GMT</pubDate>
            <atom:updated>2024-07-31T19:22:27.383Z</atom:updated>
            <content:encoded><![CDATA[<p>After building several projects using Vanilla JavaScript, HTML, and CSS, I’ve decided to dive into learning React. Today, I want to share what I’ve discovered so far: What is React? Why was it developed? Who created it?</p><p>React is not a framework but a flexible JavaScript library for building reusable UI components. It was developed by Jordan Walke, a software engineer at Facebook, in 2011 and released to the public in May 2013. Initially developed and maintained by Facebook, React has since been used in popular applications like WhatsApp and Instagram.</p><p>With that brief background, let’s dive into creating and building with React. First things first: we need to set up a React environment. The prerequisites for ReactJS are:</p><ul><li>NodeJS and NPM</li><li>React and React DOM</li><li>Webpack</li><li>Babel</li></ul><h3>Installing ReactJS</h3><p>There are two ways to install ReactJS: using NPM commands or the create-react-app command.</p><h4>Installing Using NPM</h4><p>NodeJS and NPM are essential platforms for developing any ReactJS application. To install NodeJS and NPM, visit <a href="https://nodejs.org/">this link</a> (I will show more about this as we continue). After installation, verify the installation with <strong><em>‘node -v ‘ </em></strong>NodeJS and<strong><em> ‘npm -v’</em></strong> for NPM.</p><h4>Installing React and React DOM</h4><p>To install React and React DOM, first, create a root folder for your application. For example, you can create a directory named<strong><em> ‘myReactApp’ using </em></strong><strong><em>mkdir myReactApp</em></strong></p><p>Next, initialize your project with a<strong><em> ‘package.json’</em></strong> file using <strong><em>npm init -y</em></strong></p><p>Then, install React and React DOM packages<strong><em> npm install react react-dom — save</em></strong></p><p><strong>Installing Webpack</strong><br>Webpack is used for module packaging, development, and production pipeline automation. You can use ‘webpack-dev-server’ during development, ‘webpack’ for creating production builds, and ‘webpack CLI’ for various commands. Webpack compiles everything into a single bundle. To install Webpack, use the command<strong><em> npm install webpack webpack-dev-server webpack-cli — save</em></strong></p><p><strong>Installing Babel</strong><br>Babel is a JavaScript compiler that converts source code from one version to another. It compiles React JSX and ES6 to ES5 JavaScript, ensuring compatibility with all browsers. You will need ‘babel-loader’ for JSX files, ‘babel-preset-react’ for automatic browser updates without losing the current state, and ‘babel-preset-env’ for ES6 support. Install Babel with the following command <strong><em>npm install babel-core babel-loader babel-preset-env babel-preset-react babel-webpack-plugin — save-dev</em></strong></p><h3>Creating Project Files</h3><p>After installation, it’s time to create some essential files for your project:</p><ul><li>index.html</li><li>App.js</li><li>main.js</li><li>webpack.config.js</li><li>.babelrc</li><li>package.json</li></ul><h4>Configuring webpack.config.js</h4><p>In the webpack.config.js file, configure Webpack by adding the following code, (it could vary this is what I have been using in my recent projects):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/288/1*dl08cy8WMn_S4AbjSuZ1Cg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/452/1*Ryy4nsbDovvlEhWhx6wCRw.png" /></figure><p>This code defines your app’s entry point, build output, and resolves file extensions automatically. It also sets up the development server to run on port 8564 and specifies loaders for processing various file types.</p><p><strong><em>Package.json file</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/734/1*dcy67pPIBOrzU_KIsmCMRA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/957/1*Ppfhd38CAp0NVhPiW1gtAg.png" /></figure><p><strong><em>index.html</em></strong></p><p>The main HTML file that includes a div element with an id of root where the React app will be rendered, and a script to include the bundled JavaScript file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/885/1*p-SltlNYW6EVzIvLp86s0Q.png" /></figure><p><strong>App.js</strong></p><p>A JavaScript file containing the main React component for the application, defining the structure and behavior of the UI.</p><p><strong>.babelrc</strong></p><p>A configuration file for Babel, defining presets and plugins for transpiling modern JavaScript and JSX syntax into a format compatible with older browsers.</p><p><strong>main.js</strong></p><p>The entry point JavaScript file that renders the React component(s) into the DOM, typically importing React and ReactDOM.</p><p>…to be continued</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=11dee50ad2eb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ePermit Web App(Portfolio project)]]></title>
            <link>https://medium.com/@dianawangui/epermit-web-app-portfolio-project-63f423d44dd3?source=rss-ad009de7992c------2</link>
            <guid isPermaLink="false">https://medium.com/p/63f423d44dd3</guid>
            <dc:creator><![CDATA[Diana Wangui]]></dc:creator>
            <pubDate>Wed, 12 Jun 2024 18:22:29 GMT</pubDate>
            <atom:updated>2024-06-12T18:22:29.135Z</atom:updated>
            <content:encoded><![CDATA[<p>The <strong>ePermit web app</strong> is designed to simplify and expedite the process of obtaining business permits for entrepreneurs in Kilifi County. Our goal is to eliminate the need for business owners to visit multiple government offices by providing a streamlined online platform where they can apply for, track, and receive their permits.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=63f423d44dd3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Demystifying The Web: What Happens When You Type www.google.com And Hit Enter?]]></title>
            <link>https://medium.com/@dianawangui/demystifying-the-web-what-happens-when-you-type-www-google-com-and-hit-enter-1af0e4593016?source=rss-ad009de7992c------2</link>
            <guid isPermaLink="false">https://medium.com/p/1af0e4593016</guid>
            <dc:creator><![CDATA[Diana Wangui]]></dc:creator>
            <pubDate>Mon, 08 Apr 2024 14:17:45 GMT</pubDate>
            <atom:updated>2024-04-08T14:19:50.843Z</atom:updated>
            <content:encoded><![CDATA[<p>In the vast and interconnected realm of the internet, every click, tap or even swipe initiates a fascinating journey through a complex network of digital infrastructure. Have you ever wondered what happens when you enter a web address such as <a href="http://www.google.com/">www.google.com</a> into your browser and hit enter? It’s like peeling back the layers of a digital onion, revealing a fascinating world behind the scenes magic. From the invisible shields called firewalls, to secrets codes that encrypt your data, every step of this http request is a mini adventure in itself.</p><p>Join me as I take a tour journey through the inner workings of the internet, demystifying the process that brings webpages to your screen. We will deep dive into mysteries of <strong><em>firewalls,</em></strong> explore the secrets of <strong><em>encryptions using SSL</em></strong> and peek behind the curtains at <strong><em>load balancers </em></strong>and<strong><em> servers</em></strong>. It’s a journey full of twists and turns but fear not, as I will be your trusted guide making sure you will never get lost in the maze of techno-jargon. Let’s dive in and discover the wonders of the web together.</p><p>First and foremost, let me disclose that, computers in nature cannot understand human readable language. Therefore, when you type something like <a href="http://www.google.com/">www.google.com</a> (domain name) , the browser you are using, it could be Firefox, chrome or even opera-mini, has to find an IP address associated with this domain name. Okay that was fast, let me explain, an IP address is a unique code that identifies different web servers over the internet. Just like we have addresses in our homes, where people can send letters to, the web servers also have this IP addresses that uniquely identifies them, so that any request that is sent has the right destination to land into.</p><p>For the browser to know the IP address of the domain name that the user has typed for example <a href="http://www.google.com/">www.google.com</a>, it searches its cached files to see if there is any IP address associated with the typed domain. If the browser fails to find this IP address, it sends the query to the DNS (Domain Name System) server.</p><p><strong>DNS REQUESTS:</strong></p><p>DNS is a Domain Name System that translates the domain name to an IP address for the specified domain name URL (Universal Resource Locator). The DNS has a <strong>DNS Resolver</strong> that tries to find any cached file saved inside the operating system that could be having the associated IP address to the domain name it was requested. If the resolver fails to find the associated IP address, it sends a query to the Recursive DNS server.</p><p>The <strong>Recursive DNS server</strong> searches through its cached files to find any information of the requested IP address, if fails to find this IP address, the Recursive DNS contacts the <strong>Root DNS</strong> server, which responds with the IP address to the <strong>Top Level domain</strong> which is the .com in our case, of the requested domain name. This could be any other like .org , .edu. When the Recursive DNS receives this IP address, it contacts the Top Level Domain and received the IP address to the Authoritative DNS to the .com domain.</p><p>The <strong>Authoritative domain</strong> now gets the right IP address to your domain, <a href="http://www.google.com/">www.google.com</a> which is 172.217.170.164 (this can vary between different systems and over time due to factors like load balancing, geographic routing, and DNS caching) and send it to the Recursive DNS. The Recursive DNS stored a copy of this IP address to it cache for future use and then sends it to the DNS resolver. The Resolver also stored a copy of the IP address and then sends the IP to the browser which now have the right address to query the server with. Wahoo, we are now back from getting our IP address associated with the website <a href="http://www.google.com/">www.google.com</a>. What an interesting journey, lets now get our bags together and explore on how we will get our web pages from the IP address that we just got for our <a href="http://www.google.com/">www.google.com</a>.</p><p>Let’s learn some few things that happen in between when you send the request up to when you receive it back. I know it looks so obvious but a couple of processes happens, it happens so fast that you could not imagine all this happen in that short period of time, but yes, it all happens:</p><p><strong>TCP/IP:</strong></p><p>After receiving the IP address of the web page, the browser initiates a connection to that IP address received in our case for the <a href="http://www.google.com/">www.google.com</a> using the Transmission Control Protocol over the Internet Protocol, TCP/IP. The browser sends a packet to the IP address of google on port 443, which is for HTTPS(secure) requests or port 80 for HTTP (not secure) request. This packets contains sequence numbers to establish a connection. The server at <a href="http://www.google.com/">www.google.com</a> receives this packet and responds with a packet acknowledging the receipt of the packet sent, and then providing its own sequence of numbers. Finally, the browser sends an acknowledgment packet back to the server confirming the receipt of the acknowledgment packet from the server, and at this point the TCP handshake is complete and the TCP connection is established between the browser and the server.</p><p><strong>FIREWALL:</strong></p><p>Firewall acts as a barrier between the client and the server that filters incoming and outgoing network traffic based on the predefined security rules. How this happens is, when the browser sends the HTTP request, the request first passes through the firewall. The firewall inspects the request headers and payload to ensure they comply with the organization security policy. The firewall may block requests from the browser based on a couple of factors such as IP source, destination port or even the specific content type.</p><p><strong>HTTPS/SSL:</strong></p><p>HTTPS (HTTP Secure) unlike the HTTP, encrypts the data exchange between the client and the server using the SSL protocol ensuring privacy and data integrity. Imagine if you were buying something online and you enter your card information on the internet that is not secure, there are very high chances of malicious people (hackers) getting your data and performing malicious things with it.</p><p>Before even sending the HTTP request, the client and the server perform an SSL handshake and in the process, the sever presents its SSL certificate to the client and the clients verifies the certificate authenticity and negotiates the encryptions parameters. Once the handshake is successful, a secure connection between the two is established. Now any HTTP request and any subsequent data exchange between the client and the server is encrypted using symmetric encryption agreed upon during the SSL handshake.</p><p><strong>LOAD BALANCER:</strong></p><p>Load balancer distributes incoming requests across multiple server to optimize recourses utilization and ensure high availability and scalability, by using different algorithm that the organization set. Big companies like google, Microsoft, Safaricom, etc. have large volumes of data they need to store and therefore you will find that they have more than one server. So to make the process smoother, the load balancer comes into place. Imagine a load balancer as navigation that allows request to be sent to the available servers at the moments the request was made, depending on the algorithm (round robin, least connections) set by the organization that owns those servers. The load balancer also periodically checks the health of the backend servers and route traffic to the health servers only.</p><p><strong>WEB SERVER:</strong></p><p>The web server, is one among the servers, but its stores static files, such as HTML, CSS, JavaScript, images or any other static resources requested by the client. Upon receiving the HTTP request from the load balancer, the web server retrieves the corresponding files from its file system or cache. The web server then prepares the HTTP response with the requested information. Once the request is prepared, its sent back to the users’ browser over the established TCP connection. The user browser receives the HTTP response sent back by the web server. The bowser then interprets the response based on the content type header included on the response, for example if the content type is text or html the browser recognizes it as an HTML document and renders it accordingly, parsing html markup to display the content.</p><p>If the Content-Type is CSS or JavaScript, the browser interprets it as stylesheets or scripts and applies them to the rendered HTML content. If the Content-Type is an image format (image/jpeg, image/png), the browser displays the image directly within the webpage.</p><p><strong>APPLICATION SERVER:</strong></p><p>Application servers play a crucial role in handling dynamic content and executing the business logic of web application. When a requested resource is dynamic, such as a generated HTML page or an API response, the application server springs into action. The application server executes server-side scripts that could be written in languages like PHP, Python, Ruby, or Node.js. These scripts dynamically generate the content based on various factors such as user input, session data, or database queries. To generate dynamic content, the application server often needs to fetch or update data from databases or interact with other backend services. It sends requests to these services and processes the responses to incorporate the necessary data into the generated content.</p><p>Wahala, we’ve untangled the web of complexities together, and that’s how all this works. How was your trip? I hope it was as amazing for you as it was for me. By now, I trust you have a deeper understanding of all the intricate processes that unfold behind the scenes when you type any URL into your browser. It was delightful having you here; until next time, see you soon.</p><figure><img alt="An image displaying how HTTP request are sent and received" src="https://cdn-images-1.medium.com/max/1024/1*R-GBDsOrPRibqlI2TS59-g.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1af0e4593016" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>