<?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: mishmishel</title>
    <description>The latest articles on DEV Community by mishmishel (@mishmishel).</description>
    <link>https://dev.to/mishmishel</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%2F1096391%2F4cdf877e-c943-4fb3-9936-e99ee432e6fe.JPG</url>
      <title>DEV Community: mishmishel</title>
      <link>https://dev.to/mishmishel</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mishmishel"/>
    <language>en</language>
    <item>
      <title>My Ruby on Rails Application</title>
      <dc:creator>mishmishel</dc:creator>
      <pubDate>Sat, 23 Dec 2023 08:23:28 +0000</pubDate>
      <link>https://dev.to/mishmishel/my-ruby-on-rails-application-2llj</link>
      <guid>https://dev.to/mishmishel/my-ruby-on-rails-application-2llj</guid>
      <description>&lt;p&gt;Over the past couple weeks I have been working on creating a Ruby on Rails application. It was definitely a great learning opportunity and I am so grateful for the amount of things I have learned whilst creating this project. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Beginning the Project&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I decided that I had wanted to created an application that I would be able to utilise as the backend for my Phase 5 project (a full stack web application). I already had some ideas as to what I would like to create in the Phase 5 stage of the course so I decided that the best course of action would be to create a backend I would actually be able to utilise later in the course. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Idea&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I decided to combine my interests by coding a Street Dance event management application. I decided upon this as it would be something I could be proud of as it is the perfect joining between Street Dance (a hobby of mine) and Software Development. As well as that, it could be something my community in the Street Dance scene could utilise. To outline my idea: the Street Dance event management application would allow dancers to see events (such as battles and jams) in Sydney, express their interest, or create events of their own. It would include some other features as well such as searching events by dance style, commenting on events, joining events etc. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Challenges&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Since this project was for an assignment, I had to meet a lot of requirements to ensure my application met the set out parameters - this was definitely a challenge for me. Firstly, it had to use the Ruby on Rails framework (obviously) but reading the rest of requirements made me feel quite overwhelmed. To combat this challenge, I tried to work on each requirement one by one to ensure I was meeting the project requirements. However, I still submitted the assignment without meeting the user authentication requirements due to time constraint and so currently, users only login via their username:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--GLfiO0X8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sf74gx0dl3j0m9srsm4g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--GLfiO0X8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sf74gx0dl3j0m9srsm4g.png" alt="Image description" width="800" height="194"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Obviously, I am quite upset at the fact that I wasn't able to meet all the project requirements by the due date, however, I am confident that I will be able to get these features up in running soon!&lt;/p&gt;

&lt;p&gt;Another issue I had encountered was the fact that I didn't create all my models in the beginning and instead created them one by one as I required them. This was an issue as it made it harder to wrap my head around the different relationships I wanted each model to have with one another and so it definitely took more mental effort to decipher what I originally wanted to do. However, after some work and a discussion with my mentor, I was able to establish the relationships between various models and get the application working as expected!&lt;/p&gt;

&lt;p&gt;Some of my models and their relationships:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Z3Cvgwm8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/151asc39p8xj9t7ieqk3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Z3Cvgwm8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/151asc39p8xj9t7ieqk3.png" alt="Image description" width="758" height="188"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5_H_TGLr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/n1y7gtig4bvh1v3p5dy6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5_H_TGLr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/n1y7gtig4bvh1v3p5dy6.png" alt="Image description" width="800" height="112"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--lMYAsZSh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k1udmehda07380g5wqjx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--lMYAsZSh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k1udmehda07380g5wqjx.png" alt="Image description" width="758" height="186"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;My Favourite Part&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;My favourite part was definitely working on the routes. Whilst I was working on the routes, I was rewatching previous lectures where my mentor discussed how to create them and where each route leads. I definitely enjoyed creating every single route and being able to observe how my application was becoming more cohesive with each coding session. I definitely became more excited with each route I created!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--tjOkC8PK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nvida279krexs8anr9lj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tjOkC8PK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nvida279krexs8anr9lj.png" alt="Image description" width="800" height="591"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Overall, working on this application has definitely made me excited to learn more about software development and to be able to create a full stack web application over the Summer! It finally feels as though I am getting better!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Reflecting on my first CLI Application</title>
      <dc:creator>mishmishel</dc:creator>
      <pubDate>Sat, 28 Oct 2023 01:43:22 +0000</pubDate>
      <link>https://dev.to/mishmishel/reflecting-on-my-first-cli-application-49cb</link>
      <guid>https://dev.to/mishmishel/reflecting-on-my-first-cli-application-49cb</guid>
      <description>&lt;p&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Over the past few weeks, I have had the pleasure of diving into the world of Ruby and CLI Applications in Ruby. All my previous efforts in studying and working with Ruby have allowed me to create my first ever CLI Application. &lt;/p&gt;

