<?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 divine dela on Medium]]></title>
        <description><![CDATA[Stories by divine dela on Medium]]></description>
        <link>https://medium.com/@divinedela?source=rss-7aaec1f2b5fa------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*cBLSp4ZLZ_UUDfSEx8hG3A.jpeg</url>
            <title>Stories by divine dela on Medium</title>
            <link>https://medium.com/@divinedela?source=rss-7aaec1f2b5fa------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 15:03:25 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@divinedela/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[How to Build a REST API With Express JS and Typescript - Part II (Organising Routes)]]></title>
            <link>https://medium.com/geekculture/how-to-build-a-rest-api-with-express-js-and-typescript-part-ii-organising-routes-ee293eeb16eb?source=rss-7aaec1f2b5fa------2</link>
            <guid isPermaLink="false">https://medium.com/p/ee293eeb16eb</guid>
            <category><![CDATA[clean-code]]></category>
            <category><![CDATA[expressjs]]></category>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[routing]]></category>
            <dc:creator><![CDATA[divine dela]]></dc:creator>
            <pubDate>Thu, 25 Nov 2021 13:03:05 GMT</pubDate>
            <atom:updated>2021-11-25T13:03:05.077Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pUi3vkj06Vqp_sXeiI-UbQ.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@jstrippa?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">James Harrison</a> on <a href="https://unsplash.com/s/photos/code?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>In the <a href="https://medium.com/swlh/build-a-rest-api-with-express-js-and-typescript-dc2c8da89c52">first part</a> of this series, I discussed how to set up an Express JS REST API project with Typescript. By the end of that article, we created our <em>home</em> route and were able to test our endpoint in the browser.</p><p>In this article, I will discuss how we can organise our routes to have a cleaner code and make the project easier to maintain.</p><p><strong>PREREQUISITES</strong></p><p>You will need a basic understanding of REST API development using Express framework for Node JS.</p><p>It will also be easier to follow if you’ve read <a href="https://medium.com/swlh/build-a-rest-api-with-express-js-and-typescript-dc2c8da89c52">the first part</a> of this article.</p><p><strong>Step 1: Create routes folder</strong></p><p>Open the folder in <em>vs code </em>and create a new folder to hold our route files. I like to place this folder at the <em>root </em>of my project, on the same level as the <em>index.ts </em>file. We’ll name this folder <em>routes</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sIffIFSsbohS64Q1PTbRYQ.png" /><figcaption>Add routes folder</figcaption></figure><p><strong>Step 2: Add our first route (home.ts)</strong></p><p>Create a new typescript file in the routes folder. This file will contain code for our home route. We’ll call this file <em>home.ts.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kOnBjma3HZb6Tcx0PW9fmg.png" /><figcaption>Create file for the home route</figcaption></figure><p><strong>Step 3: Add code for the home route</strong></p><p>We’ll add code for the home route as shown in the screenshot below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CC1hCMF66Gefcpc2AuX0zQ.png" /><figcaption>add home route in home.ts</figcaption></figure><p>Compare the code in <em>home.ts</em> route file (shown above) to the code we wrote earlier in <em>index.ts </em>(shown below)<em> </em>and you’ll see a lot of similarities.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cwVtEW58xweuGxyrmAuSVA.png" /><figcaption>index.ts file</figcaption></figure><p>On <em>line 1 </em>of <em>route.ts, </em>we imported express, just as we did in <em>index.ts</em>.</p><p>On <em>line 2 </em>however<em>, </em>instead of calling <strong><em>express(), </em></strong>I call <strong><em>express.Router() </em></strong>and assign it to a variable which I call <em>router</em><strong><em>. </em></strong>On <em>line 5</em> of <em>home.ts</em> also, you’ll notice that instead of using <em>app.get()</em>, I use <em>router.get().</em></p><p>On <em>line 9 </em>of <em>home.ts</em>, we do a <em>default </em>export of the <em>router </em>we created on line 2 of <em>home.ts. </em>This will make our router visible to be imported outside this module (<em>homet.ts).</em></p><p><strong>Step 4: Import home route in index.ts</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Mank--gYXWpyNVX9BtVjgQ.png" /><figcaption>Import home route in index.ts</figcaption></figure><p>By exporting the route in <em>home.ts</em>, we are able to import it in another module. We import the route as <em>home</em> on <em>line 4</em> of index<em>.ts. </em>We can now remove the code we had for the home route in <em>index.ts </em>and replace it with what we have in the screenshot on <em>line 6.</em></p><p><strong>Step 4: Test the route</strong></p><p>We are now ready to test the code. As we did in the <a href="https://medium.com/swlh/build-a-rest-api-with-express-js-and-typescript-dc2c8da89c52">first part</a> of this article, we’ll run our dev script in package.json by running the following script from the terminal</p><pre>npm run dev</pre><p>You can then visit the URL below in your browser</p><pre><a href="http://localhost:3000/">http://localhost:3000/</a></pre><p>You should see a text on the screen similar to what I have in the screenshot below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Xdl1BeqMpmvQ6kZr1JYwXA.png" /><figcaption>result of running npm run dev script</figcaption></figure><p>You should also see a new folder <em>routes </em>created in the <em>dist </em>folder. When you open this folder, you will see a new file, <em>home.js </em>with code similar to what I have below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zrALx7XDyP76y5t5EUJvJw.png" /></figure><p>You can go ahead and add more endpoints to your routes or create new routes in the <em>routes </em>folder.</p><p>You can find the complete code on the <em>add-routes </em>branch of this github repository:</p><pre><a href="https://github.com/divinedela/express-typescript-apis/tree/add-routes">ht</a><a href="https://github.com/divinedela/express-typescript-apis/tree/add-routes">https://github.com/divinedela/express-typescript-apis/tree/add-routes</a></pre><p>You can also find the first part of this article here:</p><pre><a href="https://medium.com/swlh/build-a-rest-api-with-express-js-and-typescript-dc2c8da89c52">https://medium.com/swlh/build-a-rest-api-with-express-js-and-typescript-dc2c8da89c52</a></pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ee293eeb16eb" width="1" height="1" alt=""><hr><p><a href="https://medium.com/geekculture/how-to-build-a-rest-api-with-express-js-and-typescript-part-ii-organising-routes-ee293eeb16eb">How to Build a REST API With Express JS and Typescript - Part II (Organising Routes)</a> was originally published in <a href="https://medium.com/geekculture">Geek Culture</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Build a REST API With Express JS and Typescript]]></title>
            <link>https://medium.com/swlh/build-a-rest-api-with-express-js-and-typescript-dc2c8da89c52?source=rss-7aaec1f2b5fa------2</link>
            <guid isPermaLink="false">https://medium.com/p/dc2c8da89c52</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[expressjs]]></category>
            <dc:creator><![CDATA[divine dela]]></dc:creator>
            <pubDate>Thu, 22 Oct 2020 13:39:16 GMT</pubDate>
            <atom:updated>2020-10-23T22:09:22.325Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VUMnDejhPbnBG48fw3ZAWA.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@azhar93?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Azharul Islam</a> on <a href="https://unsplash.com/s/photos/coding?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>With NodeJs, we can leverage our Javascript skills to build server side applications. <em>Express Js</em> is a very popular server side framework for NodeJs.</p><p><em>Typescript</em> is a “superset of javascript” which helps us to add types to our javascript code. By catching errors and providing fixes before we ran our code, typescript can help us save time and write more quality code. Any valid JavaScript code is valid Typescript code.</p><p><strong>PREREQUISITES</strong></p><p>You will need a basic understanding of REST API development using Express framework for Node JS.</p><p><strong>Step 1: Create project folder</strong></p><p>Create a new folder on your computer. Let’s call it <em>express-typescript</em>. Open the <em>express-typescript</em> folder with VS code or your favorite text editor.</p><p><strong>Step 2: Initialize a new Node Js Project</strong></p><p>Using the terminal, navigate to the new folder.</p><p>Alternatively, if you’re using VS Code with the project open, access the terminal by typing</p><pre>CTRL + `</pre><p>At the terminal, run the command:</p><pre>npm init</pre><p>Accept all defaults until you get to entry point, type <strong>dist/index.js</strong> as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u7CfQZUFxm6Ll8dblfZP6w.png" /></figure><p>After, your <strong>package.json</strong> file should look like the one shown below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vKGQpyievCcnW4Ef5YBsFA.png" /></figure><p><strong>step 3: Install typescript as a dev dependency</strong></p><p>Run the following command to install typescript as a develpoment dependency in your project.</p><pre>npm i -D typescript</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ysNDKt3-lmwKl7Dc2rYT3w.png" /></figure><p><strong>Step 4: Add dist folder and index.ts file</strong></p><p>Let’s create a folder named <strong>dist</strong> and a file named <strong>index.ts </strong>at the root of the project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ivrswyqYgQhaoLkwyDZVhA.png" /></figure><p><strong>Step 5: Add a tsconfig.json file</strong></p><p>A <strong>tsconfig.json</strong> file is needed to run the project with typescript. This file…</p><p>Back to the terminal, run :</p><pre>npx tsc --init</pre><p>This will create a tsconfig file.</p><p><strong>Step 6: Get the tsconfig.json file ready</strong></p><p>Open the tsconfig.json file.</p><p>We’ll uncomment the file and make lines <strong>17</strong> and <strong>18 </strong>as shown below<strong>. </strong>This tells typescript compiler to find the root typescript file in the root of the project ( shown by ‘./’ ) and put the transpiled javascript files in the dist folder ( also located in the root ).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3n4Hz4dOguUSieEbVIcggw.png" /><figcaption>Updating Lines 17 and 18 of tsconfig.json</figcaption></figure><p><strong>Step 7: Start ts compiler</strong></p><p>Let’s add a simple statement in the index.ts file and run the following command from the terminal:</p><pre>npx tsc --watch</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j5P6Sr-MfuD9RInk52FaYw.png" /></figure><p>The first time, right after running the command, an <strong>index.js </strong>file is generated in the <strong>dist </strong>folder, as defined in the <strong>tsconfig.json </strong>file. Because we added the — <strong>watch</strong> <em>flag </em>to the command, any time we update the <strong>index.ts</strong> file, typescript compiler will update the <strong>index.js</strong> file in the dist folder.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eiBdd9_C33mbim5i_OSUhA.png" /><figcaption>Updated index.js file after running <strong>npx tsc — watch </strong>the first time</figcaption></figure><p><strong>Step 8: install express and type declaration file for express</strong></p><p>When using typescript, we install type declaration files. Type definition files have the file extension <strong><em>.d.ts</em></strong>. They aid our development by adding <em>types</em> to an npm package that has no types.</p><p>Install express and type declaration files for express by running the following 2 commands from the terminal:</p><pre>npm i express</pre><pre>npm i -D @types/express</pre><p><strong>step 9: Create an express app</strong></p><p>Add the following code to the index.ts file. Take note of the import statement at line 1 as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eQnpDAaSopUtL200n0rodA.png" /></figure><p>Because typescript uses the ES Module System, we wouldn’t write our import statements as shown below but rather with the format of line 1 as shown in the screenshot above.</p><pre>const express = require(&#39;express&#39;)</pre><p><strong>step 10: Update npm scripts in package.json file</strong></p><p>Add a start script as shown on line 8 below. Optionally add a script (line 9) to instruct typescript compiler to watch the file for changes and update the index.js file in the dist folder. Then instruct nodemon to watch for changes to the index.js file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Nlk8j2PciKGzxatO7-p8pg.png" /></figure><p>To use the script on line 9, make sure you’ve installed nodemon. You can install Nodemon globally by running from the terminal:</p><pre>npm i -g nodemon</pre><p>Run the script on line 9:</p><pre>npm run dev</pre><p>After running the script, the index.js file will be updated to the code shown in the screenshot below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G_jbHh7ZyHTCLYpJZlNyPA.png" /></figure><p>You can now add more REST endpoints as you need. The completed code can be found in the repository here:</p><pre><a href="https://github.com/divinedela/express-typescript-apis">https://github.com/divinedela/express-typescript-apis</a></pre><p>Happy coding!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dc2c8da89c52" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/build-a-rest-api-with-express-js-and-typescript-dc2c8da89c52">How to Build a REST API With Express JS and Typescript</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[React 3030 — Episode 2 (Project Folder Structure)]]></title>
            <link>https://divinedela.medium.com/react-3030-episode-2-project-folder-structure-5850418ddf85?source=rss-7aaec1f2b5fa------2</link>
            <guid isPermaLink="false">https://medium.com/p/5850418ddf85</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[beginners-guide]]></category>
            <category><![CDATA[reactive-programming]]></category>
            <category><![CDATA[javascript-frameworks]]></category>
            <dc:creator><![CDATA[divine dela]]></dc:creator>
            <pubDate>Thu, 23 Jan 2020 20:54:52 GMT</pubDate>
            <atom:updated>2020-05-13T14:40:47.486Z</atom:updated>
            <content:encoded><![CDATA[<h3>React 3030 — Episode 2 (Project Folder Structure)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y6C4nSvy2Woe0m7bWEn4BA.png" /></figure><p>I decided to spend 30 minutes every day for 30 days to learn React. I nicknamed this project <strong>React 3030</strong>. This is day 2.</p><p>On <a href="https://medium.com/@divinedela.dd/react-3030-episode-1-db3fb58fd34d"><strong>day 1</strong></a>, I created a new react project using <strong>create react app.</strong> An app created with <strong>Create React App </strong>has a well defined folder structure.As shown below, there are three folders: <strong>node_modules, public </strong>and <strong>src</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Klbxf6Yi62w8aeUb" /><figcaption>Create React App Folder Structure</figcaption></figure><p><strong>Node_modules Folder</strong></p><p>The <strong>node_modules </strong>folder is not unique to React. Every <strong>node</strong> project including <a href="https://angular.io/"><strong>Angular</strong></a> and <a href="https://expressjs.com/"><strong>Express JS</strong></a><strong> </strong>have this folder. Remember when we installed <strong>node</strong> before we could start creating React Apps on <a href="https://medium.com/@divinedela.dd/react-3030-episode-1-db3fb58fd34d"><strong>day 1</strong></a> of <strong>React 3030</strong>?</p><p>The <strong>node_modules</strong> folder contains <strong><em>third party libraries </em></strong>together with react itself. Third party libraries are libraries (with specific functionality) that have been developed by other people beside ourselves or the company we work for. When writing code, we usually depend on one or more third party libraries so we do not have to build every functionality from scratch. This is why these third party libraries are popularly referred to as the <strong><em>dependencies </em></strong>of a project.</p><p>To install any of these node libraries (aka packages), we run from the terminal the command <strong>npm instal</strong>l <strong><em>package</em></strong><em> </em>or <strong>yarn install <em>package</em></strong><em> </em>depending on whether we use <a href="https://www.npmjs.com/"><strong>npm</strong></a> or <a href="https://yarnpkg.com/en/"><strong>yarn</strong></a> to manage these dependencies. We replace <strong><em>package </em></strong>in these commands with the name of the package we want to install.</p><p>As I mentioned earlier, React library itself is also found in the <strong>node_modules </strong>folder.</p><p><strong>Public Folder</strong></p><p>The<strong> public</strong> folder contains <strong>index.html</strong>, the <strong>favicon</strong>, <strong>manifest.json</strong> and React <strong>logo</strong> image files. These files are known as the <strong>public assets</strong> of the app. The output of this html file is what is displayed in the browser when you run the app. Every data that you see in the browser is displayed using this single html file.</p><p>The manifest.json file contains <a href="https://en.wikipedia.org/wiki/Metadata"><strong>metadata</strong></a><strong> </strong>about our application.</p><p><strong>Src Folder</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*EK9miM2TJyKjy4pB" /></figure><p>There are several files in the src folder. We will pay attention to only a few of them for now.</p><p>The App.js file contains the code behind the header that we see in the browser. If we make changes to the App.js file, what we see in the browser is updated. The App.css file contains CSS styling for App.js . The index.css is the global css file — it handles styling for the whole application.</p><p>In index.js, tells react which portion in the index.html file react should update dynamically.</p><p>Outside of the folders we’ve looked at, there are four files: <strong>package.json</strong>, <strong>package-lock.json, Readme.md and .gitignore.</strong></p><p><strong>.gitignore</strong></p><p>When we write code, we usually add it to a <strong>version control system </strong>such as git. When we commit our code to git, there are files and folders we do not want git to keep track of. The <strong>node_modules </strong>folder is an example. We also do not want to commit files which contain sensitive information such as passwords or <strong>api</strong> keys to git.</p><p>We register these files and folders in <strong>.gitignore</strong> file so git skips them when it tracks changes to our files.</p><p><strong>Readme.md</strong></p><p>This is a text file that introduces and explains what your project is about. It is a very important file because on <a href="https://github.com/">Github</a> (same on <a href="https://bitbucket.org/product/">bitbucket</a> and others), it is the first file people read to understand the goal of your project. You would typically also add in this <strong>Readme.md </strong>file, the steps a person should follow to run your app on their computer.</p><p>Thanks for staying with me through day2.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5850418ddf85" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[React 3030 — Episode 1]]></title>
            <link>https://divinedela.medium.com/react-3030-episode-1-db3fb58fd34d?source=rss-7aaec1f2b5fa------2</link>
            <guid isPermaLink="false">https://medium.com/p/db3fb58fd34d</guid>
            <category><![CDATA[beginner-tutorial]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[reactjs]]></category>
            <category><![CDATA[react]]></category>
            <dc:creator><![CDATA[divine dela]]></dc:creator>
            <pubDate>Fri, 17 Jan 2020 22:52:54 GMT</pubDate>
            <atom:updated>2020-01-17T22:58:58.066Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>React 3030 — Episode 1</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y6C4nSvy2Woe0m7bWEn4BA.png" /></figure><p>I decided to spend 30 minutes every day for 30 days to learn React. I nicknamed this project <strong>React 3030</strong>. These are things I accomplished on day 1.</p><p>React is a JavaScript library used for building user interfaces. React was developed by Facebook.</p><p>In <a href="https://medium.com/@divinedela.dd/the-complete-absolute-beginners-guide-to-software-development-e6db8056c009"><em>another medium article</em></a>, I explain how most modern web apps have 2 parts: frontend and backend. The backend, also known as the “server side” is like the “engine” of the app. It handles the application logic, database connections, authentication and authorization, among other things.This backend is hidden from the users of the app.</p><p>The front end (also known as the User Interface or UI) is the part of a web app that the user sees and interacts with. Login forms, menus, tables, chat boxes, etc are all found on the front end. The three most popular technologies for building front ends in 2020 are React, Angular and Vue.Js.</p><p><strong>USES OF REACT</strong></p><p>As I have already mentioned, React can be used for building Web App front ends. The type of web app front ends we build with React (same with Angular and Vue.Js) are called Single Page Applications (SPAs). With SPAs, when data needs to be updated on a page, the contents of the page are updated without a page refresh. SPAs are fast and responsive leading to a great User Experience.</p><p>Your React knowledge can also be used in building native mobile applications for both Android and IOS platforms using React Native, a “sister technology” to React.</p><p><strong>WHO USES REACT</strong></p><p>Many companies from startups to very large tech businesses use React. Facebook, Netflix, Airbnb and Uber are some of the big names using React.</p><p><strong>PREREQUISITES FOR LEARNING REACT</strong></p><p>Because React is a JavaScript library, JavaScript is required to understand and build apps with React. You do not need to be an expert but the better understanding of JavaScript you have, the easier React would make sense to you.</p><p>You should also have some experience with HTML and CSS since these are the <em>foundations</em> of web technology.</p><p><strong>WHO AM I and WHAT IS REACT 3030</strong></p><p>I am a full stack Web and Mobile Apps Developer currently based in Accra, Ghana. I decided to spend 30 minutes every day for 30 days. I nicknamed this project <strong>React 3030</strong>.</p><p>I have <strong>zero experience</strong> writing code with React Js, although I have seen React code online and on my friends’ computers. I however have experience using Angular to build front end apps. Some of my other favorite technologies are Flutter, Express Js and ASP.NET Core.</p><p><strong>INSTALLATION AND SET UP</strong></p><p>In order to use React you’ll need to make sure you have nodejs installed.</p><p>Open your terminal and type the command <strong>node — version and </strong>press Enter. Do the same for the command <strong>npm — version.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uLFN-f6i3VfS84vk2w4E6g.png" /><figcaption>checking the versions of node and npm on a computer using the terminal</figcaption></figure><p>You should have Node version 8.10 or greater and npm version 5.6 or greater installed on your computer, as shown in the image above. If not, go to <a href="https://nodejs.org/en/">Node Js website </a>to download and install node on your computer. You should then have the latest versions of node and npm.</p><p>You can read more about nodejs by visiting their <a href="https://nodejs.org/en/">website</a>.</p><p><strong>CREATE REACT APP</strong></p><p>There are different ways to start a react project, the simplest being to use <strong>Create React App</strong>.</p><p>After the node stuff is taken care of, you’ll need a text editor. I recommend<a href="https://code.visualstudio.com/"> VS Code</a> .</p><p>Go to the terminal (or command prompt on windows) and type the command <strong>npx create-react-app react-30-30. </strong>Replace <em>react-30-30 </em>with the name of your app. This takes a while to create a react project. Watch the terminal. As soon as the installation is complete, you’ll see a message in your terminal which says <strong>“Success!”…..”Happy Hacking”</strong>.</p><p>Still in the terminal, type <strong>cd react-30–30 </strong>(replace react-30–30 with the name of your project) to navigate into the project . Then type<strong> </strong>command<strong> code . </strong>.Make sure to add the period at the end of the command. This will open your project in VS Code.</p><p>Or you could also simply open VS Code and Choose <strong>File </strong>then <strong>Open Folder </strong>and open the newly created project.</p><p><strong>FOLDER STRUCTURE</strong></p><p>A react project has a well defined project structure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*l66FqhaIY33koZQE" /><figcaption>React Project Folder structure</figcaption></figure><p>Like every node project, there is a <strong>package.json</strong> file. There’s a<strong> src </strong>folder where we’ll add the code we write. There’s also a<strong> public folder</strong> which contains the html file that is displayed in our browser. We will take a further look at the files and folders in the upcoming days.</p><p><strong>STARTING THE APP</strong></p><p>To start the app and have it appear in our browser, open the terminal in VS Code or use the terminal on your computer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*kBjcN9TJ09fg7oQZ" /><figcaption>Opening the terminal in VS Code</figcaption></figure><p>Run <strong>npm start </strong>command on your terminal. This will start the react app.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*XWWs4h3EffMLWpWo" /><figcaption>Running the command to start a react project</figcaption></figure><p>The <strong>npm start </strong>command is found in <strong>scripts</strong> section of the <strong>package.json </strong>file<strong>.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*H3AUiTRPVGDPQdH2" /><figcaption>package.json</figcaption></figure><p>The scripts section of this file allows us to define “shortcuts” to different commands that react understands. As an example, when you run the npm <strong>start</strong> command, behind the scenes, the <strong>reacts-scripts start </strong>command is run for you. We’ll run the other scripts for different purposes later.</p><p>After running the <strong>npm start </strong>command, you should see this in your browser.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*7NVyK4tcapZtn1F1" /><figcaption>React project served in the browser</figcaption></figure><p>Congratulations! Our first react app has been started.</p><p><strong>WRITING OUR FIRST LINES OF REACT CODE</strong></p><p>In the <strong>src </strong>folder<strong>, </strong>there’s a file called App.js. Open this file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*-5FMRNO1hPH_xAgK" /><figcaption>App.js file</figcaption></figure><p>This is currently, the file whose contents is displayed in the browser. We’ll make some changes and look at how it affects our app. I made changes on lines 9 and 11.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Ram_zVymIgK7i9bs" /><figcaption>Updated App.js file (lines 9 and 11 have been changed)</figcaption></figure><p>The changes were immediately reflected in the browser because of react’s “hot reload” feature. This feature makes sure I do not need to stop and rerun the <strong>start</strong> command anytime I make changes to my code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*IqiCdIBP1XNT0qFG" /><figcaption>Result of updating App.js file</figcaption></figure><p>I then went ahead to commit my changes with Git, created a github repository and pushed my code to the remote repository. The<strong> React 3030</strong> github repository can be found <a href="https://github.com/divinedela/react-30-30">here</a></p><p>If you don’t understand Git and Github, you could find out more <a href="https://git-scm.com/">here</a> and<a href="https://github.com/"> here</a>.</p><p>And that’s it for day 1.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=db3fb58fd34d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Beginner’s guide to picking your first programming language]]></title>
            <link>https://divinedela.medium.com/a-beginners-guide-to-picking-your-first-programming-language-3a77605ba9f5?source=rss-7aaec1f2b5fa------2</link>
            <guid isPermaLink="false">https://medium.com/p/3a77605ba9f5</guid>
            <category><![CDATA[is-coding-difficult]]></category>
            <category><![CDATA[first-language]]></category>
            <category><![CDATA[beginner]]></category>
            <category><![CDATA[learning-path]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[divine dela]]></dc:creator>
            <pubDate>Wed, 21 Aug 2019 14:57:13 GMT</pubDate>
            <atom:updated>2019-08-21T19:10:27.298Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JiGhOFQ2Sgq6KnYTGHA7Fw.jpeg" /></figure><p>The fact that there are many languages can make the path to becoming a software developer very confusing to a beginner. When you go online or read books, you’re faced with several of these languages: Java, JavaScript, c++, Go, Dart, Python, Ruby, C#, PHP and the list goes on.</p><p>Someone might ask “ Do I need to know how to write code in all these languages?” “Should I pick one, two or three languages when I start learning to code?”.</p><p>The fact is, most software developers can write code in more than one language. They however started by first mastering one language and then learnt to code in another. Mastering one language first makes it easier for you to learn a new one in a shorter amount of time because<strong> many concepts and principles are similar across programming languages. </strong>From a human scenario, a person who speaks the English Language and wants to learn spanish knows the basic things to expect in Spanish. For example, the person would naturally start by asking how to say something as simple as “Good morning” in Spanish.</p><p>There are different factors that a beginner should consider in choosing his/her first programming language:</p><ol><li><strong>What type of apps you want to build</strong></li></ol><p><strong>Your choice of first programming language depends largely on what type of application you would like to build</strong>. If you want to build a mobile app, you could use either Dart, JavaScript, Java, Swift, Objective C, Kotlin, C#.</p><p>We discussed the difference between Front-End and Back-End of a web application in a<em> </em><a href="https://medium.com/@divinedela.dd/the-complete-absolute-beginners-guide-to-software-development-e6db8056c009"><em>previous article</em></a>.</p><p>If you want to build a web app front end, you must learn HTML, CSS and Javascript. Someone might wonder “Does this not contradict the earlier recommendation to first learn one programming language?” Not really. Technically, HTML and CSS are not programming languages. HTML and CSS help you define different parts of your web page, add content and style.</p><p>If you want to build a web app backend, you could learn either Javascript, Python, C#, Java, PHP, Ruby or several other languages that are suitable for backend development.</p><p>The image below shows you the different possible paths you could take in learning to code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T4fWq7PL3rnZu7E0RevFTQ.jpeg" /></figure><p><strong>2. Beginner-friendliness of a language</strong></p><p>Every programming language has a syntax. You could think of the syntax as the grammatical rules a person needs to follow in writing a program that the computer can properly understand and execute.</p><p>The syntax of certain programming languages are more difficult to master than that of others. As a result certain programming languages can be more difficult to learn.</p><p>For a beginner, it is advisable to pick a language with an easy to follow syntax.Two languages that are very popular for having beginner-friendly syntax are Python and JavaScript.</p><p><strong>3. Job Market</strong></p><p>Another factor that could influence your choice of first programming language is the job market. If you want to get a job in your local area, you’ll need to find out what programming languages are in demand by employers in your area. A google search on software developer jobs in your city can guide you in choosing your first programming language.</p><p>Once you consider these factors and make up your mind, get ready to embark on this great coding journey<strong><em>.</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3a77605ba9f5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Complete Absolute Beginners’ Guide to Software Development]]></title>
            <link>https://divinedela.medium.com/the-complete-absolute-beginners-guide-to-software-development-e6db8056c009?source=rss-7aaec1f2b5fa------2</link>
            <guid isPermaLink="false">https://medium.com/p/e6db8056c009</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[beginners-guide]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[novice]]></category>
            <dc:creator><![CDATA[divine dela]]></dc:creator>
            <pubDate>Wed, 17 Jul 2019 19:43:30 GMT</pubDate>
            <atom:updated>2019-07-17T19:43:30.836Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K54PJJ6bXX8fmg_NBzOVOQ.jpeg" /></figure><p>A Software developer is someone who creates Computer Software. Most people use at least one or more software daily, some of the commonest being WhatsApp, Netflix, Google search engine, Microsoft Word, Windows Operating System.</p><p>A Software developer writes special instructions for computers to process using what is known as a programming language. Like Human languages allow human beings to communicate with one another, a programming language allows a software developer to tell the computer what to do. Examples of programming languages are PHP, Javascript, Java, C, C++, C#, Dart, Python, and Go.</p><p>These instructions could take various forms such as what should happen when a user double taps a like button on Instagram, or what should happen when a user hits the send button on WhatsApp.</p><p>Most software developers these days build one of the following three types of software: Mobile Apps, Web Apps and Desktop Apps, with Mobile and Web App developer jobs being the commonest.</p><p><strong>Mobile Applications</strong></p><p>Mobile applications are what most people call “apps”. They are software that run on mobile devices. Examples include WhatsApp, snapchat, Instagram, and Tinder. Many of these apps also have Web App versions.</p><p><strong>Web Applications</strong></p><p>A web application or Web App is a software that runs in the browser (e.g Microsoft Edge, Google Chrome, Safari). Facebook on the web is an example as well as the Google search engine on the web.Many web applications involve you registering after which an account is created for you. You can then log in to the Web App from any computer as long as you are connected to the internet.</p><p><strong>Desktop Applications</strong></p><p>Desktop applications are designed to run on the computer. You typically use them by installing a file on your computer. Unlike web applications, when you need to use a desktop app on a different computer, you will need to install the app on the other computer too. Microsoft Word is an example of a desktop application.</p><p><strong>Software Developer Roles</strong></p><ol><li>Front-end developer</li><li>Back-end developer</li><li>Mobile app developer</li></ol><p>Both Front-end and Back-end developers are actually web app developers who have different roles. These two roles are necessary because of how modern web apps are designed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dpBt22DkOVdyVS_SLSmMzQ.jpeg" /></figure><p><strong>Front End Developer</strong></p><p>A front end developer is a web developer who uses HTML, CSS, and Javascript to build the front end aka client-side of a web application. This is the part of the app that is visible to the end-user. End users are able to interact with the Web App from the front end.</p><p><strong>Back End Developer</strong></p><p>A Back-end developer builds the back-end or server-side of a web application. Every web app has a part that is hidden from the end-user. You could think of this hidden part as the powerhouse or brain behind all the functionality you love on the front end.</p><p>Developers with this role handle the business logic and securely storing and retrieving data for the front end. A Back-end developer could use Javascript, Java, C#, PHP, Python, and other languages to develop the back-end of a Web App.</p><p><strong>Full-Stack Developer</strong></p><p>A full-stack developer is someone who has the expertise to build both the front end and back end of a web application. A Fullstack developer usually starts out as either a front-end or back-end developer and later learns the necessary technologies to become a full stack developer.</p><p><strong>Mobile Apps Developer</strong></p><p>Mobile apps developers build mobile apps. Some of the commonest programming languages used by these type of developers are Java, Kotlin, Objective C, Swift, Dart and JavaScript.</p><p><strong>What Tools do you need to become a software developer</strong>?</p><ol><li>Working computer</li><li>Code editor — A special text editor program for writing code. A great example is <a href="https://code.visualstudio.com/">VS Code</a> — works with a lot of programming languages.</li><li>Stable internet connection (optional but highly recommended).</li></ol><p>In a next post we’ll take a look at what a learning path from complete beginner to a professional looks like.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e6db8056c009" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>