<?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: Mayhoral8</title>
    <description>The latest articles on DEV Community by Mayhoral8 (@mayhoral8).</description>
    <link>https://dev.to/mayhoral8</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%2F903472%2Fa4594249-efcb-47dc-8595-3d97ea0c9234.jpg</url>
      <title>DEV Community: Mayhoral8</title>
      <link>https://dev.to/mayhoral8</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mayhoral8"/>
    <language>en</language>
    <item>
      <title>SO YOU WANT TO BE A WEB DEVELOPER.</title>
      <dc:creator>Mayhoral8</dc:creator>
      <pubDate>Fri, 22 Mar 2024 19:29:44 +0000</pubDate>
      <link>https://dev.to/mayhoral8/so-you-want-to-be-a-web-developer-1h53</link>
      <guid>https://dev.to/mayhoral8/so-you-want-to-be-a-web-developer-1h53</guid>
      <description>&lt;p&gt;It’s 2024, and the tech ecosystem is even more vast than ever, with different fields emerging almost yearly. &lt;br&gt;
From AI engineering to UI/UX writing, one that has been around for a while and is still very well in demand is WEB DEVELOPMENT/WEBSITE DEVELOPMENT. &lt;br&gt;
And so arises the infamous question, ‘&lt;strong&gt;How can I become a web developer&lt;/strong&gt;?’.&lt;/p&gt;

&lt;p&gt;To become anything, you need lots of knowledge, and web development, although broad, can be easily understood. &lt;/p&gt;

&lt;h2&gt;
  
  
  WHAT IS WEB DEVELOPMENT?
&lt;/h2&gt;

&lt;p&gt;Web development is creating, building and maintaining websites/web applications. It is divided into two major categories: &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Front-end web development &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Back-end web development&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Front-end Development
&lt;/h2&gt;

&lt;p&gt;Generally, front-end development is mainly concerned with, but is not limited to, everything a user can see on a website. Developing the layout, design and complex interactions between the elements of a website—is also called client-side development. Front-end developers work closely with the design team to deliver great User interfaces.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Technical skills/roadmap:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;HTML&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;CSS&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;JavaScript&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;React/Vue/Angular&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Git and GitHub&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Back-end Development
&lt;/h2&gt;

&lt;p&gt;Back-end development, on the other hand, handles the server-side-software, which includes Creating/interacting with APIs(Application Programming Interface), databases, architectures and more.&lt;br&gt;
It is also called server-side development.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Technical skills/roadmap:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;NodeJs/Python/PHP/Java/Ruby&lt;/li&gt;
&lt;li&gt;SQL&lt;/li&gt;
&lt;li&gt;AWS/MongoDB&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Full-stack development&lt;/strong&gt; is the category that combines both front-end and back-end development. A full-stack developer can create a fully functioning website by effectively using the technologies and languages required to develop the front-end and back-end of a web application.&lt;/p&gt;

&lt;h2&gt;
  
  
  FRONT-END VS BACK-END VS FULL-STACK: WHICH ONE?
&lt;/h2&gt;

&lt;p&gt;Choosing between front-end and back-end development is generally relative to your goals or plans. There are, however, a few pointers to help make informed decisions:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Design vs Logic&lt;/strong&gt;: People who love to engage with design elements—colours and fonts are generally encouraged to go for Front-end Development, while those who prefer to write algorithms, logic, and code architectures are typically advised to go for back-end development.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This is not to say front-end developers don't write algorithms or logic, but those with a knack for visual exploration will most likely prefer the stack.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Examples from professionals&lt;/strong&gt;: Another way to choose the stack to go for is to learn from people who are already professionals in any of these stacks. An easy way to do this is to go to YouTube and search “A day in the life of a front-end or back-end developer”. &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This will give a quick insight into what to expect; seeing what the future will look like and its alignment with one’s goals or plans.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Pay/Salary&lt;/strong&gt;: One major factor to consider before choosing is checking out the salary range associated with that stack in the job market.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The next step is figuring out where to learn and how to learn. &lt;/p&gt;