&lt;p&gt;Everyone who begins learning software development wants to create applications that are useful and can benefit the average person. This is why when I was tasked with creating a CLI Application for my Phase 3 Project, I decided to create an application that I and my friends would benefit from. The result? A CLI Application in which users can easily find meanings of words as well as their synonyms. A dictionary helper, if you will.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Requirements&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The requirements for my Phase-3 Project were: &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Provide a CLI&lt;/li&gt;
&lt;li&gt;Your CLI must provide access to data from a web page&lt;/li&gt;
&lt;li&gt;The data provided must go at least one level deep&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;These requirements are quite versatile and I appreciated the fact that I could make a wide variety of different applications with these requirements. My first step was to come up with an idea that would check all the requirements!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;My Idea&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In the last lesson of Phase 3, my teacher provided us with an excellent example of a CLI Application: A Pokedex App. I drew inspiration from his app in which he utilised a Pokedex API to allow users to search for Pokemons and catch them. I decided to create a similar app but one which I would use frequently: a dictionary helper! My app draws data from a dictionary API and allows users to enter words they would like the definitions of as well as enter words they would like the synonym of. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Writing my CLI Application&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The heart of my project was the run.rb file, in which I wrote the Ruby code to run my CLI application. There I defined various classes and methods to ensure my application ran smoothly and was user friendly. &lt;/p&gt;

&lt;p&gt;Here's a glimpse into the Menu method from which users are able to select the option they want to explore:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def menu
        puts "Menu:".blue.bold
        puts "#{".dictionary".green.bold}\t - to search for a word's definition"
        puts "#{".synonym".green.bold}\t - to explore synonyms of words"
        puts "#{".exit".green.bold}\t\t - to exit out of Dictionary Helper"

        puts "Please enter your choice from the options above:".red
        gets.chomp 
    end

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

&lt;/div&gt;



&lt;p&gt;The main menu serves as a guide to users - presenting them with options and allowing them to interact with my application. I tried to keep my prompts short and understandable, so there would be no chance that users would get confused when running my application. &lt;/p&gt;

&lt;p&gt;As seen above, I utilised the colorize gem to colour various texts when users run my application. I did this in an attempt to make my application more visually stimulating and to make it easier for users to read the prompts. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Building Functionality&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;One challenge was handling errors to ensure my application ran smoothly and so that users can understand the issue if they encounter one. For example, if they enter a word that is not in the dictionary API.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if !word_data.empty?
                    meanings = word_data[:meanings]

                    meanings.each_with_index do |meaning, index|
                    part_of_speech = meaning["partOfSpeech"]
                    definitions = meaning["definitions"]

                    puts "Meaning #{index + 1}: #{part_of_speech}".blue.bold
                    definitions.each_with_index do |definition, def_index|
                        puts "Definition #{def_index + 1}: #{definition["definition"]}".blue
                    end
                end
                elsif word_data.empty? 
                    puts "Word not found.".blue
                end 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As you can see above, if a user enters a word that is not in the dictionary API I drew from, my application will return "Word not found." This was my attempt to prompt users to enter valid words instead of joking around and entering gibberish. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In conclusion, creating this application was a very fun and very rewarding task. I look forward to honing in on my skills more and creating more fun yet useful applications. &lt;/p&gt;

</description>
      <category>ruby</category>
      <category>beginners</category>
      <category>api</category>
      <category>application</category>
    </item>
    <item>
      <title>Reflecting on my first React app</title>
      <dc:creator>mishmishel</dc:creator>
      <pubDate>Thu, 10 Aug 2023 02:05:24 +0000</pubDate>
      <link>https://dev.to/mishmishel/reflecting-on-my-first-react-app-27ei</link>
      <guid>https://dev.to/mishmishel/reflecting-on-my-first-react-app-27ei</guid>
      <description>&lt;p&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When I first began learning about React I was extremely confused when it came to importing and exporting components, how to structure an App efficiently, and how to decide how many components were needed. However, after creating my first ever React app, I gained some much needed confidence when it came to using this framework. &lt;/p&gt;

&lt;p&gt;My React app isn't perfect, and I'm sure that I missed a few mistakes when debugging, however, creating this app made me really excited about the future projects I'll be able to create and work on. &lt;/p&gt;

&lt;p&gt;For my Phase-2 assignment, I was tasked with creating a React single page application from scratch which must include: &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;At least 5 components&lt;/li&gt;
&lt;li&gt;3 client-side routes &lt;/li&gt;
&lt;li&gt;A json-server to create a RESTful API &lt;/li&gt;
&lt;li&gt;Some CSS styling&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Creating the App&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I decided to create a diary app in which users can type in diary entries and view previous diary entries. For my previous assignment in Phase-1, I created a To-Do List App, so a diary app was a logical step up for me. &lt;/p&gt;

