<?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 Arnold Asiimwe on Medium]]></title>
        <description><![CDATA[Stories by Arnold Asiimwe on Medium]]></description>
        <link>https://medium.com/@asiimwearnold25?source=rss-543f9c4ef2a1------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*LpSz_Xy9KiDZ8vDL</url>
            <title>Stories by Arnold Asiimwe on Medium</title>
            <link>https://medium.com/@asiimwearnold25?source=rss-543f9c4ef2a1------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 16 Nov 2026 22:25:54 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@asiimwearnold25/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[Have you wondered what a back-end engineer does, what tools do they use, in this course we a going…]]></title>
            <link>https://medium.com/@asiimwearnold25/have-you-wondered-what-a-back-end-engineer-does-what-tools-do-they-use-in-this-course-we-a-going-ab649685544?source=rss-543f9c4ef2a1------2</link>
            <guid isPermaLink="false">https://medium.com/p/ab649685544</guid>
            <category><![CDATA[sign-out]]></category>
            <category><![CDATA[node-js-tutorial]]></category>
            <category><![CDATA[sign-in]]></category>
            <category><![CDATA[jwt-authentication]]></category>
            <dc:creator><![CDATA[Arnold Asiimwe]]></dc:creator>
            <pubDate>Fri, 16 Jul 2021 04:57:08 GMT</pubDate>
            <atom:updated>2021-07-17T22:08:51.050Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hNARMY0J9lCWy3QFb08mGw.png" /></figure><p>Have you wondered what a back-end engineer does, what tools do they use, in this course we a going to delve a little bit deeper and become backend engineers practically? Why spend months learning and forgetting. So, let&#39;s take a leap and just do back-end work.</p><p>In this tutorial, we a going to understand one of the most common roles the back-end developer executes from time to time. We intend to learn about backend roles by stepping into the shoes of one. If you are in this course let&#39;s become.</p><p><strong>How the back-end works in a simplified way for most web-based applications.</strong></p><ul><li>The backend server receives a request from the front end.</li><li>Based on that request, the server performs actions with database records.</li><li>The server prepares and sends a response to the front end.</li><li>The front end decides how to display the response to the user.</li></ul><p><strong>We a going to take the following as our tools of work.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/595/1*TZwJjACm0nmkysoU1sAIQQ.png" /><figcaption>Figure 1 requirements</figcaption></figure><p><strong>Assumptions</strong></p><p>· This tutorial assumes that you have not worked with JWT to implement Auth in the node stack</p><p>· We also assume that you have a basic understanding of the NodeJS modules and an intermediate command of the JavaScript language.</p><p><strong>What are we going to be Implementing?</strong></p><p>The use of JWT in a node stack and python stack to register (signup), login, and logout (authentication)</p><p>NB: JWT stands for (json web token)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/612/1*VjGx5KtMnIl1L09ymgHV0Q.png" /><figcaption>Figure 1.1 tasks to accomplish</figcaption></figure><p><strong>Let the games begin:</strong></p><p>Let’s start with installing node packages we a likely to use and understand the purpose of each package. In order to implement a simple backend, we a going to take advantage of Node, Express, and MongoDB.</p><ol><li><strong>what is NodeJS?</strong></li></ol><blockquote>Node.js is an open-source, cross-platform, back-end JavaScript runtime environment that runs on the V8 engine and executes JavaScript code outside a web browser, and it&#39;s basically used for building server-side or desktop applications.</blockquote><blockquote>Before NodeJS, executing JavaScript code used to be possible only in the browser, and if we wanted to develop a desktop application or server-side scripts one had to use high-level programming languages like <strong>C#, C++ and java, python and PHP.</strong></blockquote><p>NB: JavaScript was only performant in the browser.</p><p><strong>To clearly understand NODE, let&#39;s make use of the NodeJS documentation:</strong></p><p>Node “uses an event-driven, non-blocking I/O model.” In practice, this means that Node is built well to handle asynchronous JavaScript code to perform many asynchronous activities such as <strong>reading </strong>and <strong>writing </strong>to the file system, <strong>handling connections to database servers</strong>, or <strong>handling requests as a web server</strong>.</p><blockquote>To handle asynchronous code, Node uses a <strong>callback-based system</strong>. Node functions and methods that will implement some asynchronous activity take a callback function. This callback will be called whenever the asynchronous operation has been resolved. By convention, the first argument of this callback is an error placeholder. If an error occurred in the asynchronous operation occurred (trying to read a non-existent file, for example), the error argument will be an Error object, but it will be null if no error occurs.</blockquote><p><strong>2. What is ExpressJs?</strong></p><p>It has been called the de-facto standard server framework for Node.js that provides a robust set of features to develop web and mobile applications. Some features offered by express</p><blockquote>· Allows to set up middleware to respond to HTTP Requests.</blockquote><blockquote>· Defines a routing table that is used to perform different actions based on HTTP Method and URL.</blockquote><blockquote>.Allows to dynamically render HTML Pages based on passing arguments to templates.</blockquote><p><strong>In order to make proficient use of Express Js, we shall make use of the following packages alongside it.</strong></p><blockquote><strong>body-parser</strong> − This is a node.js middleware for handling JSON, Raw, Text and URL encoded form data.</blockquote><blockquote><strong>cookie-parser</strong> − Parse Cookie header and populate req.cookies with an object keyed by the cookie names.</blockquote><blockquote><strong>Multer</strong> − This is a node.js middleware for handling multipart/form-data</blockquote><p><strong>3.</strong> <strong>MongoDB: </strong>Mongo DB is an open-source NoSQL database that is written in C++ and it is used to create and deploy a highly scalable and performance-oriented database</p><blockquote><strong>Note:</strong> At the end of this journey, we would have created a completed backend will be a standalone server-side application that can handle HTTP requests to create a user, list all users, and view, update, or delete a user in the database while taking user authentication and authorization into consideration.</blockquote><p>As we move forward, one has to understand back-end components, the question then is formed around what a component is and how we can define it. Well, a component can be referred to as an independent functionality in an application</p><p><strong>The user model:</strong> The user model will define the user details to be stored in the MongoDB database, and also handle user-related business logic such as password encryption and user data validation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*UBMPKrkYf7iBVF0mqZfw5g.png" /><figcaption><strong>Figure 3.0 user model</strong></figcaption></figure><p><strong>NB: </strong>When we build applications by extending this skeleton, we can add more fields as required. But starting with these fields will be enough to identify unique user accounts, and also for implementing user CRUD operation-related features.</p><p><strong>The API endpoints for user CRUD: </strong>To enable and handle user CRUD operations on the user database, the backend will implement and expose API endpoints that the frontend can utilize in the views, as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*C7BS61LBuD3Cr0bxswtMJA.png" /><figcaption><strong>Figure 3.1 API endpoints for user CRUDE</strong></figcaption></figure><p>Some of these user CRUD operations will have protected access, which will require the requesting client to be authenticated, authorized, or both, as defined by the feature specifications. The last two routes in the table are for authentication and will allow the user to <strong>sign-in and sign-out.</strong> We will use the <strong>JWT</strong> mechanism to implement these authentication features.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/453/1*IzLHTi1Iz9h7qGlFewSYkQ.png" /><figcaption><strong>Figure 4.0 How JWTworks behind the scenes</strong></figcaption></figure><blockquote><strong>NB:</strong> In the above illustration, the browser represents the client just to be clear and exact. Initially, when a user signs in using their credentials, the server-side generates a JWT signed with a secret key and a unique user detail. Then, this token is returned to the requesting client to be saved locally either in <strong>localStorage</strong>, <strong>sessionStorage,</strong> or a cookie in the browser, essentially handing over the responsibility for maintaining the user state to the client-side.</blockquote><blockquote>For HTTP requests that are made following a successful sign-in, especially requests for API endpoints that are protected and have restricted access, the client-side has to attach this token to the request. More specifically, the JSON Web Token must be included in the request Authorization header as a Bearer:</blockquote><blockquote><strong>Authorization: Bearer &lt;JSON Web Token&gt;</strong></blockquote><blockquote>When the server receives a request for a protected API endpoint, it checks the Authorization header of the request for a valid JWT, then verifies the signature to identify the sender and ensures the request data was not corrupted. If the token is valid, the requesting client is given access to the associated operation or resource; otherwise, an authorization error is returned.</blockquote><blockquote>when a user signs in with their email and password, the backend will generate a signed JWT with the user’s ID and with a secret key that’s available only on the server. This token will then be required for verification when a user tries to view any user profiles, update their account details, or delete their user account.</blockquote><p><strong>The folder structure of our application will take the following shape and form, feel free to change things up to suit your taste but before taking your own path make sure you rely to understand the inner working of the file and module structure.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/465/1*MleCfodc9EjUdEMRmftJVg.png" /><figcaption>Figure 5.0 folder structure of our back-end</figcaption></figure><p><strong>Development dependencies</strong></p><p>In order to begin the development process and run the backend server code, we will configure and install Babel, Webpack, and Nodemon. Preparing the Development Environment, and make some minor adjustments to the backend.</p><p><strong>Babel</strong></p><p>Since we will be using ES6+ and the latest JS features in the backend code, we will install and configure Babel modules to convert ES6+ into older versions of JS so that it’s compatible with the Node version being used.</p><p><strong>Installation</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/672/1*sO4ORb2TiLBV6ZTE0qI6xA.png" /><figcaption>Figure 6.0 installation the barbel.rc</figcaption></figure><p>First, we’ll configure Babel in the. babel.rc file with presets for the latest JS features and specify the current version of Node as the target environment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/671/1*rHvLQ7tLY9UtlRo76S-dkw.png" /><figcaption>Figure 6.1 configuration in the barbel.rc</figcaption></figure><p><strong>Webpack</strong></p><p>We will need Webpack to compile and bundle the server-side code using Babel. For configuration, we can use the same webpack.config.server.js</p><p><strong>Preparing the Development Environment</strong></p><p>From the command line, run the following command to install webpack, webpackcli, and the webpack-node-externals module:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/733/1*0vvcRCowJ3DiPYTnjmq3zg.png" /><figcaption>Figure 6.2 configuration in the barbel.rc</figcaption></figure><p>This will install the Webpack modules and update the package.json file.</p><p><strong>Nodemon</strong></p><p>To automatically restart the Node server as we update our code during development, we will use Nodemon to monitor the server code for changes.</p><p>Before we add run scripts to start developing and running the backend code, we will define configuration variables for values that are used across the backend implementation.</p><p><strong>Config variables</strong></p><p>In the <strong>config/config.js file</strong>, we will define some server-side configuration-related variables that will be used in the code but should not be hardcoded as a best practice, as well as for security purposes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/747/1*O6vhEJb3V4oD2KGFB3c6_A.png" /></figure><p>The config variables that were defined are as follows:</p><blockquote><strong>env:</strong> To differentiate between development and production modes</blockquote><blockquote>port: To define the listening port for the server</blockquote><blockquote>jwtSecret: The secret key to be used to sign JWT</blockquote><blockquote>mongoUri: The location of the MongoDB database instance for the project</blockquote><p>These variables will give us the flexibility to change values from a single file and use it across the backend code. Next, we will add the run scripts, which will allow us to run and debug the backend implementation.</p><p><strong>installation of Express</strong></p><p>Run the following code in you VScode Terminal</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/583/1*LhAI8OMG90lbdD_tAf8Sgw.png" /></figure><p><strong>Configuring Express</strong></p><p>To use Express, we will install it and then add and configure it in the server/express.js file.</p><p><strong>Once Express has been installed</strong>, we can import it into the express.js file, configure it as required, and make it available to the rest of the app.</p><p>To handle HTTP requests and serve responses properly, we will use the following modules to configure Express:</p><p><strong>body-parser:</strong> Request body-parsing middleware to handle the complexities of parsing streamable request objects so that we can simplify browser-server communication by exchanging JSON in the request body.</p><p>To install the module, <strong>npm install body-parser — save-dev</strong> from the command line. Then, configure the Express app with <strong>bodyParser.json()</strong> and <strong>bodyParser.urlencoded({ extended:true }).</strong></p><p><strong>cookie-parser:</strong> Cookie parsing middleware to parse and set cookies in request objects. To install the cookie-parser module, <strong>npm install cookie-parser — save-dev </strong>from the command line.</p><p><strong>compression:</strong> Compression middleware that will attempt to compress response bodies for all requests that traverse through the middleware. To install the compression module, <strong>npm install compression — save-dev</strong> from the command line.</p><p><strong>helmet:</strong> Collection of middleware functions to help secure Express apps by setting various HTTP headers. To install the helmet module,<strong> npm install helmet — save-dev</strong> from the command line.</p><p><strong>cors:</strong> Middleware to enable cross-origin resource sharing (CORS). To install the cors module, <strong>run npm install cors — save-dev </strong>from the command line.</p><p>After the preceding modules have been installed, we can update express.js to import these modules and configure the Express app before exporting it for use in the rest of the <strong>server code.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/749/1*FUIPvXKDJ_-DqTnhryzamA.png" /></figure><p>The Express app can now accept and process information from incoming HTTP requests, for which we first need to start a server using this app.</p><p><strong>Starting the server</strong></p><p>we can run <strong>npm developmen</strong>t from the command line. If the code has no errors, the server should start running with Nodemon monitoring for code changes. Next, we will update this server code to integrate the database connection.</p><h3><strong>Setting up Mongoose and connecting to MongoDB</strong></h3><p>We will be using the mongoose module to implement the user model in this skeleton, as well as all future data models for our MERN applications. Here, we will start by configuring Mongoose and utilizing it to define a connection with the MongoDB database.</p><blockquote><strong>First</strong>, to install the mongoose module, run the following command:</blockquote><p><strong>npm install mongoose — save-dev</strong></p><blockquote>Then, <strong>update the server.js file to import the mongoose module</strong>, configure it so that it uses native ES6 promises, and finally use it to handle the connection to the MongoDB database for the project.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/743/1*ohkpRNy1CTRlKs67Op8ikw.png" /></figure><p><strong>Mongoose is a MongoDB object modeling tool</strong> that provides a <strong>schema-based solution to model application data</strong>. It includes built-in<strong> type casting,</strong> <strong>validation</strong>, <strong>query building</strong>, and <strong>business logic hooks.</strong></p><p>Using <strong>Mongoose</strong> with this backend stack provides a higher layer over MongoDB with more functionality, including mapping object models to database documents. This makes it simpler and more productive to develop with a Node and MongoDB backend. To learn more about Mongoose, visit mongoosejs.com.</p><p><strong>If you like what you have read so far, inbox me a 1$ and get a special link to the continuation…………..thank you for your support!!</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ab649685544" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Top 10 Technologies to get into 2021]]></title>
            <link>https://medium.com/@asiimwearnold25/top-10-technologies-to-get-into-2021-fd522c55aa52?source=rss-543f9c4ef2a1------2</link>
            <guid isPermaLink="false">https://medium.com/p/fd522c55aa52</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Arnold Asiimwe]]></dc:creator>
            <pubDate>Sat, 10 Jul 2021 10:25:31 GMT</pubDate>
            <atom:updated>2021-07-11T04:57:25.444Z</atom:updated>
            <content:encoded><![CDATA[<p>this is inspired by the influx of technologies new engineers struggle with and at the end of it all, they cant easily find a placement or get hired at the top fortune 100. I will be taking you through how to ace your interviews and land yourself a 6 figure Job</p><p><strong>DevOps</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EBXc9eJ1YRFLtkNI_djaAw.png" /></figure><p>Every project needs a DevOps Engineer, to better understand this paradigm, imagine life without rules. the chaos, constantly being unaware of where you are in the project lifecycle. this is where DevOps comes in to add structure, organization, standards, and workflow to any project.</p><p><strong>Cloud Computing</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/469/1*MelnhMF5tq6GSf2LBTmToQ.png" /></figure><p>This an interesting area in the field of software engineering, we all use computing of some kind. we have used it for different reasons like storing data on an external, backed up files on a thumb drive. So we define Cloud computing as the delivery of different services through the Internet. These resources include tools and applications like data storage, servers, databases, networking, and software.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fd522c55aa52" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>