&lt;p&gt;It is important to note that some of these sources will require a bit of funds to access, so feel free to do further research. &lt;br&gt;
They include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Online course platforms: Coursera, Udemy, Meta, WS3 schools etc.&lt;/li&gt;
&lt;li&gt;Youtube Tutorials: FreeCodeCamp, Brad Traversy, Netninja, etc.&lt;/li&gt;
&lt;li&gt;Official Documentations: MDN, Python docs, etc.&lt;/li&gt;
&lt;li&gt;Bootcamps.&lt;/li&gt;
&lt;li&gt;Mobile Apps: WS3 schools&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Best Learning Practices
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Consistency and commitment.&lt;/li&gt;
&lt;li&gt;Embrace difficulty&lt;/li&gt;
&lt;li&gt;Join an online learning community for accountability&lt;/li&gt;
&lt;li&gt;Document your learnings on your social media accounts, e.g. LinkedIn, X…&lt;/li&gt;
&lt;li&gt;Build lots of projects.&lt;/li&gt;
&lt;li&gt;Volunteer to work for free.&lt;/li&gt;
&lt;li&gt;Learn about “imposter syndrome” and how to overcome it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Some Learning Resources(ebooks):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://t.co/WMEcsY4x1B"&gt;The magic of CSS&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://t.co/HiQu445Cd1"&gt;DOM Enlightenment&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://t.co/T3E93ai0Hz"&gt;Eloquent Javascript&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://t.co/IURwCgcyLj"&gt;Pro Git Book&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://t.co/T7IWKl2AjL"&gt;SQLZap&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://t.co/035wswROKO"&gt;React&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In conclusion, Web development is more than just building websites; it’s about solving problems. With determination, focus and a healthy support system, you, too, can be a web developer.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>backenddevelopment</category>
      <category>python</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Stop Bugging Me!!- A TraXpense Story.</title>
      <dc:creator>Mayhoral8</dc:creator>
      <pubDate>Fri, 12 Aug 2022 10:35:00 +0000</pubDate>
      <link>https://dev.to/mayhoral8/stop-bugging-me-a-traxpense-story-17c0</link>
      <guid>https://dev.to/mayhoral8/stop-bugging-me-a-traxpense-story-17c0</guid>
      <description>&lt;p&gt;Who's gonna save me from this dilemma?!&lt;br&gt;
I shrugged at my laptop about closing the tabs, powering off the system and slipping into the ice cold evening, but then, just like a ray of sunlight...&lt;/p&gt;

&lt;p&gt;This is a story of discovery.&lt;/p&gt;

&lt;p&gt;A week earlier, I had already figured out the perfect project to put a seal on my vanilla JavaScript learning.&lt;/p&gt;

&lt;p&gt;I beamed with a smile everytime I remembered the name I had given my app, &lt;br&gt;
&lt;a href="https://mayhoral8.github.io/TraXpense2/index.html"&gt;TraXpense&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgksbqje35ii7i7nxghwk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgksbqje35ii7i7nxghwk.png" alt="Image description" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;From its name, TraXpense is an app that helps keep track of a user's expenses but this wasn't your average expense tracker. I had planned to spice things up using a more detailed analytical approach with CHARTS.  &lt;/p&gt;

&lt;p&gt;I had to go online and research on how to implement charts in my web app. I discovered the lovely chart.js library that helped provide an analytical clarity to TraXpense.&lt;/p&gt;

&lt;p&gt;I was able to represent the expenses of  a user based on the category(item), and the amount(price) spent.&lt;br&gt;
 It was fun but not easy. &lt;br&gt;
ChartJs is super cool!&lt;/p&gt;

&lt;p&gt;Back to my story...&lt;/p&gt;

&lt;p&gt;Two days later, I was ready to start.&lt;br&gt;
I began to implement everything I had learnt so far in JavaScript including the Map, Filter, and Reduce array methods, DOM manipulation, the ChartJs library to mention but a few.&lt;/p&gt;

&lt;p&gt;Honestly, It was quite a smooth sail for the first two days not until I encountered a bug. ⛔⛔⛔&lt;/p&gt;

&lt;p&gt;TraXpense has a transaction section where transactions(expenses) are recorded by a user.&lt;/p&gt;

&lt;p&gt;To add a transaction, a user is required to select an expense category, date of transaction and the amount spent; this makes up a transaction block(div),&lt;/p&gt;

&lt;p&gt;Clicking the "Done" button then inputs (append) the transaction block (div) into the transaction section.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxb0jijvpeostc0094k05.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxb0jijvpeostc0094k05.gif" alt="Image description" width="600" height="1333"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The implementation was fun and direct, but then something strange happened.&lt;/p&gt;

&lt;p&gt;Clicking the done button again(second time) gets 2 div boxes appended, creating the original plus a copy of it,&lt;br&gt;
third click leads to 3 div boxes,the original plus extra two copies of it and so on...&lt;br&gt;
Instead of just 1 each time.&lt;/p&gt;

&lt;p&gt;Ok, that looked like a puzzle?&lt;br&gt;
Check it out  👇🏽&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1irpvlp342qlwc31fca3.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1irpvlp342qlwc31fca3.gif" alt="Image description" width="600" height="267"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So, clicking the "Done" button 4 times, led to the addition of 10 div boxes (transaction) instead of just 4. &lt;br&gt;
It was messy.&lt;/p&gt;