&lt;p&gt;I began planning my diary app (in my real-life paper diary nonetheless) and decided upon this course of action: &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Initial setup (of React, json-server etc)&lt;/li&gt;
&lt;li&gt;Plan Layout (How many components? What components?)&lt;/li&gt;
&lt;li&gt;Create components (Just the blueprint of the app)&lt;/li&gt;
&lt;li&gt;Implement react router (My favourite part of the app)&lt;/li&gt;
&lt;li&gt;Build components (Adding meat to the bone)&lt;/li&gt;
&lt;li&gt;Code interactions with json-server &lt;/li&gt;
&lt;li&gt;Additional features?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You may be surprised to see that CSS styling is not on this list but that is because I worked on the CSS styling throughout the project, instead of dedicating a set time for it. I also tested and debugged my app throughout its creation.&lt;/p&gt;

&lt;p&gt;Overall, I decided that I wanted to create a diary app where users can enter a diary entry with a date, title, and content (obviously), view previous diary entries, and filter previous diary entries by date. My diary app would have 3 main pages: Home, New Diary Entry, and View Diary Entries - and a 4th page nested in View Diary Entries where users can open each diary entry individually to see more information. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;My Favourite Part&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;My favourite thing to work on during the creation of my diary app was the client-side routing.&lt;/p&gt;

&lt;p&gt;I used a switch statement in my App component so that my app only renders the first route that matches the URL. I had to add an exact path so that the Home component wasn't displayed whenever / was followed by anything.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function App() {
  return (
    &amp;lt;div&amp;gt;
      &amp;lt;Navbar /&amp;gt;
      &amp;lt;Switch&amp;gt;

        &amp;lt;Route exact path="/"&amp;gt;
          &amp;lt;Home/&amp;gt;
        &amp;lt;/Route&amp;gt;

        &amp;lt;Route path="/newdiaryentry"&amp;gt;
          &amp;lt;NewDiaryEntry/&amp;gt;
        &amp;lt;/Route&amp;gt;

        &amp;lt;Route path="/viewdiaryentries/:id"&amp;gt;
          &amp;lt;EntryDetails /&amp;gt;
        &amp;lt;/Route&amp;gt;

        &amp;lt;Route path="/viewdiaryentries"&amp;gt;
          &amp;lt;ViewDiaryEntries/&amp;gt;
        &amp;lt;/Route&amp;gt;

        &amp;lt;Route path="*"&amp;gt;
          &amp;lt;h1&amp;gt;404 not found&amp;lt;/h1&amp;gt;
        &amp;lt;/Route&amp;gt;

      &amp;lt;/Switch&amp;gt;
    &amp;lt;/div&amp;gt;
  );
}

export default App;

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

&lt;/div&gt;



&lt;p&gt;I ensured that my paths reflected what the user would be doing at the moment and that users would be able to input a URL to navigate to the page they need to see. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Things I struggled with&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Because of some unforeseen circumstances in my life, I was unable to complete work on the Phase-2 modules for a couple of weeks. This meant that I had to learn some concepts 'on the go' when working on my app and that I had to utilise concepts that hadn't yet solidified in my brain. &lt;/p&gt;

&lt;p&gt;For example, the fact that when you update state, it's important to pass in a new object to the set state - therefore, you have to use the spread operator to make a copy of the object. I forgot this fact and so had to tinker a little with my code before I got some things working. &lt;/p&gt;

