<?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 Yusuf Sarıkaya on Medium]]></title>
        <description><![CDATA[Stories by Yusuf Sarıkaya on Medium]]></description>
        <link>https://medium.com/@yusufs35?source=rss-b720bad857d6------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*EnCGhV4vjix3n8iSH2y1Eg.jpeg</url>
            <title>Stories by Yusuf Sarıkaya on Medium</title>
            <link>https://medium.com/@yusufs35?source=rss-b720bad857d6------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 13:41:08 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@yusufs35/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[Safeguarding Your Frontend: Understanding Common Attacks and How to Defend Against Them]]></title>
            <link>https://medium.com/@yusufs35/safeguarding-your-frontend-understanding-common-attacks-and-how-to-defend-against-them-e2f7205cdd9d?source=rss-b720bad857d6------2</link>
            <guid isPermaLink="false">https://medium.com/p/e2f7205cdd9d</guid>
            <category><![CDATA[csrf-protection]]></category>
            <category><![CDATA[csrf-attack]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[xss-attack]]></category>
            <category><![CDATA[xss-vulnerability]]></category>
            <dc:creator><![CDATA[Yusuf Sarıkaya]]></dc:creator>
            <pubDate>Mon, 29 Apr 2024 09:25:34 GMT</pubDate>
            <atom:updated>2024-04-29T09:25:34.075Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4JssZ0oCH-ilMpUqn8Yzbg.jpeg" /></figure><p>In today’s digital age, the frontend of web applications plays a crucial role in delivering seamless user experiences. However, with great convenience comes great risk. Frontend security attacks and vulnerabilities can compromise user data, harm brand reputation, and disrupt business operations. In this article, we’ll delve into some common frontend security threats, understand how they work, and explore preventive measures to fortify your web applications.</p><h3><strong>Cross-Site Scripting (XSS): Malicious Scripts on Your Page</strong></h3><p>XSS attacks involve injecting malicious scripts into seemingly harmless user inputs like forum posts, comments, or even product reviews. When the page renders this data, the script executes in the user’s browser, potentially wreaking havoc. Here’s how it can play out:</p><ul><li><strong>Stealing Data:</strong> An attacker injects a script that reads the user’s cookies, which might contain session tokens or login credentials. This stolen information can then be used to hijack the user’s account or impersonate them on other websites.</li><li><strong>Website Defacement:</strong> Malicious scripts can alter the content of a website, displaying misleading information or phishing attempts to unsuspecting users.</li><li><strong>Redirecting Users:</strong> Attackers can redirect users to malicious websites that steal personal information or infect their devices with malware.</li></ul><h4><strong>How to Prevent XSS:</strong></h4><p>The key defense against XSS is to thoroughly validate and sanitize all user input before displaying it on your web page. Here’s what that means:</p><ul><li><strong>Validation:</strong> Check the format and length of user input to ensure it conforms to your expectations. For example, a username should only contain letters, numbers, and underscores, and not exceed a certain character limit.</li><li><strong>Sanitization:</strong> Remove or encode any potentially harmful characters from the user input. This can involve escaping special characters like &lt; and &gt; which have special meaning in HTML, effectively preventing them from being interpreted as code.</li></ul><pre>function displayComment(comment) {<br>  const commentDiv = document.getElementById(&#39;comments&#39;);<br><br>  // Basic validation (check comment length)<br>  if (comment.length &gt; 250) {<br>    alert(&#39;Comment too long! Please keep it under 250 characters.&#39;);<br>    return;<br>  }<br><br>  // Sanitization (escape special characters)<br>  const escapedComment = comment.replace(/&lt;script&gt;.*?&lt;\/script&gt;/g, &#39;&#39;); // Escape script tags<br>  const escapedComment2 = escapedComment.replace(/&lt;[^&gt;]+&gt;/g, &#39;&#39;); // Escape all HTML tags<br><br>  commentDiv.innerText = escapedComment2;  // Use innerText to prevent script execution<br>}</pre><p>This code first validates the comment length and then sanitizes it by escaping both script tags and all other HTML tags. This ensures that even if an attacker injects malicious code, it won’t be interpreted as executable script by the browser.</p><h3>Cross-Site Request Forgery (CSRF): Unintended Actions with Intended Trust</h3><p>Cross-Site Request Forgery (CSRF) is a deceptive attack that tricks authenticated users into executing unintended actions on web applications where they are currently logged in. Attackers exploit the trust relationship between a user and a website by crafting malicious requests disguised as legitimate ones. CSRF attacks often target actions that result in state changes, such as modifying account settings or initiating financial transactions.</p><p>Imagine you’re logged in to your bank account. An attacker crafts a special link that, when clicked, sends a request to your bank to transfer money. Because your browser already has a valid session with the bank, the request appears legitimate and the transfer might go through without your knowledge.</p><h4><strong>How to Prevent CSRF</strong></h4><p><strong>CSRF Tokens:</strong> Mitigate CSRF attacks by using CSRF tokens. These are random values embedded in forms or sent as headers with requests. The server keeps track of issued tokens and validates their presence and validity before processing the request. Here’s how it works:</p><ol><li>The server generates a unique CSRF token and sends it to the user’s browser, typically as a hidden form field or a cookie.</li><li>When the user submits a form, the CSRF token is included with the request.</li><li>The server validates the presence and validity of the CSRF token before processing the request. If the token is missing or invalid, the request is rejected.</li></ol><pre>&lt;form action=&quot;/transfer&quot; method=&quot;POST&quot;&gt;<br>  &lt;input type=&quot;hidden&quot; name=&quot;csrf_token&quot; value={csrfToken}&gt; <br>  &lt;input type=&quot;number&quot; name=&quot;amount&quot; placeholder=&quot;Amount&quot;&gt;<br>  &lt;button type=&quot;submit&quot;&gt;Transfer&lt;/button&gt;<br>&lt;/form&gt;</pre><p>In this example, the server generates a CSRF token (represented by {csrfToken }) and embeds it within the hidden form field. When the user submits.</p><h3>Conclusion</h3><p>Frontend security is a crucial part of building a secure web application. By understanding these common vulnerabilities and implementing the recommended practices, you can significantly reduce the attack surface and protect your users. Remember, security is an ongoing process. Here are some additional tips to stay ahead of the curve:</p><ul><li><strong>Stay Updated:</strong> New vulnerabilities and attack techniques emerge frequently. Subscribe to security advisories and stay updated on the latest threats and best practices.</li><li><strong>Secure Communication:</strong> Enforce HTTPS for all communication between the browser and your web application. This encrypts data in transit, protecting it from eavesdropping and tampering.</li><li><strong>Content Security Policy (CSP):</strong> Implement a CSP to define which resources (scripts, stylesheets, images) are allowed to load on your web page. This helps mitigate the risk of XSS attacks and unauthorized script loading.</li><li><strong>Regular Testing:</strong> Conduct security assessments and penetration testing on your web application to identify and address vulnerabilities before they can be exploited by attackers.</li></ul><p>By following these principles and staying vigilant, you can build a robust and secure frontend that protects your users and their data. Remember, a secure frontend is a vital first line of defense in today’s ever-evolving threat landscape.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e2f7205cdd9d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Integration of NextJs14, Next-Auth5 and an external authentication API]]></title>
            <link>https://medium.com/@yusufs35/integration-of-nextjs14-next-auth5-and-an-external-authentication-api-1f35a9db0eed?source=rss-b720bad857d6------2</link>
            <guid isPermaLink="false">https://medium.com/p/1f35a9db0eed</guid>
            <category><![CDATA[nextjs14]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[nextauth]]></category>
            <dc:creator><![CDATA[Yusuf Sarıkaya]]></dc:creator>
            <pubDate>Tue, 06 Feb 2024 14:31:43 GMT</pubDate>
            <atom:updated>2024-02-25T09:01:25.521Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RQ78aIptkBxQ85X3p7ajRA.jpeg" /></figure><blockquote>In this article I want to explain integration between NextJs14, NextAuth5 and an external authentication API based on an issue about session expiration time I faced during my last project and my solution.</blockquote><p>After NextJs14 was introduced, I had a passion for developing a project using NextJs14. I had the opportunity to bring it to life last month. We started to develop a school management app with my students using NextJs and Next-Auth. The API we consumed was developed with Spring Boot and has token based authentication, but it doesn’t have a refresh-token architecture.</p><p>However, I faced a challenge when integrating the API with Next-Auth. Before mentioning the issue, I want to give you some information about Next-Auth sessions.</p><h4>How to handle session expiration time in Next-Auth</h4><p>As you know, Next-Auth generates a token that is saved into a cookie to manage the session. This session expires after 1 month if you don’t define an expiration time; this is the default value. Moreover, the session expiration time is always renewed as long as the user interacts with the app, even if you define an exact expiration time. NextAuth offers us the `<em>maxAge` </em>property to define expiration time of the session. But this value sets the idle time. Let’s assume the `<em>maxAge` </em>property is 3600 sec (1 hour). This means if the user doesn’t interact with app in 1 hour or more after log in, the session will expire. But if the user continues the interaction, the session expiration time is always renewed, so the session never gets stale.</p><h4>What was the issue?</h4><p>The API we consumed was generating a token whose lifetime is 2 hours, but in Next-Auth there is almost no time limit, as I mentioned earlier. So it caused a non-stable frontend application. Because even though the API session had expired, the user seemed logged in on frontend side. Since the frontend app assumed the user was logged in, it allowed API calls, causing the API to throw “forbidden” errors.</p><h4>What is my solution?</h4><p><strong>1. I wrote two helper functions</strong></p><pre>export const parseJwt = (token) =&gt; {<br> try {<br>  // atob: decodes base64 strings<br>  return JSON.parse(atob(token.split(&quot;.&quot;)[1]));<br> } catch (e) {<br>  return null;<br> }<br>}</pre><p>This function is useful for decoding the given token, which was encoded by base64 encryption. Thanks to this function we can get the expiration time of the token sent by the API.</p><pre>export const getIsTokenValid = (token) =&gt; {<br> if (!token) return false;<br><br> //In JavaScript, a time stamp is the number of milliseconds that have passed since January 1, 1970.<br> <br> const jwtExpireTimestamp = parseJwt(token).exp;<br> //In this case, since the exp value is in seconds format, we need to convert it to milliseconds format in the next step. <br> <br> const jwtExpireDateTime = new Date(jwtExpireTimestamp * 1000);<br> //Now we have expiration date of the token <br><br> if (jwtExpireDateTime &lt; new Date()) {<br>  console.log(&quot;API token expired&quot;);<br>  return false;<br> }<br><br> return true;<br>};</pre><p>This function checks if the given token is valid or expired.</p><p><strong>2. I checked if the user has an invalid access token to redirect to the login page</strong></p><pre>authorized({ auth, request: { nextUrl } }) {<br>   const isLoggedIn = !!auth?.user;<br>   const isTokenValid = getIsTokenValid(auth?.accessToken);<br>  <br>   if (!isTokenValid) {<br>       return false;<br>   }<br>}</pre><p>The <em>authorized </em>callback is called before a user routes from one page to another. At this time, we check the token <em>( in our project, its name is accessToken )</em> sent by server if it is valid or not. If not, we return false, causing Next-Auth to route the user to the login page. But since this control doesn’t make the session empty, you will keep seeing the user logged in. We handle this issue in the next step.</p><p><strong>3. I checked if the user has an invalid access token to empty the session object</strong></p><pre>async session({ session, token }) {<br>   const isTokenValid = getIsTokenValid(token.accessToken);<br>   if(!isTokenValid) return { user: null };<br><br>   session.accessToken = token.accessToken;<br>   session.user = token.user;<br>   return session;<br>}</pre><p>The <em>session </em>callback is called automatically whenever app needs the session object. We need to check if the token is valid in this callback function. If the token is invalid, then we return null instead of the session object to empty the session. By this action, the user is forced to sign out.</p><h3>Conclusion</h3><p>The integration journey of NextJs14, Next-Auth5, and an external authentication API unveiled challenges and opportunities. Developing a school management system with NextJs and Next-Auth, powered by a Spring Boot API, highlighted the absence of a refresh-token architecture.</p><p>To address this, I implemented strategic solutions, including helper functions for token management. These measures not only stabilized the frontend but deepened my understanding of intricate technology dynamics.</p><p>I hope this article provides valuable insights, aiding readers in navigating similar challenges and fostering their growth in the dynamic field of web development.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1f35a9db0eed" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why you should use NextJs rather than Vanilla React]]></title>
            <link>https://medium.com/@yusufs35/why-you-should-use-nextjs-rather-than-vanilla-react-ad4a2289062a?source=rss-b720bad857d6------2</link>
            <guid isPermaLink="false">https://medium.com/p/ad4a2289062a</guid>
            <category><![CDATA[nextjs14]]></category>
            <dc:creator><![CDATA[Yusuf Sarıkaya]]></dc:creator>
            <pubDate>Thu, 25 Jan 2024 12:39:39 GMT</pubDate>
            <atom:updated>2024-01-25T12:39:39.637Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yCsZvXDE53VlSqQ5yFA_jw.jpeg" /><figcaption>Generated by Bing AI</figcaption></figure><p>Hello everyone! I want to talk about Nextjs 14 in this article. Here we will find the answers about confusing topics and then I’d like to introduce you the basic features of the Nextjs that are not provided by Pure React.</p><h3>What is React and Next.JS</h3><p>React is a Javascript library that used to create the user interface of web and native applications by building components.</p><p>The first misunderstood topic is about React. The question is “Is React a library or a framework?”</p><p>A library is a set of some well-organized functions to meet only a specific need. Whenever you want or whenever you need, you can call and use.</p><p>But a framework is a set of some pre-defined modules which allows you to develop an application without spending more time and needing much more 3th party libraries.</p><p>According to the previous definitions we can say that “React is a library”. Because React gives us some predefined structures which meet our only basic needs. For example, React doesn’t have any built-in routing mechanism, if you want to use routing -which you always need- you have to install a 3th party library such as “react routing dom”.</p><h3>What does React officially recommend?</h3><p>React officially recommends using popular React frameworks (NextJs, Remix, Gatsby, Expo …) when starting a new project.</p><h3>Next.Js contains a bunch of built-in libraries</h3><p>NextJs has been developed based on React library and enhanced with some mechanisms to close the gaps which React has. NextJs is a framework form of React library.</p><p>NextJs has a set of built-in modules that you need so much when coding such as routing, data-fetching, styling, scripting, testing, state managing, optimizing. Hence we can easily say that “NextJs is a React framework” which you can create, develop, test and deploy any fully interactive, highly dynamic, and performant modern web applications.</p><h3>Let’s look at the highlights of NextJs:</h3><h4><strong>1.Routing:</strong></h4><p>NextJs offers file-system based router that makes easy to develop routing mechanism without write any code. The following figure shows us that the folders which contains a special page.js file is considered as path whereas every single page.js file represents a web page. To create a router mechanism in NextJs, the only thing you have to do is creating folder and file structure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*thbnI3r4LGTvDAmH" /><figcaption><a href="https://nextjs.org/docs/app/building-your-application/routing/defining-routes">For detailed information visit NextJs Offical Web Site</a></figcaption></figure><h4><strong>2. Data fetching</strong></h4><p>Next.js provides a built-in data fetching mechanism which has been developed based on JavaScript Fetch API. This mechanism enables you to retrieve data both on the client side and the server side. Thanks to the server-side fetching mechanism, known as SSR, it improves the initial load time, SEO, First Contentful Paint (FCP), and overall performance.</p><p>NextJs fetchAPI also has caching mechanism that improves performance of the application by storing the fetched data temporarily, thus not forwarding the same requests to the server.</p><h4><strong>3. Rendering</strong></h4><p>In Next.js 14, rendering refers to the process of generating the HTML content for a page. Next.js provides three main rendering strategies:</p><p><strong><em>Static Rendering (SSG):</em></strong> The page is generated in build time. This is the fastest rendering strategy because neither the server nor the client needs to do any work to render the page. However, it can be inefficient for pages that require dynamic content.</p><p><strong><em>Dynamic Rendering </em>: </strong>The page is generated on the server on demand, but the client needs to make an additional request to fetch the dynamic content. This is more efficient for pages that require dynamic content, but it can slow down the initial page load.</p><p><strong><em>Streaming</em>:</strong> The page HTML is generated on the server and streamed to the client as it is being generated. This is a new feature in Next.js 14 that can provide a good balance between performance and interactivity.<br>Next.js also supports Partial Prerendering, which is a hybrid approach that combines elements of static and dynamic rendering. Partial prerendering allows you to prerender specific parts of a page while leaving other parts dynamic. This can be useful for pages that have a lot of dynamic content but also need to have a fast initial page load time.</p><h4><strong>4. Caching</strong></h4><p>NextJs caches the things as much as it can. This means, NextJs has router cache on the client-side, full route cache, request memoization and data cache on the server-side, those mechanisms aims to improve performance and reduce cost.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*YCGxHY69skRUFm9W" /><figcaption><a href="https://nextjs.org/docs/app/building-your-application/caching">For detailed information visit NextJs Offical Web Site</a></figcaption></figure><p><strong>4.1 Routing Cache</strong></p><p>NextJs stores routing cache both on client side and server side. The following diagram shows that how the routing mechanism differs if the request is static or dynamic and if the request is initial or subsequent.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*N4iyK9sZgJG9aCr0" /><figcaption><a href="https://nextjs.org/docs/app/building-your-application/caching#full-route-cache">For detailed information visit NextJs Offical Web Site</a></figcaption></figure><p>In the initial visit for a static route, there is no record in the client router cache for the request. So the routing request is hit from full route cache on the server. At the same time the router cache on the client is also fed by the full route cache. If the next time the router cache receives the same request, hits it without asking the server.</p><p>In the initial visit for a dynamic route, there is no record in the client router cache for the request. So the routing request is sent to the server. Cause the full route cache doesn’t store any data for dynamic routes, the server renders the page and send the result. On the way back the router cache on the client is also fed and when the next time the router cache receives the same request, hits it without asking the server.</p><p><strong>4.2 Request Memoization</strong></p><p>It means that NextJs stores the result of the fetch requests per render cycle in the memory. Therefore multiple fetch requests for the same API endpoint in the single render time are treated as a single request.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*MiSV9iHzGJ5NWVPj" /><figcaption><a href="https://nextjs.org/docs/app/building-your-application/caching#request-memoization">For detailed information visit NextJs Offical Web Site</a></figcaption></figure><p><strong>4.3 Data Cache</strong></p><p>NextJs, unless otherwise stated, stores the result of fetch requests in data cache to increase performance and to reduce response time. Fetch requests made on the server are automatically cached by Next.js. This means that the returned data is stored in the Data Cache, eliminating the need to refetch it unless the source data has changed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*qruglqzEbdIYGHMo" /><figcaption><a href="https://nextjs.org/docs/app/building-your-application/caching#data-cache">For detailed information visit NextJs Offical Web Site</a></figcaption></figure><p>Data caching is a fundamental aspect of Next.js 14, contributing to enhanced performance, scalability, and cost-effectiveness. By understanding and leveraging caching strategies, developers can build high-performance web applications that deliver a seamless user experience.</p><h4>5. Optimization</h4><p>Next.js offers a range of built-in optimizations to enhance the performance and user experience of web applications. These optimizations address various aspects of the application’s lifecycle, from page rendering and data fetching to image and font delivery.</p><p><strong><em>Code Splitting:</em></strong> Next.js splits JavaScript code into smaller bundles, ensuring that only the code required for each page is loaded initially. This reduces the overall page size and improves loading times, especially for large applications.</p><p><strong><em>Image Optimization:</em></strong> Next.js provides built-in image optimization capabilities, automatically optimizing images for different devices and using modern formats like WebP and AVIF. This reduces image sizes and improves rendering performance.</p><p><strong><em>Font Optimization:</em></strong> Next.js optimizes font delivery, reducing font load times and improving rendering performance. It supports various font formats and provides options for lazy loading and font caching.</p><p><strong><em>Lazy Loading of Components and Scripts: </em></strong>Next.js allows lazy loading of components and scripts, preventing them from loading until they are actually needed. This reduces initial bundle size and improves loading performance.</p><p><strong><em>Suspense and Deferred Rendering:</em></strong> Next.js employs suspense and deferred rendering techniques to handle asynchronous data fetching without blocking the initial rendering of the page. This ensures a responsive user experience while waiting for data to load.</p><p><strong><em>Third-Party Library Optimization:</em></strong> Next.js provides tools for optimizing third-party libraries, such as bundling them into custom modules and minimizing their size. This reduces the overall bundle size and improves loading performance.</p><p><strong><em>Bundle Analyzer:</em></strong> Next.js integrates with the @next/bundle-analyzer plugin, enabling developers to analyze the size and structure of their JavaScript bundles. This helps identify areas for optimization and improve overall performance.</p><p><strong><em>SEO Optimization: </em></strong>Next.js provides built-in SEO features, such as generating sitemaps, optimizing meta tags, and enabling server-side rendering. This helps improve search engine rankings and visibility.</p><h3>Conclusion</h3><p>Next.js is an incredibly powerful and versatile framework that offers a number of benefits over vanilla React. It provides built-in features for routing, data fetching, rendering, caching, and optimization, which can save you a lot of time and effort. It also offers better performance and SEO, making it a great choice for building modern web applications.</p><p>If you are looking for a framework that will make your development workflow easier and your applications more performant, I highly recommend giving Next.js a try. You will be amazed at how much it can do for you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ad4a2289062a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to become a front-end web developer in 7 steps?]]></title>
            <link>https://medium.com/@yusufs35/how-to-become-a-front-end-web-developer-in-7-steps-f8ecd97c349c?source=rss-b720bad857d6------2</link>
            <guid isPermaLink="false">https://medium.com/p/f8ecd97c349c</guid>
            <category><![CDATA[html]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[css]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[react]]></category>
            <dc:creator><![CDATA[Yusuf Sarıkaya]]></dc:creator>
            <pubDate>Tue, 20 Jun 2023 11:50:13 GMT</pubDate>
            <atom:updated>2023-06-20T11:50:13.295Z</atom:updated>
            <content:encoded><![CDATA[<h4>If you also have the same question, read the article and follow this road map.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pEWWjiWA_8al8DiKHQIXCQ.jpeg" /></figure><p>Hi there ! Usually some people around me ask the question: “How to become a web developer” In this article I want to talk about the road map which I recommend who wants to become a frontend developer to follow. This road map covers the most basic subjects you need to know about front-end developement. These are my advices based on a long term experience. Let’s get start!</p><h3>Step 1: Motivation &amp; Planing</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S05oSs7qtCriH4hw_vwvyg.jpeg" /></figure><p>First of all you should be aware of that you are at the beginning of a long way which has no ending because of that it depends on technology. Technology is constantly evolving so you must not stop walking. At the begining, you walk on the way which created by your colleagues, but later you will create the way.</p><p>Victories are won with hard, regular, meticulous and planned work. At the end of the day if you want to be a conqueror, you should have a plan. I don’t talking about working all day but working every day. Well, how many hours do you have to work per a day? It depends on your time, your power, your conditions. (<em>Many a little makes a mickle</em>.) Dont’t be late, make time for coding and start it!</p><h3>Step 2: Learn about IT Fundamentals</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zpGCN78opYaKGgkEgJeUag.jpeg" /></figure><p>Now you can start learning. If you are new in IT world (Information Technology) I recommend you to learn some terms and concepts about web technologies such as http, ftp, domain name, hosting, IP address, front-end, back-end, SEO and so on. Because you’ll need them while watching a video, reading an article, experiencing any tool or developing an application.If you don’t master them, you never understand what happened behind the scene. So you can not level up.</p><h3>Step 3: Learn HTML &amp; CSS &amp; Java Script</h3><p>They are the backbone of the web development process and have no alternatives.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JzvX6rpVxpCa1Xf1f57eZw.jpeg" /></figure><p><strong>HTML </strong>(Hypertext Markup Language) is a markup language that is used for building web application UIs (user interfaces). HTML consists of a bunch of commands called “tag”. HTML tags give us ability to place elements in web documents such as titles, paragraphs, links, images, videos and so on. HTML is like skeleton of a human or like rough construction of a building. It is the most basic part of applications. Nowadays whoever wants to build a front-end web application, have to use HTML and also CSS and Javascript.</p><p><strong>CSS </strong>(Cascading Style Sheet) is a styling language that using to make elements which is created by HTML looks user friendly. Thanks to CSS, we can apply styles for colors, spaces, images, layouts, borders, fonts, dimensions, positions and create transitions, animations on the page. CSS is like a skin of a human or like a plaster or a paint of a building. It makes them look better than a skeleton or a rough construction.</p><p><strong>Javascript </strong>is a programming language mostly use on front-end side gives us ability to create dynamic and user interacted web applications by manipulating HTML and CSS. Thanks to Javascript, we can moving, repositioning, hiding and showing, styling elements based on user interactions. And also it gives many functionality such as form handling, error handling, event handling, API calls, and so on.</p><h3>Step 4: Learn a Java Script framework</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vXpIToyYB2jO2TmlQpde7w.jpeg" /></figure><p>HTML, CSS, and Javascript are sufficient to create the front-end side of an application. But if no framework is used while building the front-end, you face design, development or performance issues and challenges especially in large scale projects.</p><p>Many javascript frameworks provide us component-based infrastructure. In this way we can develop projects by dividing into small parts. This makes development process easy and maintable.</p><p>React, Angular, VueJs and Svelte are the most popular javascript frameworks or libraries. They all are amazing but I recommed you React. Why?</p><p>First reason is, as you see at the following Google trends graph, React is more popular than the others all over the world in last 5 years.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WIj70yvjJcXU_TBZjKpoZQ.jpeg" /></figure><p>Second reason is, as you see at the following graph, nowadays React has more market share than the others. The graph shows only for USA markets, but if you search for other countries you will see the market power of React except a few countries.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*exSneRTM2EPVK79Nb0YPwg.jpeg" /></figure><h3>Step 5 : Learn a CSS styling library</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2q5YXH4oFNBfj1mLlrqk2A.jpeg" /></figure><p>In reality CSS meets your needs for styling of elements. But if you don’t want to waste time for creating styles about layout or responsivity and creating basic components, you can use a styling library. Styling libraries take your styling development up a notch.</p><p>The most common style libraries are Bootstrap, Material UI, Semantic UI, Bulma, Tailwind CSS and so on. Of course I recommend Bootstrap. Because it is the most popular CSS framework as you see in the following chart.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r7fQUDjmDwDfvH1lFdM_qQ.jpeg" /></figure><p>Bootstrap is not only CSS library, it is defined as “<em>HTML, CSS and Javascript library</em>” in its offical website <a href="http://getbootstrap.com/">getbootstrap.com</a>. Really it is. Bootstrap has many excellent html components which are enriched by CSS and javascript. It is easy to learn, easy to use, has great documents and completely free.</p><h3>Step 6: Learn npm</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4wD1_2qdvA9ZvIfdKk5Wcg.jpeg" /></figure><p>NPM (Node package manager) is the world’s largest Javascript library. You can download javascript libraries developed by the others and install into your projects and also you can develop your own libraries and share in this platform. Thanks to NPM you don’t need to reinvent the wheel. There are huge amount of javascript libraries which will meet your development needs in <a href="http://npmjs.com/">npmjs.com</a>.</p><p>Npm is also gives us a CLI (command line interface) to install, uninstall or manage libraries.</p><h3>Step 7: Learn Git and Github</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*64uyv_ITWkVjSPIeuaaqKQ.jpeg" /></figure><p>Git is a version control system which enables us to store changes in application by versions. In this way we can look into and revert back to the versions in history if any trouble occurs.</p><p>Github is a cloud platform which enables us to backup, share, deploy or collobarate repositories which are managed by Git on local computer.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f8ecd97c349c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is Git?]]></title>
            <link>https://medium.com/@yusufs35/what-is-git-how-to-create-repository-and-commit-a836cce1dfe1?source=rss-b720bad857d6------2</link>
            <guid isPermaLink="false">https://medium.com/p/a836cce1dfe1</guid>
            <category><![CDATA[git-repositories]]></category>
            <category><![CDATA[git-error]]></category>
            <category><![CDATA[git]]></category>
            <category><![CDATA[install-git]]></category>
            <dc:creator><![CDATA[Yusuf Sarıkaya]]></dc:creator>
            <pubDate>Wed, 22 Dec 2021 11:11:07 GMT</pubDate>
            <atom:updated>2021-12-22T11:11:07.455Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B8BB4axFgiEDJ2vHLXTVAA.jpeg" /></figure><p>Hello guys. This is my first article and I want to talk about Git. Git is the most populer version control system that enables you store and manage your “<strong>codes</strong>” as versions (commits). And also you can track, compare and revert changes. These gives you a big power over your project to be able to manage it.</p><p>I stated the word “codes”, because it has been especially developed for developers .</p><h3>How to install?</h3><p>If you want to use Git, first you visit the following url, download and install the relevant version for your operating system.</p><p><a href="https://git-scm.com/">Git</a></p><p>If you can properly install the Git you can use git commands in terminal. At first, type the following Git command and press enter in your terminal:</p><pre>git --version</pre><p>If the message is something like above, this means you succeeded the installation:<br> <em>git version 2.34.0.windows.1</em></p><p>But if the message is something like above, this means you failed:<br><em>‘git’ is not recognized as an internal or external command,</em></p><p>If you get this type of error in Windows operating system and also sure to installed it, I recomended that you should check “environment variables” in Windows control panel. Please be sure that existing of “Git\cmd” folder in Path variable on system variables</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JCi0TFQ1676tXeWO6Ezgcg.jpeg" /></figure><h3>Setting up Git</h3><p>Before going on, you should setup some configurations. These settings are absolutely not about git or github credentials. They are all about defining the owner of commits.</p><pre>git config --global user.name &quot;<em>Mona Lisa</em>&quot;<br>git config --global user.email &quot;email@example.com&quot;</pre><h3>How to create a repository (project)?</h3><p>In Git, “repository” means space which you can create your project and enable version control mechanism in it.</p><p>To create a Git repository you should type the following command in your project folder.</p><pre>git init</pre><p>The Git repository is initialized after the above command. You can see “.git” folder if you enable “Show hidden files, folders, and drives” option in advanced settings of folder from Windows explorer settings. This folder is very important, since Git stores all version changes and settings in it. If you delete it you will loose your version history.</p><h3>How to create version?</h3><p>If you want to create version, firstly you have to create some content in the project folder where you enabled the Git repository. Because Git does not consider the empty folders and Git traces the changes. If there is no changes you can not create commit. Always the version should have some changes differs from the previous one.</p><p>Before creating commit, you should know several concepts about Git: <strong>Working space</strong>, <strong>staging area</strong>, <strong>commit store</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vGekspIoqsyPAg8Dp85oCA.png" /></figure><p><strong>Working Space</strong>: It is your project folder which includes .git folder and project files.</p><p><strong>Staging Area</strong>: It is a waiting room that collects the changes to be committed. A commit (version) is created from the files which resides in Staging Area.</p><p><strong>Commit Store</strong>: It is a store contains all versions of the project(repo)</p><h4>Now we are ready to create commit</h4><p>First you can use the following command to send all changes to the staging area:</p><pre>git add .</pre><p>And then you can use the following command to create commit from staging area.</p><pre>git commit -m “first commit”</pre><p>Congratulations! You have just created a version (commit). Anymore you can create new commits by following the steps above.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a836cce1dfe1" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>