&lt;p&gt;...picking up from where I left off at the begining of this article. &lt;/p&gt;

&lt;p&gt;I almost gave up but then I scoured through the internet till I finally found something that looked like what I was experiencing.&lt;/p&gt;

&lt;h2&gt;
  
  
  EVENT PROPAGATION IN JS.
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5exdu5d5r35n560cau0m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5exdu5d5r35n560cau0m.png" alt="Image description" width="800" height="600"&gt;&lt;/a&gt;&lt;br&gt;
What is Event Propagation?&lt;/p&gt;

&lt;p&gt;Event Propagation is the generation and movement of Events in the DOM tree down from the Document root to the element handling the event, and up from the element back to the Document root.&lt;/p&gt;

&lt;p&gt;Event Propagation is divided into 3 phases.&lt;/p&gt;

&lt;h2&gt;
  
  
  Capturing Phase.
&lt;/h2&gt;

&lt;p&gt;When an event is performed, for example a click event, the event isn't generated at the element performing the event, rather it is generated at the Document root from where it travels down the tree to the element handling the event. This phase is known as the Capturing phase. The event travels down the DOM tree to the children elements but not sibling elements.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjoupf505bxgzzgo4xtt3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjoupf505bxgzzgo4xtt3.png" alt="Image description" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Target Phase.
&lt;/h2&gt;

&lt;p&gt;When the event generated is at the element handling the event, the event/task is then executed. This phase is known as the Target Phase.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5oydsj3wxpni3zs7tddo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5oydsj3wxpni3zs7tddo.png" alt="Image description" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Bubbling Phase.
&lt;/h2&gt;

&lt;p&gt;After the event is executed, it then travels back up to the DOCUMENT root via the PARENT elements in a phase called the BUBBLING phase. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe0kdzyh90fnehygw23v1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe0kdzyh90fnehygw23v1.png" alt="Image description" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Ok, that was beautiful, &lt;br&gt;
nice presentation,&lt;br&gt;
lovely piece... &lt;br&gt;
but I was still stuck!!!&lt;/p&gt;

&lt;p&gt;Understanding event propagation just wasn't enough.&lt;/p&gt;

&lt;p&gt;However, on the bright side ☀️, I had a better sense of direction.&lt;/p&gt;

&lt;p&gt;Based on this new information, I intuitively tried looking for something that could prevent/stop an event from executing wrongly&lt;/p&gt;

&lt;p&gt;Digging further, I finally found something that had the words "stop" and "propagation" in it, boom!, a wave of hope swept through me.&lt;/p&gt;

&lt;p&gt;The "&lt;strong&gt;stopPropagation()&lt;/strong&gt;" and "&lt;strong&gt;stopImmediatePropagation()&lt;/strong&gt;" methods!&lt;/p&gt;

&lt;p&gt;Without any hesitation, I hurriedly copied the syntaxes, pasted it in my event listener callback function. &lt;/p&gt;

&lt;p&gt;Now, just like the "&lt;strong&gt;preventDefault()&lt;/strong&gt;" event method, these two methods are also attached to the event parameter of the callback function of an event listener.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fngrg74q5nw74l3jg2ax8.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fngrg74q5nw74l3jg2ax8.jpg" alt="Image description" width="488" height="233"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I then reloaded the page, to sync the browser and my code, tried adding a transaction again...&lt;/p&gt;

&lt;p&gt;And just like that... &lt;br&gt;
it worked!.&lt;br&gt;
Oh my!! &lt;/p&gt;

&lt;p&gt;Adding a transaction the second and third time still resulted in the addition of one div box each containing that specific transaction.&lt;/p&gt;

&lt;p&gt;I jolted out of my chair, heaved a sigh and then promised to share this great feat with my children someday,  yh.&lt;br&gt;
I wish I was joking 🌚.&lt;/p&gt;

&lt;p&gt;After I regained consciousness from my "yayy" moment, curiosity kicked in. &lt;/p&gt;

&lt;p&gt;Which of the two methods worked, or did both work together, and how do they even work?🤔&lt;/p&gt;

&lt;p&gt;Find out in the second part of this article where I share&lt;br&gt;
how I was able to figure out which method worked and what these methods really do in "Event Propagation".&lt;/p&gt;




&lt;p&gt;I'm Mayowa, a front-end developer with a knack for creating value and helping people solve problems via coding and writing.&lt;br&gt;
Do well to follow me.&lt;br&gt;
&lt;a href="https://mobile.twitter.com/ayeni_dave"&gt;Twitter&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="//www.linkedin.com/in/mayowa-ayeni-53b4591b2"&gt;LinkedIn&lt;/a&gt; .&lt;br&gt;
Thank you.&lt;/p&gt;

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