&lt;p&gt;You can see the spread operator in my code in my handleInputChange function in my New Diary Entry component.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; const handleInputChange = (e) =&amp;gt; {
        const { name, value } = e.target;
        setEntry(prevEntry =&amp;gt; ({
        ...prevEntry, /* Spread operator creates copy of current entry state object and updates property by name with new value */
        [name]: value
    }));
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The above function determines what property of the entry object needs to be updated, uses the spread operator to create a copy of the entry state, and updates the property specified by name with the new value. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Additional Features&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;After meeting the Phase-2 assignment requirements, I decided to add an additional feature: filtering diary entries by date. This is a very simple feature and it was quite easy to add, however, it made my site so much more interesting!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2F990b0v8axrnvy4je6itn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2F990b0v8axrnvy4je6itn.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I really would've liked to add more additional features but I was quite pressed on time and wanted to focus more on building the React components and client-side routing. &lt;/p&gt;

&lt;p&gt;Despite the fact that this app was for an assignment, I will continue working on it even after submitting. Ideally, I would add more interesting features, for example: a favouriting feature, search bar, more interactive UI, etc. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In conclusion, I am quite happy with the app I have created in the given time frame and I look forward to experimenting more with the React framework. &lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>react</category>
      <category>css</category>
    </item>
    <item>
      <title>How I created my first ever web application</title>
      <dc:creator>mishmishel</dc:creator>
      <pubDate>Fri, 16 Jun 2023 02:05:33 +0000</pubDate>
      <link>https://dev.to/mishmishel/how-i-created-my-first-ever-web-application-5048</link>
      <guid>https://dev.to/mishmishel/how-i-created-my-first-ever-web-application-5048</guid>
      <description>&lt;p&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Hello, my name is Mishel and I am studying to become a full-stack web developer. But! I won’t get ahead of myself - I’m still in the beginning stages of web development and have only been getting my hands dirty with HTML, CSS, and JS thus far. In this blog post, I will document the process of creating my first ever web application using HTML, CSS, and JS. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/Dh5q0sShxgp13DwrvG/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/Dh5q0sShxgp13DwrvG/giphy.gif" width="600" height="370"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Getting the ball rolling&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I believe that the hardest part of any difficult task is getting started - there is no space for worrying or self-doubt here! Because I am creating this application as an assignment for my course, there are certain criteria I have to abide by. In short, I need to create a single page web application that will fetch data from an API or mock server and output dynamic data. &lt;/p&gt;

&lt;p&gt;I began with creating a list of goals that my website should be able to achieve. I decided that I would like to make a to-do list application that allows users to create a to-do list and check off completed tasks. My website should:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Allow users to write text into an input form and submit their task&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Allow users to check off completed tasks&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Allow users to delete tasks (completed or not)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Ensure data is saved on the website so upon refreshing any checked or unchecked tasks are still on the page and deleted tasks do not appear&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These goals allowed me to create a clearer image in my head of what I wanted to achieve and allowed me to begin thinking about what I could do to achieve these goals. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/Y2y9IpjbPDakvK6LrR/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/Y2y9IpjbPDakvK6LrR/giphy.gif" width="480" height="270"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Initial code&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The first day of coding was spent creating a framework for my website using HTML and making it ✨ pretty ✨ using CSS. Since my website is a to-do list app, the most important feature is an input field where users can enter their tasks:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class = "enter-and-add"&amp;gt; 
&amp;lt;input type="text" id="input-box" placeholder="Write your tasks here!"&amp;gt;&amp;lt;button&amp;gt;Add&amp;lt;/button&amp;gt;
&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I placed the input field and 'add' button into the same div in order to easily edit their appearance in CSS. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Meeting project requirements&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The next few days were spent making sure that my web application meets the project requirements. Since I am creating this web application for an assignment, there are certain criteria that have to be met. These are the following: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The app must be a HTML/CSS/JS frontend with access to a public API or a mock server&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The entire app must run on a single page&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It must use at least 3 unique event listeners&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It must include at least one instance of array iteration &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It must follow good coding practises&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These were the hardest few days of the project as I was experimenting with fetch requests and methods to ensure my data was saved to a mock server and that it would load up onto my web application upon the site being refreshed. Working on this section was a headache because I had to commit to a lot of research and trial and error before I got everything working the way I wanted it to. &lt;/p&gt;

&lt;p&gt;For example, fetch requests:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;fetch('http://localhost:3000/tasks')
.then(response =&amp;gt; response.json())
.then(json =&amp;gt; {
    json.forEach(task =&amp;gt; {
        let li = document.createElement("li");
        li.innerHTML = task.task;

        if (task.checked) {
            li.classList.add("checked");
        }

        listContainer.appendChild(li);

        let span = document.createElement("span");
        span.innerHTML = "\u00d7";

        li.appendChild(span);
    });
})
.catch(error =&amp;gt; {
    alert('Failed to fetch tasks from the server.');
}); 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The code above ensures that if a user refreshes the to-do list app the web application will fetch data from the server to ensure that any tasks that were on the page before the reload will be on the page after. It took me a lot of time researching, asking friends for help, and rereading notes in order to get all my fetch requests working the way I wanted them to. I got very frustrated at times as I searched for tutorials and nothing came up that explained the concept perfectly! I was only able to succeed when I utilised a number of different sources and applied them all together. &lt;/p&gt;

&lt;p&gt;However, it was a great learning opportunity for me as I was able to apply concepts that I had learned in class and was able to gain a better understanding of the code that I was writing - all these concepts that once confused me began to make more sense!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/l2JdTkHW1KZPdvdS0/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/l2JdTkHW1KZPdvdS0/giphy.gif" width="480" height="362"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I would do differently next time&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Next time I decide to code a website, I would like to focus on applying as many concepts I was confused on as possible. For example, if I find a certain concept difficult during my studies, I'll try to implement it in my project so that I can turn a weakness into a strength and gain a better understanding of the concept and how to use it. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;My main takeaway&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;My main takeaway from this project was that yes, studying concepts is important, but, it is much more important to try to apply and actually implement them in your code because that is the only way you’ll understand them! &lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>beginners</category>
      <category>css</category>
    </item>
  </channel>
</rss>
