<?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[CNK Tech - Medium]]></title>
        <description><![CDATA[Everything about Code and Desing - Medium]]></description>
        <link>https://medium.com/cnk-tech?source=rss----83aee5fc001b---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>CNK Tech - Medium</title>
            <link>https://medium.com/cnk-tech?source=rss----83aee5fc001b---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 13 Nov 2026 05:45:08 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/cnk-tech" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Vue Js Lifecycle Hooks]]></title>
            <link>https://medium.com/cnk-tech/vue-js-lifecycle-hooks-b940ad06606d?source=rss----83aee5fc001b---4</link>
            <guid isPermaLink="false">https://medium.com/p/b940ad06606d</guid>
            <category><![CDATA[lifecycle]]></category>
            <category><![CDATA[vue]]></category>
            <category><![CDATA[hooks]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Sena Akbulut]]></dc:creator>
            <pubDate>Wed, 17 Jan 2024 12:36:02 GMT</pubDate>
            <atom:updated>2024-01-15T13:03:00.268Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DD3vSWElXsllzv5YgExXNA.png" /></figure><p>Hello everyone, I will tell you about Vue Js Lifecycle and lifecycle hooks. Every system has a life cycle. It is created, updated, and finally exited from that cycle. Vue Js also has a lifecycle and there are hooks to connect to these lifecycles and run functions there, these are lifecycle hooks.</p><p>These hooks can be shown in the diagram as follows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GuPF9Iep5TpjcfNEfxcouA.png" /></figure><p>I will tell you about the hooks used in Composition API. These are:</p><h3>🪝onBeforeMount()</h3><p>The onBeforeMount hook occurs just before the component is mounted to the DOM. The onBeforeMount lifecycle hook happens right before the onMounted hook.</p><p>Type:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fcarbon.now.sh%2Fembed%3Fbg%3Drgba%2528201%252C210%252C225%252C0%2529%26t%3Dblackboard%26wt%3Dnone%26l%3Djavascript%26width%3D685%26ds%3Dtrue%26dsyoff%3D20px%26dsblur%3D68px%26wc%3Dtrue%26wa%3Dfalse%26pv%3D56px%26ph%3D56px%26ln%3Dfalse%26fl%3D1%26fm%3DHack%26fs%3D14px%26lh%3D133%2525%26si%3Dfalse%26es%3D2x%26wm%3Dfalse%26code%3Dfunction%252520onBeforeMount%2528callback%25253A%252520%2528%2529%252520%25253D%25253E%252520void%2529%25253A%252520void&amp;display_name=Carbon&amp;url=https%3A%2F%2Fcarbon.now.sh%2F%3Fbg%3Drgba%252528201%25252C210%25252C225%25252C0%252529%26t%3Dblackboard%26wt%3Dnone%26l%3Djavascript%26width%3D685%26ds%3Dtrue%26dsyoff%3D20px%26dsblur%3D68px%26wc%3Dtrue%26wa%3Dfalse%26pv%3D56px%26ph%3D56px%26ln%3Dfalse%26fl%3D1%26fm%3DHack%26fs%3D14px%26lh%3D133%252525%26si%3Dfalse%26es%3D2x%26wm%3Dfalse%26code%3Dfunction%25252520onBeforeMount%252528callback%2525253A%25252520%252528%252529%25252520%2525253D%2525253E%25252520void%252529%2525253A%25252520void&amp;image=https%3A%2F%2Fcarbon.now.sh%2Fstatic%2Fbrand%2Fbanner.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;scroll=auto&amp;schema=carbon" width="1024" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/e8b0c8f7bc9c933d40b31a0f6896cda1/href">https://medium.com/media/e8b0c8f7bc9c933d40b31a0f6896cda1/href</a></iframe><h3>🪝onMounted()</h3><p>The onMounted hook is the function that will be called when the component is added to the DOM.</p><p>Type:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fcarbon.now.sh%2Fembed%3Fbg%3Drgba%2528201%252C210%252C225%252C0%2529%26t%3Dblackboard%26wt%3Dnone%26l%3Djavascript%26width%3D685%26ds%3Dtrue%26dsyoff%3D20px%26dsblur%3D68px%26wc%3Dtrue%26wa%3Dfalse%26pv%3D56px%26ph%3D56px%26ln%3Dfalse%26fl%3D1%26fm%3DHack%26fs%3D14px%26lh%3D133%2525%26si%3Dfalse%26es%3D2x%26wm%3Dfalse%26code%3Dfunction%252520onMounted%2528callback%25253A%252520%2528%2529%252520%25253D%25253E%252520void%2529%25253A%252520void&amp;display_name=Carbon&amp;url=https%3A%2F%2Fcarbon.now.sh%2F%3Fbg%3Drgba%252528201%25252C210%25252C225%25252C0%252529%26t%3Dblackboard%26wt%3Dnone%26l%3Djavascript%26width%3D685%26ds%3Dtrue%26dsyoff%3D20px%26dsblur%3D68px%26wc%3Dtrue%26wa%3Dfalse%26pv%3D56px%26ph%3D56px%26ln%3Dfalse%26fl%3D1%26fm%3DHack%26fs%3D14px%26lh%3D133%252525%26si%3Dfalse%26es%3D2x%26wm%3Dfalse%26code%3Dfunction%25252520onMounted%252528callback%2525253A%25252520%252528%252529%25252520%2525253D%2525253E%25252520void%252529%2525253A%25252520void&amp;image=https%3A%2F%2Fcarbon.now.sh%2Fstatic%2Fbrand%2Fbanner.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;scroll=auto&amp;schema=carbon" width="1024" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/2fbc936fa5542e815ec5e52646ff3ffd/href">https://medium.com/media/2fbc936fa5542e815ec5e52646ff3ffd/href</a></iframe><h3>🪝onBeforeUpdate()</h3><p>The onBeforeUpdate hook is called whenever there is a change in the data of a component, but before the update is rendered to the screen. The onBeforeUpdate lifecycle hook happens right before the onUpdated hook.</p><p>Type:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fcarbon.now.sh%2Fembed%3Fbg%3Drgba%2528201%252C210%252C225%252C0%2529%26t%3Dblackboard%26wt%3Dnone%26l%3Djavascript%26width%3D685%26ds%3Dtrue%26dsyoff%3D20px%26dsblur%3D68px%26wc%3Dtrue%26wa%3Dfalse%26pv%3D56px%26ph%3D56px%26ln%3Dfalse%26fl%3D1%26fm%3DHack%26fs%3D14px%26lh%3D133%2525%26si%3Dfalse%26es%3D2x%26wm%3Dfalse%26code%3Dfunction%252520onBeforeUpdate%2528callback%25253A%252520%2528%2529%252520%25253D%25253E%252520void%2529%25253A%252520void&amp;display_name=Carbon&amp;url=https%3A%2F%2Fcarbon.now.sh%2F%3Fbg%3Drgba%252528201%25252C210%25252C225%25252C0%252529%26t%3Dblackboard%26wt%3Dnone%26l%3Djavascript%26width%3D685%26ds%3Dtrue%26dsyoff%3D20px%26dsblur%3D68px%26wc%3Dtrue%26wa%3Dfalse%26pv%3D56px%26ph%3D56px%26ln%3Dfalse%26fl%3D1%26fm%3DHack%26fs%3D14px%26lh%3D133%252525%26si%3Dfalse%26es%3D2x%26wm%3Dfalse%26code%3Dfunction%25252520onBeforeUpdate%252528callback%2525253A%25252520%252528%252529%25252520%2525253D%2525253E%25252520void%252529%2525253A%25252520void&amp;image=https%3A%2F%2Fcarbon.now.sh%2Fstatic%2Fbrand%2Fbanner.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;scroll=auto&amp;schema=carbon" width="1024" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/d7ce5fe0f67c40ecfb128ad2c5485c03/href">https://medium.com/media/d7ce5fe0f67c40ecfb128ad2c5485c03/href</a></iframe><h3>🪝onUpdated()</h3><p>The onUpdated hook is called when the component updates the Dom tree.</p><p><strong>Note:</strong> This hook is called after any DOM update of the component, which can be caused by different state changes because multiple state changes can be batched into a single render cycle for performance reasons. If you need to access the updated DOM after a specific state change, use <a href="https://vuejs.org/api/general#nexttick"><strong>nextTick()</strong></a> instead. (<a href="https://vuejs.org/api/composition-api-lifecycle">https://vuejs.org/api/composition-api-lifecycle</a>)</p><p>Type:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fcarbon.now.sh%2Fembed%3Fbg%3Drgba%2528201%252C210%252C225%252C0%2529%26t%3Dblackboard%26wt%3Dnone%26l%3Djavascript%26width%3D685%26ds%3Dtrue%26dsyoff%3D20px%26dsblur%3D68px%26wc%3Dtrue%26wa%3Dfalse%26pv%3D56px%26ph%3D56px%26ln%3Dfalse%26fl%3D1%26fm%3DHack%26fs%3D14px%26lh%3D133%2525%26si%3Dfalse%26es%3D2x%26wm%3Dfalse%26code%3Dfunction%252520onUpdated%2528callback%25253A%252520%2528%2529%252520%25253D%25253E%252520void%2529%25253A%252520void&amp;display_name=Carbon&amp;url=https%3A%2F%2Fcarbon.now.sh%2F%3Fbg%3Drgba%252528201%25252C210%25252C225%25252C0%252529%26t%3Dblackboard%26wt%3Dnone%26l%3Djavascript%26width%3D685%26ds%3Dtrue%26dsyoff%3D20px%26dsblur%3D68px%26wc%3Dtrue%26wa%3Dfalse%26pv%3D56px%26ph%3D56px%26ln%3Dfalse%26fl%3D1%26fm%3DHack%26fs%3D14px%26lh%3D133%252525%26si%3Dfalse%26es%3D2x%26wm%3Dfalse%26code%3Dfunction%25252520onUpdated%252528callback%2525253A%25252520%252528%252529%25252520%2525253D%2525253E%25252520void%252529%2525253A%25252520void&amp;image=https%3A%2F%2Fcarbon.now.sh%2Fstatic%2Fbrand%2Fbanner.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;scroll=auto&amp;schema=carbon" width="1024" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/aecba1df08a8d28f2d1aca37f0ce92ac/href">https://medium.com/media/aecba1df08a8d28f2d1aca37f0ce92ac/href</a></iframe><h3>🪝onBeforeUnmount()</h3><p>The onBeforeUnmount lifecycle hook is called just before a component is removed from the DOM.</p><p>When this hook is called, the component instance is still fully functional.</p><p>Type:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fcarbon.now.sh%2Fembed%3Fbg%3Drgba%2528201%252C210%252C225%252C0%2529%26t%3Dblackboard%26wt%3Dnone%26l%3Djavascript%26width%3D685%26ds%3Dtrue%26dsyoff%3D20px%26dsblur%3D68px%26wc%3Dtrue%26wa%3Dfalse%26pv%3D56px%26ph%3D56px%26ln%3Dfalse%26fl%3D1%26fm%3DHack%26fs%3D14px%26lh%3D133%2525%26si%3Dfalse%26es%3D2x%26wm%3Dfalse%26code%3Dfunction%252520onBeforeUnmount%2528callback%25253A%252520%2528%2529%252520%25253D%25253E%252520void%2529%25253A%252520void&amp;display_name=Carbon&amp;url=https%3A%2F%2Fcarbon.now.sh%2F%3Fbg%3Drgba%252528201%25252C210%25252C225%25252C0%252529%26t%3Dblackboard%26wt%3Dnone%26l%3Djavascript%26width%3D685%26ds%3Dtrue%26dsyoff%3D20px%26dsblur%3D68px%26wc%3Dtrue%26wa%3Dfalse%26pv%3D56px%26ph%3D56px%26ln%3Dfalse%26fl%3D1%26fm%3DHack%26fs%3D14px%26lh%3D133%252525%26si%3Dfalse%26es%3D2x%26wm%3Dfalse%26code%3Dfunction%25252520onBeforeUnmount%252528callback%2525253A%25252520%252528%252529%25252520%2525253D%2525253E%25252520void%252529%2525253A%25252520void&amp;image=https%3A%2F%2Fcarbon.now.sh%2Fstatic%2Fbrand%2Fbanner.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;scroll=auto&amp;schema=carbon" width="1024" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/b1a05425027b2127c74f0f43e56fad86/href">https://medium.com/media/b1a05425027b2127c74f0f43e56fad86/href</a></iframe><h3>🪝onUnmounted()</h3><p>Registers a callback to be called after the component has been unmounted.</p><p>This hook can for example be used to remove event listeners or cancelling timers or intervals.</p><p>Type:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fcarbon.now.sh%2Fembed%3Fbg%3Drgba%2528201%252C210%252C225%252C0%2529%26t%3Dblackboard%26wt%3Dnone%26l%3Djavascript%26width%3D685%26ds%3Dtrue%26dsyoff%3D20px%26dsblur%3D68px%26wc%3Dtrue%26wa%3Dfalse%26pv%3D56px%26ph%3D56px%26ln%3Dfalse%26fl%3D1%26fm%3DHack%26fs%3D14px%26lh%3D133%2525%26si%3Dfalse%26es%3D2x%26wm%3Dfalse%26code%3Dfunction%252520onUnmounted%2528callback%25253A%252520%2528%2529%252520%25253D%25253E%252520void%2529%25253A%252520void&amp;display_name=Carbon&amp;url=https%3A%2F%2Fcarbon.now.sh%2F%3Fbg%3Drgba%252528201%25252C210%25252C225%25252C0%252529%26t%3Dblackboard%26wt%3Dnone%26l%3Djavascript%26width%3D685%26ds%3Dtrue%26dsyoff%3D20px%26dsblur%3D68px%26wc%3Dtrue%26wa%3Dfalse%26pv%3D56px%26ph%3D56px%26ln%3Dfalse%26fl%3D1%26fm%3DHack%26fs%3D14px%26lh%3D133%252525%26si%3Dfalse%26es%3D2x%26wm%3Dfalse%26code%3Dfunction%25252520onUnmounted%252528callback%2525253A%25252520%252528%252529%25252520%2525253D%2525253E%25252520void%252529%2525253A%25252520void&amp;image=https%3A%2F%2Fcarbon.now.sh%2Fstatic%2Fbrand%2Fbanner.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;scroll=auto&amp;schema=carbon" width="1024" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/6ff0456c7bb7f72ad07913d2f8994b42/href">https://medium.com/media/6ff0456c7bb7f72ad07913d2f8994b42/href</a></iframe><p>I can add this as a note. These hooks are not called during server-side rendering.</p><p>In general, these are the hooks and features for Composition API, I hope this was useful to you.</p><p>See you in the next writing.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b940ad06606d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cnk-tech/vue-js-lifecycle-hooks-b940ad06606d">Vue Js Lifecycle Hooks</a> was originally published in <a href="https://medium.com/cnk-tech">CNK Tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Context API and useContext]]></title>
            <link>https://medium.com/cnk-tech/context-api-and-usecontext-51dc94f15af3?source=rss----83aee5fc001b---4</link>
            <guid isPermaLink="false">https://medium.com/p/51dc94f15af3</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[hooks]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[context]]></category>
            <category><![CDATA[api]]></category>
            <dc:creator><![CDATA[Sena Akbulut]]></dc:creator>
            <pubDate>Fri, 16 Dec 2022 14:39:43 GMT</pubDate>
            <atom:updated>2022-12-13T14:29:03.352Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uwZ38Gr9x5FshhZ26iaedw.png" /></figure><p>Hello everyone, you may have heard of the Context API and the useContext hook separately many times. I will actually tell you the relationship and usage of these two definitions.</p><p>Firstly, <strong>Why you should use Context API</strong>?</p><p>You know that in React, props are passed to pass information from parent component to child component. But in a multi-component and complex related system, it becomes increasingly difficult to pass props. Because it needs to go through the components in between. This is called <strong><em>prop drilling</em></strong>.</p><p>The Context API is used to eliminate this problem.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DXRlMJI6HT9WBCfnqzcbBw.png" /></figure><p>For example, in this flow chart, when there is without Context API, it is necessary to pass the prop through the userProfile.js file in between, but when the Context API is used, it can be used directly in the file to be used without visiting the file or files in between.</p><p>So what steps do you need to perform to use it?</p><ol><li>Create a context</li><li>Use that context from the component that needs the data.</li><li>Provide that context from the component that specifies the data.</li></ol><h4>Create a context</h4><p>First, you will create a context and export it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JTYWdJuNGv-CMUJjYq2c4A.png" /></figure><p>You can use default value as an argument in createContext.</p><h4>Use the context</h4><p>Suppose you have a component that takes level and children.</p><p>To use context in this component, we need to define the useContext hook and our own defined context.</p><p>This is where the useContext hook comes into play.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SMIGJWNdatMwmCHBzM5LfA.png" /></figure><p>The component to be used at the beginning was like this,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aShu0Hft1IfRC4_zh8lJFQ.png" /></figure><p>When the context imported:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3hMnxnhmPOPeWkTnUAA8Rg.png" /></figure><p>In this way, since we define the level value as context, we can call it wherever we want.</p><p>🔗 <strong>useContext</strong> hook tells React that the LevelComponent component wants to read the LevelContext.</p><h4>Provide the context</h4><p>The Provider component helps wrap the components which have access to our context.</p><p>The Provider component receives a prop called “value,”, which can be accessed from all the components wrapped inside the Provider.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZNMKyAlaZlSYmzdYR_ADqw.png" /></figure><p>That’s it! You saw the Context API writing style and where the useContext hook is used.</p><p>Generally, the Context API is used in these operations:</p><ul><li>Authentication</li><li>Theming</li><li>Responsiveness</li><li>User profile management</li></ul><p>I hope I have informed you enough about Context API and useContext. See you in my next post.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2Fi67uIY4a61ejm%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2Fi67uIY4a61ejm%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2Fi67uIY4a61ejm%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="244" frameborder="0" scrolling="no"><a href="https://medium.com/media/7bdb31d793f43e157ebefabc90048359/href">https://medium.com/media/7bdb31d793f43e157ebefabc90048359/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=51dc94f15af3" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cnk-tech/context-api-and-usecontext-51dc94f15af3">Context API and useContext</a> was originally published in <a href="https://medium.com/cnk-tech">CNK Tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[React Hooks]]></title>
            <link>https://medium.com/cnk-tech/react-hooks-f3759319e8b4?source=rss----83aee5fc001b---4</link>
            <guid isPermaLink="false">https://medium.com/p/f3759319e8b4</guid>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[frontend]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[web]]></category>
            <category><![CDATA[hooks]]></category>
            <dc:creator><![CDATA[Sena Akbulut]]></dc:creator>
            <pubDate>Tue, 13 Dec 2022 11:32:24 GMT</pubDate>
            <atom:updated>2022-12-09T15:39:59.143Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GrH6P_BJ10DdckmGWOOA_g.jpeg" /></figure><p>Hi everyone, today I will tell about the most used React hooks. First of all, what does hooks mean? let’s look at this.</p><p>Hooks were added to React in 16.8 version. It allows you to use state and other React features without writing class. Hooks are the functions which <em>hook into</em> React state and lifecycle features from function components. It does not work inside classes.</p><p>Alright, what are the hooks rules? There are 3 rules for hooks:</p><ul><li>Hooks can only be called inside React function components.</li><li>Hooks can only be called at the top level of a component.</li><li>Hooks cannot be conditional</li></ul><p>Now that we have general information about React hooks, we can look at their types.</p><ul><li>useState Hook</li><li>useEffect Hook</li><li>useRef Hook</li><li>useCallback Hook</li><li>useMemo Hook</li><li>useContext Hook</li><li>useReducer Hook</li></ul><h3>🪝<strong>UseState Hook</strong></h3><p>The useState hook allows you to create state variables in React function component. In this way, you access and update certain values in components over time.</p><p>When we create a state variable, we must provide it a default value.</p><p>Below is a simple example where you can update the color state.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/988/1*0TVr0O1kfEQVAo3QFYVRDg.png" /></figure><p>It is defined in [ ] with a const prefix, the first value is the changed or retained value and access is provided by this value. The second value is the state function, the state value is changed with this function, usually starts with “set”. On the other side of the equation are the useState function and its first value.</p><p>You can update the state with functions that update it, in this example, I updated it with onClick.</p><h3>🪝UseEffect Hook</h3><p>The useEffect hook allows you perform side effects in your component. Some examples of side effects are, fetching data, directly update the DOM and timers.</p><p>Let’s use a timer as an example.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/988/1*K0vD1-K_OV6ZJcvPxfUqEQ.png" /></figure><p>When I do this way it will running continuously but I want it to run 1 time so I need to second parameter for useEffect.</p><pre>useEffect(() =&gt; {<br>  //Runs only on the first render<br>}, []);</pre><p>Final version with correct spelling:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/988/1*5quzz62-4iZyEuGw8bXlSA.png" /></figure><h3>🪝UseRef Hook</h3><p>Refs are special attribute that are available on all React components. They allow you to create a reference to given element/component when the component mounts.</p><p>useRef allows us to use React refs. They are helpful when we want to directly interact with an element, such as to clear its value or focus it, as with an input.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/988/1*SaR2Q6TvoInbc2cIjZVvbg.png" /></figure><h3>🪝UseCallback Hook</h3><p>The useCallback hook returns a memoized callback function. Memoization is caching a value so that it does not need to be recalculated. This allows us to isolate resource intensive functions so that they will not automatically run on every render. The useCallback hook only runs when one of its dependencies update and this can improve performance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/988/1*3hubE5GJrFXu9LCJ26xZzQ.png" /></figure><p>Using this way it won’t be rendered again when it doesn’t change.</p><h3>🪝UseMemo Hook</h3><p>The useMemo hook returns a memoized value. UseMemo hook to memoize the <em>expensiveCalculation</em> function and the useMemo hook only runs when one of its dependencies update. This can improve performance.</p><p>useMemo returns a value from the computation, which is then stored in a variable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gT2_9BqIREnT6MaKUUb57Q.png" /></figure><h3>🪝UseContext Hook</h3><p>In React, there are multiple prop requirement problems to pass data from one parent to two or more levels, and this is called <em>prop drilling</em>.</p><p>Context is helpful for passing props down multiple levels of child components from a parent component and sharing state across your app component tree. The useContext hook removes the unusual-looking render props pattern that was required in consuming React Context before.</p><p>I will talk more about this hook in my next post.</p><h3>🪝UseReducer Hook</h3><p>The useReducer is a state management hook like useState. The difference is that useReducer allows custom state function. This function is also called <em>reducer</em>.</p><p>useReducer, more helpful for managing state across multiple components that may involve different operations or “actions”.</p><p>useReducer hook accepts two arguments:</p><blockquote>useReducer(&lt;reducer&gt;, &lt;initialState&gt;)</blockquote><p>The reducer function contains your custom state logic and the initialState can be a simple value but generally will contain an object.</p><p>The useReducer hook returns the current <em>state</em> and a <em>dispatch</em> method.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mnn2tXk935dLxF7SN763wg.png" /></figure><p>I hope I have given enough information about hooks. In my next post, we will examine the useContext hook in more detail. See you 👋</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F1jkVi22T6iUrQJUNqk%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2F1jkVi22T6iUrQJUNqk%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2F1jkVi22T6iUrQJUNqk%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="428" frameborder="0" scrolling="no"><a href="https://medium.com/media/1ff831551305c8d4aa92329d63a14cbb/href">https://medium.com/media/1ff831551305c8d4aa92329d63a14cbb/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f3759319e8b4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cnk-tech/react-hooks-f3759319e8b4">React Hooks</a> was originally published in <a href="https://medium.com/cnk-tech">CNK Tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Controlling and directing browser’s back button with JavaScript]]></title>
            <link>https://medium.com/cnk-tech/controlling-and-directing-browsers-back-button-with-javascript-eaa798acdeb5?source=rss----83aee5fc001b---4</link>
            <guid isPermaLink="false">https://medium.com/p/eaa798acdeb5</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[button]]></category>
            <category><![CDATA[function]]></category>
            <category><![CDATA[browsers]]></category>
            <dc:creator><![CDATA[Faris Kanbur]]></dc:creator>
            <pubDate>Thu, 21 Apr 2022 14:03:01 GMT</pubDate>
            <atom:updated>2022-04-21T14:03:01.780Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/814/1*HpuwzbNpxz6zQ92MwObdjg.png" /></figure><p>In js, we sometimes use the back or forward button when switching or redirecting pages. But sometimes we need to use the browser’s back or forward buttons, and in this case, if we want to control these buttons and redirect, the <strong><em>goBack()</em></strong> function may not work.For this reason, we may need to somehow control this action (the action of pressing the browser’s back button) and direct it to the pages we want.For example, you are building a platform and you are using a form on your page where members need to enter their information, or you use a rich text editor such as Ckeditor/jodid etc and you want to display the final version of it on your next page.and after you see the final version here, you want to go back to the form page and make the necessary changes by pressing the Borwsers back button to edit the places you don’t like.Yes, you can do this by defining the <strong><em>goBack( )</em></strong> function to the Button you have defined and designed on our own page.</p><p><strong><em>&lt;button onClick = {() =&gt;history.goBack()}&gt;Go Back&lt;/button&gt;</em></strong></p><p>But what if the user uses the browser back button? your page can go to the main page or to two previous pages if you didn’t edit it.For this reason, you should control the browser’s back button and make it act as you want. How can we do this? We can do this in two ways, at least I found these two methods, if anyone finds different methods, you can share them in the comments so that we can learn new methods together.</p><p><strong>1-</strong>The first method is to disable the browser’s back button, that is, to prevent this process when the user wants to click the back button in the browser. In this way, the user will press the back button that we defined to go back and our goBack function will work and go to the previous page.You can use one of the following for this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/356/1*3AD3_Xid9IOu37HOedSEQA.png" /></figure><p><strong><em>a) &lt;button onClick = {() history.goBack()}&gt;Go Back&lt;/button&gt;</em></strong></p><p><strong><em>b) &lt;a href=”javascript: history.go(-1)”&gt;Go Back&lt;/a&gt;</em></strong></p><p><strong><em>c) &lt;a href=”##” onClick=”history.go(-1); return false;”&gt;Go back&lt;/a&gt;</em></strong></p><p><strong>2-</strong>The second method is to control the browser’s back button and send it to the page you want. So how do we do this? There are many articles and questions about this on Stackoverflow, you can find various answers there, but I will share with you the method that I think is the easiest and most understandable one, of course for Js.</p><p><strong><em>const onBackButtonEvent = (e) =&gt; {</em></strong></p><p><strong><em>e.preventDefault();var currentLocation = window.location.pathname;</em></strong></p><p><strong><em>history.push(`${currentLocation}/mypage/new`)};</em></strong></p><p><strong><em>useEffect(() =&gt; {window.addEventListener(‘popstate’, onBackButtonEvent);return () =&gt; {window.removeEventListener(‘popstate’, onBackButtonEvent);</em></strong></p><p><strong><em>};}, [])</em></strong></p><p>Now I’ll try to briefly explain what’s going on here. First of all, in order for our application to realize that the browser has pressed the back button, we add into the useEffect : <strong><em>window.addEventListener(‘popstate’, onBackButtonEvent);</em></strong> Of course, after we get what we want later, we can remove this : <strong><em>window.removeEventListener(‘popstate’, onBackButtonEvent)</em></strong>;Well, there may be a question here. What happens if we don’t add =&gt; <strong><em>window.removeEventListener(‘popstate’, onBackButtonEvent)</em></strong>;?As an answer, I can say that it won’t be in your mind until you try it, so even if I say yes or no, you can try the code I shared above by copying it to make it more permanent.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*nf6ZA-e-gNR4GxePr9aAMQ.png" /></figure><p>By doing this, =&gt;<strong><em> window.addEventListener(‘popstate’, onBackButtonEvent);</em></strong> we now know that onBackButtonEvent will work thanks to addEventListener.Now it’s time to determine what this function will do when called.</p><p><strong><em>const onBackButtonEvent = (e) =&gt; {</em></strong></p><p><strong><em>e.preventDefault();</em></strong></p><p><strong><em>var currentLocation = window.location.pathname;</em></strong></p><p><strong><em>history.push(`${currentLocation}/mypage/new`)</em></strong></p><p><strong><em>};</em></strong></p><p>Here we call our function hey bro you first make <strong><em>e.preventDefault();</em></strong> and save me a burden and then the most important thing to me is to able to go to the page I want when I press the back button of the browser.We do this by taking the URL of the page, which I will explain in detail in my next article.</p><p><strong><em>var currentLocation = window.location.pathname;</em></strong></p><p><strong><em>history.push(`${currentLocation}/mypage/new`)</em></strong></p><p>In short, to summarize the situation, we filled the information from the form page and went to the preview stage, then when the user wants to use the browser’s back button instead of the button we put on the page, we direct him to the page we want, I explained it here based on the example of redirecting to the previous page, but you can redirect to the page you want).</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eaa798acdeb5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cnk-tech/controlling-and-directing-browsers-back-button-with-javascript-eaa798acdeb5">Controlling and directing browser’s back button with JavaScript</a> was originally published in <a href="https://medium.com/cnk-tech">CNK Tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Fibonacci Sequence Algorithm with Javascript]]></title>
            <link>https://medium.com/cnk-tech/fibonacci-sequence-algorithm-with-javascript-4e31b35dc3ad?source=rss----83aee5fc001b---4</link>
            <guid isPermaLink="false">https://medium.com/p/4e31b35dc3ad</guid>
            <category><![CDATA[addeventlistener]]></category>
            <category><![CDATA[css]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[fibonacci-sequence]]></category>
            <category><![CDATA[getelementbyid]]></category>
            <dc:creator><![CDATA[Faris Kanbur]]></dc:creator>
            <pubDate>Thu, 21 Apr 2022 14:03:00 GMT</pubDate>
            <atom:updated>2022-04-21T14:03:00.178Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*SE5KozggtQesO1jHaB-KkA.jpeg" /></figure><h3>What are Fibonacci Numbers ?</h3><p>Fibonacci numbers are used to create <a href="https://www.investopedia.com/terms/t/technicalindicator.asp">technical indicators</a> using a mathematical sequence developed by the Italian mathematician, commonly referred to as “Fibonacci,” in the 13th century. The sequence of numbers, starting with zero and one, is created by adding the previous two numbers. For example, the early part of the sequence is 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89,144, 233, 377, and so on.</p><p>For more information : <a href="https://www.livescience.com/our-solar-system.html">https://www.livescience.com/our-solar-system.html</a></p><h3>Different methods for Fibonacci Sequence:</h3><p>You will see that there are many resources and solutions on this subject when you search on the internet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*2IzYO7Z0B67XxmIQgJznUA.png" /></figure><h3><strong>1.Loops</strong></h3><p>Examples of this can first be solved with loops.</p><h4>a. While Loop</h4><p>While a <strong><em>“while Loop”</em></strong> allows you to run a code, it will terminate your code execution when a specified condition is true but the condition is no longer true.</p><p>While doing this with the while loop, we can use different methods in our code by making small changes and get the same result.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/801/1*O1wPABa8E2XBUaSEhCnq9Q.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/809/1*onBSfptsAZWhjVMoaLdXrg.jpeg" /><figcaption><strong>Image-1 &amp; Image-2</strong></figcaption></figure><p>As you can clearly see here, we first define the function, then we define <strong><em>“while loop”</em></strong> in it and return our result with “return”.As can be seen above, the only change here is that in the first application, we defined the “result” part in the function and we did not have to define [0,1] <em>(as seen in Image two)</em>in the console log while getting the output.However, if you want to reach the last element of the last list, not the number array, you should revise the <strong><em>“return”</em></strong> part as follows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/664/1*JkV4vstDAp2fpPJZTqubKw.jpeg" /></figure><h4>b. For Loop</h4><p>The for loop is executed a <strong><em>certain number of times</em></strong>, and if the loop continues to satisfy the specified condition each time it returns, it continues to run in the loop.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/824/1*-Kzij7JiWtoqdTpGhozgrg.jpeg" /></figure><p>In this example, we can reach the results we want by making a small change in the <strong><em>“return” </em></strong>part.We can bring a solution to this situation by adding a small change to the point of view.</p><p>I would like to show you the example below with a little change in two ways.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/464/1*7nneTj2-US39MefUN_T4sg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/460/1*ILQ9hU-4C7SylWc1wfaldw.jpeg" /><figcaption>sample - 1 &amp; sample-2</figcaption></figure><p>The point to be considered here is that in both examples, while<strong><em> arr = [0,1]</em></strong>, in sample one , the value of “<strong><em>i</em></strong>” from zero but in sampe two “<strong><em>i</em></strong>” starting from 2.In order that the lengths of the list we get as a result are equal, the conditions inside the for loop must be adapted accordingly.But the other thing that catches your attention here is that the <strong><em>“arr.push”</em></strong> parts also look different, but if we examine them carefully, we see that they give the <strong><em>same result</em></strong> here.I tried to express this as visually below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/956/1*M3c2jt-RYvVDQ6nxBCIA-w.jpeg" /></figure><p>Finally, if you want to take the desired number and output it to the screen and you want to do it according to certain conditions, you can do it as follows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/754/1*m2MFVRwdn4DJslWbDpi79A.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/511/1*V-tGgUuIFehHuqlUZqIrYg.jpeg" /></figure><p>First of all, you must create the input and button part that will allow the user to enter and send the relevant arrangement on the html page.Then you should get the information the user has entered with getElementById.and you need to determine the action(the functions which we mentioned above ) with addEventListener that to be done after pressing the user the button to send input information.if you want to add various conditions or add restrictions regarding the data to be entered, you can specify that it is shown in the above example in html and javaScript files.</p><p><a href="https://faris-kanbur.github.io/Fibonacci-Sequence-Algorithm/">Document</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4e31b35dc3ad" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cnk-tech/fibonacci-sequence-algorithm-with-javascript-4e31b35dc3ad">Fibonacci Sequence Algorithm with Javascript</a> was originally published in <a href="https://medium.com/cnk-tech">CNK Tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is Agile and Scrum?]]></title>
            <link>https://medium.com/cnk-tech/what-is-agile-and-scrum-c3e12eccdbcb?source=rss----83aee5fc001b---4</link>
            <guid isPermaLink="false">https://medium.com/p/c3e12eccdbcb</guid>
            <category><![CDATA[agile]]></category>
            <category><![CDATA[teamwork]]></category>
            <category><![CDATA[kanban]]></category>
            <category><![CDATA[scrum]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Faris Kanbur]]></dc:creator>
            <pubDate>Thu, 21 Apr 2022 14:02:47 GMT</pubDate>
            <atom:updated>2022-04-21T14:02:46.938Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LdlnI_39b1GvzNvR1NELIg.png" /></figure><p>The software industry is going crazy on Agile matters. It is rapidly becoming the choice of software development when the climates are unpredictable or are expected to change over time.Here will try to help you gain knowledge on what is Agile, why Agile is better suited for these situations. We will also cover some of the most common Agile frameworks, like SCRUM and XP in-depth.Firsit of all we’re going to talk about Agile Fundamentals, why Agile? What is Agile? What are Agile values and principles? And what are the benefits and challenges of this approach?</p><p>After that we’re going to talk about how do you do Agile requirements and planning? What is the Agile approach to requirements? How do you write effective user stories? So user stories are something that we will learn about in Agile. How do you generate user stories?And at last we are going to talk about SCRUM which is one of the ways to implement Agile. We’re going to learn in detail about what are the practices and ceremonies of SCRUM.If we have enoug time we can talk about in this article we’re going to learn about an overview of XP and some of the practices and principles of XP.But if we dont we can talk about it in another article.Of course, while writing these, some terms may seem unfamiliar to those who are new to the field of Software Development.You can share these terms in the comments if you want and I can find extra explanation about them or they can be found easily from google.Actually agile is not a model, it’s a mindset. There were a lot of top leaders in the software industry that were building the software very successfully. And so they came together and said, “What is it that we are doing that is making us successful?” And they articulated what we call now the Agile Manifesto and Principles.</p><p>And as these Manifesto and Principles were crafted, there were models like Scrum and Kanban and XP that helped implement this mindset, that helped promote this mindset. So, you can see it’s not just these three but many other models came into being. The basic idea behind all of these models was that instead of building this whole one year cycle, you build in short cycles.So, you define little, you build, you test, and you learn, and then again, you just keep doing this. That way, you can adjust to the market quickly and then you are learning from your users quickly. And so the change became a norm because after every cycle, you may have a change.</p><p>And so, the software industry also has to learn how to respond to this change quickly and confidently. And the idea of continuous integration where a developer who is building the code, as soon as he commits the code or as soon as he finishes the code, it’s integrated with all the other components of that software. And then all the tests that verify whether the system is running are run. They are called the automated testing. So as soon as you commit the code, all of the tests are tested to make sure nothing else is broken in the system.</p><p>Now we will continue by briefly trying a few models that I think are important.</p><p><strong>Predictive model:</strong> In this model, the customer knows exactly what she/he wants and the code is not interfered with in the process.</p><p><strong>Adaptive model: </strong>The customer does not know exactly what he wants, he has an idea about what he wants and the process begins, but with the feedback, the project begins to take shape. The final product is created according to user requests.</p><p><strong>Incremental model</strong>: We have an idea of what we want here, but as in predictive, the process does not consist of a single stage and we divide the stages into parts and do it. For example, you want to build a house and you make the outer walls of the house in this first incremental, you add the roof in the second, you attach the doors and this way you complete the pieces of the whole time and build the house .So here, we can actually associate it with both the Adaptive model and the Predictive model. Because if you get feedback on each Incremental piece and shape the final iron accordingly, this is similar to the <strong>Adaptive model,</strong> but if you stay fixed with the idea you started without returning, it is similar to the <strong>Predictive model</strong> in a way.</p><p><strong>Iterative model:</strong>If we were to explain this with an example, think about if you want to go somewhere, and you need a vehicle for this, and you may decide to go with a scooter so that it will be cheaper at first, but you may decide to go with a scooter, but on the way, your mind will change and you can change it with an electric bike and then you will find the place where you want to go. You can change your mind to a car by saying that it is too far and it may rain while you are on the road. In short, you have a purpose, this is certain, but in this process, the product that will serve this purpose may change according to the needs of the user.</p><h3>So what is Agile?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3HsY_YaX6ipnme4Tkh1kmQ.png" /></figure><p>Now, if we refer to the waterfall method while explaining the network, I think it will be more understandable. When you look at the photo above, you will see the comparison of the agile and waterfall method. What are the common things between them? In both of them, there is a time frame to develop a product, there is a product that needs to be developed, there is a team that needs to develop this product, and there are processes such as testing and design in this development process.In Agile, processes are made in short parts and it is easier for you to understand that you need to take or take precautions in case of any disruption that may occur, new interventions (customer needs, etc.)</p><p>But in waterfall, if you have not determined the needs correctly, it is not possible in most cases to intervene in the situation until the product is released, because the intervention system to be used may turn upside down and this may cause great losses in terms of both time and cost.</p><p>If the needs are determined correctly and if the process takes a long time, people’s wishes may change this time. Besides, it is very difficult to determine the requiremnt most of the time. If a problem occurs and the problem is faked too much, the cost will be high.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/565/1*97xcBfs-szW6Gw5RLovaPQ.png" /></figure><p>Many negativities in the processes led to the development of Agile Software Development Manifesto. And these people met at a resort in Utah in 2001. They skied, relaxed, and also identified these four values and twelve principles.Because they also talk among themselves why so many projects have been unsuccessful. As you can see, they did not define a new process or new applications. They said that this is the common mentality of the method we found successful. They just defined a mindset that can help software development teams succeed. In summary, what the industry has realized is that software development is a creative process and we need adaptive methods to be successful at it. And the following 4 values have been determined.</p><p><strong>The four core values of Agile software development as stated by the Agile Manifesto are:</strong></p><ul><li>individuals and interactions over processes and tools,</li><li>working software over comprehensive documentation,</li><li>customer collaboration over contract negotiation,</li><li>responding to change over following a plan</li></ul><p>To briefly explain these items. First, “individual interactions on processes and tools”. What this means is that most of the time when there is a problem or we want to improve our processes, we always look, you know, is there an additional process that can help us? Is there another tool that can help us? And we do not focus on individuals and their interactions.Too often we don’t invest enough in individuals and interactions. Second, “software running on extensive documentation”. Like I said, that doesn’t mean you haven’t documented. You do it, you do the documentation wherever it’s critical, whatever it takes, but then what customers really care about is the software that works.Third, “customer cooperation rather than contract negotiation”. That’s why a contract is important because it defines a limit at which you should work, but only through collaboration can you understand the user’s needs and build better software. And the last one is “responding to change by following a plan”. Again, a plan is needed because it helps you stay on track. But we shouldn’t say no to change and ultimately build something that the user won’t need.</p><p>Well, Agile has no negative aspects, is it always very good? Of course, like everything else, we can’t expect it to be perfect in Agilene. It is very good in terms of process management and interaction, but what I can say negative about it comes out. For example, when we want to be able to adapt to changes immediately and are managed in small pieces, when there is constant change, we can get confused in the team and the project staff and I wonder what we are doing in the project.People say that what should we changed again and it can sometimes demoralize people.</p><p>In addition, new changes and needs in the Frontend will cause the database modeling to change constantly, which may cause developers to feel lost in control. In addition, the fact that the customer is constantly involved in the process and is in direct communication with the developers can create extra pressure on the developers. In addition, agile is not very much suitable for predictive and repeatable works. Yes it can be used here, but it can be used in traditional models or predictive models here.</p><blockquote><strong>Not:</strong> Predictive modeling is a widely used statistical technique to predict future behavior. Predictive modeling solutions are a form of data mining technology that works by analyzing past and current data and creating a model to help predict future outcomes.</blockquote><blockquote><strong>Not: </strong>Traditional strategy development assumes that markets/industries are stable, but this is not the rule for most firms today. The strategy is built on some vital assumptions about the external environment and what the firm can control. planning, controlling and stopping.</blockquote><p>Apart from this, there are <strong>12 Agile Principles</strong> as I have listed below, which I will not mention in detail here. There are many explanations and resources on this subject, both on youtube and on google, you can get much more detailed information from <a href="https://www.youtube.com/watch?v=5jCc2KByx60"><strong>here</strong></a>.</p><p><strong>1-</strong>Our highest priority is to satisfy the customer through early and continuous delivery of valuable software.</p><p><strong>2-</strong>Welcome changing requirements , even late in development. Agile processes harness change for the customer’s competitive advantage.</p><p><strong>3-</strong>Deliver working software frequently, from a couple of weeks to a couple of months, with a preference to the shorter timescale.</p><p><strong>4-</strong>Business people and developers must work together daily throughout the project.</p><p><strong>5-</strong>Build projects around motivated individuals. Give them the environment and support they need, and trust them to get the job done.</p><p><strong>6-</strong>The most efficient and effective method of conveying information to and within a development team is face-to-face conversation.</p><p><strong>7-</strong>Working software is the primary measure of progress.</p><p><strong>8-</strong>Agile processes promote sustainable development. The sponsors, developers, and users should be able to maintain a constant pace indefinitely.</p><p><strong>9-</strong>Continuous attention to technical excellence and good design enhances agility.</p><p><strong>10-</strong>Simplicity–the art of maximizing the amount of work not done–is essential.</p><p><strong>11-</strong>The best architectures, requirements, and designs emerge from self-organizing teams.</p><p><strong>12-</strong>At regular intervals, the team reflects on how to become more effective, then tunes and adjusts its behavior accordingly.</p><p>Well, if this Agile is so important, you can think about which companies are using it, here are some companies that use agile; <strong>Google, Apple, Facebook, Yahoo, Spotify, Adobe, AirBnB, SpaceX,Microsoft.</strong></p><h3>Agile Frameworks</h3><p>So as we know, Agile is a mindset. So the question is, how do you actually apply this mindset on a software development process? Well, the good news is that there are a lot of frameworks that are available that you can use to apply this Agile mindset for your team or for your project. But there’s no silver bullet. So you have to customize this framework to meet the needs of your team, your project, or your organization. And the key to customization is to make sure that you stay true to the principles and the values of Agile and do not get bogged down by the rituals or practices of a specific framework. So, let’s familiarize ourselves with some of these frameworks which are out there. One of the most common ones is called Scrum.</p><p>And Scrum is based on this one to four week cycle, where you take part of your project and you do your define, your develop, your design and you test your software and so your product is developed incrementally. Another popular one is called Kanban, which is based on a continuous flow model where you basically try to optimize your existing software development process. Then of course there is a combination of these two called Scrumban where you use Scrum as your primary framework. And then you use Kanban to optimize your flow within your sprint.</p><p>Another popular one which is similar to Scrum is called XP. And so XP has most of the practices of Scrum but it also defines some engineering practices which are very crucial for an Agile team. Then of course there is the hybrid of Scrum and XP. Another one which has become quite popular recently is called Lean Startup which helps you if you have a lot of unpredictable market or industry and you want to really prove your solution before you implement it. So Lean Startup helps you in that area. And there are many more. And more often than not, organizations actually end up customizing some of these frameworks to meet the needs of their team, or their project, or the organization. And if I may repeat, I want to make sure that you stay true to the Agile principles and practices and do not get bogged down by the rituals or practices of a specific framework. In terms of popularity, Scrum is by far the most popular of all. It’s about 70% of the Agile teams use either Scrum or one of its variants. And that’s how sometimes, people equate Agile to Scrum, which, of course, you can see that it’s not true. There are so many frameworks out there that you can use for your Agile implementation.</p><p>Scrum teams usually work with 2-week sprint series. Each sprint proceeds with a sprint planning meeting. The product owner and development teams also attend this meeting. And according to this meeting, the tasks are taken from the Product Backlog to the Sprint Backlog. If there is an unfinished business at the end of the sprint, you can take it back to the sprint backlog. And all the work is “todo” from the Scrum Board. It is followed from the “in progress” and “done” fields and discussed at daily stand-up meetings. In Scrum projects, a product or function is expected to be obtained at the end of the sprint. At the end of the sprint, new features are shown by making a Sprint review. In addition, a Retrospective meeting is held to improve performance in the new sprint. For this reason, it is tried to be corrected by determining what went well or not well during the sprint.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u0J0kLx8RhwEP7-BP0o59g.png" /></figure><p>There are no two-week sprints and sprint backlogs in kanban. We can say that the work continues regularly by taking the work from the previous column of the empty columns (“todo” “in progress” and “done”). The works from the Kanban board are tracked and there is no time constraint, so the work is constantly finished. The most important thing here is to bring a work restriction to the columns. For example, there can be a maximum of 1 job in the “in progress” part. Daily meetings are held in kanban, like scrum, and new features are introduced, but unlike a certain time interval.</p><p><strong>User Story ?</strong></p><p>I think there is another important issue that we need to focus on is the user story.A user story is the smallest unit of work in an agile framework. The purpose of a user story is to express how a piece of work will bring back a certain value to the customer. So how should user stories be. We can summarize this under 6 headings;Independent, Negotiable, Valuable, Estimable, Small, Testable.Since the subject titles are clear, I will not go into details.I would like to point out that these titles are only for creating a perspective and emphasizing their importance. These are subject to change and extra titles can be added to them.</p><p><strong>Story map?</strong></p><p>One of the most popular problems faced by product development teams is the revision of requirements by customers repeatedly during development work. Although the story map makes our work easier, the dynamic and harmonious relationship and priorities of the product functions represented by these stories are simple and straightforward for anyone working on the project. To put it in an understandable way requires a separate study.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oJj5tGNTIY8f7nJ4mak9mw.png" /></figure><p>The purpose of Jeff Patton’s Story map is to visualize the needs of a product within the scope of the product in a hierarchical manner and to ensure that the overall impact of possible new requirements can be understood by all participants.Situations that can be considered technically detailed should be written in a simple and common language owned by all participants. In addition, they can be updated during the product development process. All stakeholders related to the project can be included in this study. User story It allows everyone to meet at the same point as an idea.</p><h3><strong>Scrum</strong></h3><p>As you know, the Product owner collects all the necessary inputs from users, customers, etc., and the product Backlog is created.If the team is ready, the sprint planning meeting starts. During this time, if the team has questions, the product owner answers them. Then Sprint Backlogs are created here and sprints are planned.We talked about Scrum in general terms and how it works, now we will talk about the important terms here in more detail.</p><p><strong>Product Owner:</strong> Prioritizes the work in Scrum.Defines what needs to be done and in what order. Product Owner is going to talk to the executives, the team, the stakeholders, clients, users, and will try to define what exactly needs to be built. And so that will create something called a product backlog,which is basically a list of user stories which are prioritized and defines what needs to be done. Product owner reviews stories with the team and helps answer any questions or clarifies anything that is not clear.In short, he is the person who determines what work the Development Team will do in the Scrum Team. In this sense, he is the manager of the “Product Backlog”.Responsible for clarifying and prioritizing business requests.</p><p><strong>Scrum Master:</strong> The Scrum Master is the person who takes part in the Scrum Team and coaches the team.Helps the team stay true to the Scrum values and principles, and then you will also notice that the Scrum Master helps facilitate most of the meetings in the team.And then if there are any roadblocks,then he will be the one who will drive the resolution of some of these roadblock.It strives to increase the harmony within the team, the harmony and communication between the team members.</p><p><strong>Product Backlog Refinement (Backlog Grooming):</strong>It is a business process where the Scrum Team reviews the Product Backlog and makes the necessary adjustments, making sure that each item in the list is detailed and understood with all its clarity. Those are (informal meetings ) not in the Official Scrum Guide, but are often organized by the product owner.</p><p><strong>Development Team</strong>: Do most of the building of the software, and it includes the developers and testers and everyone.Team is ready to sprint, they get together for a meeting called a Sprint Planning Meeting, where the whole team gets together and then they pick the top stories that they can work on in the existing sprint.In summary, the “Development Team” is the development team whose number varies from 3 to 9, taking as much work as it can do during a certain Sprint from the Product Backlog, which is the Product Owner’s to-do list, according to the priority determined by the Product Owner.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Mk9IZWQKmYlhBYaANJ4LVA.png" /></figure><p><strong>Product Backlog:</strong>The Product Backlog is a single list of everything needed in the product. Each item recorded in the Product Backlog is called a “Product Backlog Item.To summarize this in the shortest way, the work that needs to be done for the product can be explained as the list of features that the product should have.</p><p><strong>Sprint Planning Meeting : </strong>Where the whole team gets together and then they pick the top stories that they can work on in the existing sprint. And the product owner reviews those stories with the team and helps answer any questions or clarifies anything that is not clear.</p><p><strong>Sprint Backlog: </strong>The Sprint Backlog is a timed work list that keeps the content of a team’s work during the Sprint.</p><p><strong>Daily Standup: </strong>Who participates in daily standup? What is its purpose? How can we get a good yield, now let’s talk about these a little bit.Usually the Core team and also the stakeholder can join to get information if needed or wanted.The key here is to cooperate with daily planning and check how things are going.And daily standups shouldn’t be long and everyone should be able to see the board which the works are written.This topic should be kept short, because a topic that you want to focus on may not be of interest to others and this issue should be resolved later, after daily standup. This should not waste time for others.</p><p><strong>Sprint Review:</strong>Sprint Review is a meeting held at the end of the sprint and lasts for a maximum of 4 hours but an average of 1–2 hours. The main purpose of Review is to determine the value produced in the sprint and to update the Product Backlog accordingly.Here you start with summarizing what you planned, what you finished, what were your learnings, what were the road blocks, until you summarize what exactly happened in your sprint?You get some feedback, and based on that you can adjust your future direction. Who do you invite? Your core team members, your stakeholders and if there’s anyone else you want, also them</p><p><strong>Stories: </strong>Stories are items that contain information about the work that a team and software developer undertake to complete during the sprint, taking into account the effort that will be spent.</p><p><strong>Sprint Retrospective:</strong> Talk about process not about product.Not everything goes well during the process and sometimes some things need to be changed or updated. Therefore, questions arise in your mind to make the next processes better by giving good answers to them. How can we do better? What went well and what didn’t go well in the last sprint. Only the Core team participates in this.</p><p><strong>Burndown/Burnup chart</strong>: Shows the amout of work left over the days of the sprint.Are we gona make it or not? Do we need additional help? We are going to use it for tracking our sprint.</p><h3>How can we do Sprint Planning?</h3><p>We can do sprint planning like this. First, we get a story (of course, in the order of priority and importance that we determined as a result of the meetings and arrangements we made before) and if our capacity is full, we start them, if not, we get the next story until our capacity is full.First of all, we determine the sprint capacity, while being realistic and making use of previous sprints and experiences. Then we ask ourselves “what are we trying to achieve in this sprint?” and we review the sprint goal, we review potential stories, the product owner shares and explains what those stories are generally.</p><p>Then we talk about how to apply the stories, what are the tasks we need to do, and we make a decision. And then if the thing is not accomplished, what was originally suggested abandons the process and then you can improve the goal. Once this is done, the entire team commits to “yes, we are ready and committed to finishing these stories”. And then once the commit is made, you put the stories on the quest wall and start executing.</p><p><strong>Resources;</strong></p><p>1-<a href="https://www.agileturkey.org/">www.agileturkey.org</a></p><p>2-<a href="https://www.atlassian.com/agile">https://www.atlassian.com/agile</a></p><p>3-<a href="https://agilemanifesto.org/">https://agilemanifesto.org/</a></p><p>4-<a href="https://agilemanifesto.org/">https://agilemanifesto.org/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c3e12eccdbcb" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cnk-tech/what-is-agile-and-scrum-c3e12eccdbcb">What is Agile and Scrum?</a> was originally published in <a href="https://medium.com/cnk-tech">CNK Tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Flutter | Platform Spesifik Widget Tasarlamak (iOS&Android — Factory Pattern)]]></title>
            <link>https://medium.com/cnk-tech/flutter-platform-spesifik-widget-tasarlamak-ios-android-factory-pattern-bc0ffdde7ac9?source=rss----83aee5fc001b---4</link>
            <guid isPermaLink="false">https://medium.com/p/bc0ffdde7ac9</guid>
            <category><![CDATA[android]]></category>
            <category><![CDATA[design-patterns]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[computer-science]]></category>
            <dc:creator><![CDATA[Samed Harman]]></dc:creator>
            <pubDate>Fri, 31 Dec 2021 08:28:48 GMT</pubDate>
            <atom:updated>2021-12-31T08:28:47.989Z</atom:updated>
            <content:encoded><![CDATA[<h3>Flutter | Platform Spesifik Widget Tasarlamak (iOS&amp;Android — Factory Pattern)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h8LKnYv9a-BvP8Ib4OgUmw.png" /></figure><p>Flutter projelerimizde kimi zaman Android ve iOS için farklı görünümler tasarlama ihtiyacımız doğabilir. Bu senaryomuzu en kolay mantık ile aşağıdaki şekilde gerçekleştirebiliriz.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9d29abcf1f0cfde18ec2faabcc8ab6bc/href">https://medium.com/media/9d29abcf1f0cfde18ec2faabcc8ab6bc/href</a></iframe><p>Bu yöntem basit manada işimizi görse de hem kodun okunabilirliği açısından hem de yarın bir gün örneğin iOS tarafında kendi tasarladığımız custom bir widgetı kullanmak istediğimizde projemizi düzenlemek bizim için zahmetli olacaktır. Bu yüzden şimdi <a href="https://refactoring.guru/design-patterns/factory-method"><strong>factory method</strong></a> düşüncesi ile widgetlarımızı bize üretecek bir arayüz tanımı yapalım.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/266b640d2049a06d1344c37c2e73abe0/href">https://medium.com/media/266b640d2049a06d1344c37c2e73abe0/href</a></iframe><p>Yazdığımız bu soyut sınıfı implemente eden sınıflar <strong>createiOSWidget()</strong> ve <strong>createAndroidWidget()</strong> methodlarını doldurmak zorunda olacaklar. Biz de iki platforma spesifik olarak yazmak istediğimiz sınıflara bu arayüzü uygulayacağız. Örneğin bir Switch butonu yazalım ve üzerinde konuşalım.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/39a4dd7962f6f3149598205991e4cf02/href">https://medium.com/media/39a4dd7962f6f3149598205991e4cf02/href</a></iframe><p><strong>SwitchPlatform</strong> sınıfımız oluşturduğumuz arayüzü uygulayıp geriye iOS için <strong>CupertinoSwitch</strong>; Android için <strong>Switch </strong>widgetlarını geriye döndürmektedir. Her iki implementasyon için de istediğimiz modifikasyonları yapabilmekte ve widgetlarımızı yönetebilmekteyiz. Ayrıca widgetlarımızı <strong>StatefulBuilder </strong>yapısı ile sarmalayıp state değişikliklerinden etkilenmesini sağlayabiliriz. Burada her iki widget’ımızı da StatefulBuilder ile sarmalayıp buton etkileşiminde <strong>setState </strong>callbacki ile değişen durumumuzu ekranda da görebilmiş olduk. Tabii direkt oraya bir Statefull sınıf da verebilirdik. Benim bu şekilde hoşuma gitti daha tatlı geldi , size de tatlı gelen farklı yollar varsa belirtmekten çekinmeyin :).</p><p>Umuyorum faydalı olabilmişimdir , iyi çalışmalar , mutlu yıllar 😊.</p><p>Referans kaynak:</p><p><a href="https://medium.com/flutter/do-flutter-apps-dream-of-platform-aware-widgets-7d7ed7b4624d">Do Flutter apps dream of platform aware widgets?</a></p><p>Github:</p><p><a href="https://github.com/SamedHrmn/flutter-playgrounds/tree/master/platform_specific_widget_factory">flutter-playgrounds/platform_specific_widget_factory at master · SamedHrmn/flutter-playgrounds</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bc0ffdde7ac9" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cnk-tech/flutter-platform-spesifik-widget-tasarlamak-ios-android-factory-pattern-bc0ffdde7ac9">Flutter | Platform Spesifik Widget Tasarlamak (iOS&amp;Android — Factory Pattern)</a> was originally published in <a href="https://medium.com/cnk-tech">CNK Tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SASS & SCSS — PART 2]]></title>
            <link>https://medium.com/cnk-tech/sass-scss-part-2-8ff2ef0676d7?source=rss----83aee5fc001b---4</link>
            <guid isPermaLink="false">https://medium.com/p/8ff2ef0676d7</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[scss]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[css]]></category>
            <category><![CDATA[sass]]></category>
            <dc:creator><![CDATA[Sena Akbulut]]></dc:creator>
            <pubDate>Thu, 02 Sep 2021 14:33:14 GMT</pubDate>
            <atom:updated>2021-09-02T14:33:14.415Z</atom:updated>
            <content:encoded><![CDATA[<h3>SASS &amp; SCSS — PART 2</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WHeftFuj4mQx4ZIZBngMEQ.png" /></figure><p>Hello, I am here with the second part of the article on Sass and Scss. In this part, I will talk about the life-enhancing features of Sass and Scss.</p><p>Topics we will talk about in this part:</p><ul><li>Map - get</li><li>Nesting</li><li>Mixin</li><li>Function</li></ul><h4>💡 Map - get</h4><p>The map-get structure actually resembles the switch case. The defined variable can take more than one state and value, and we can assign the value we want from these states by specifying when using it.</p><p>To understand better, let’s look at an example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ce49dcR_J3LrIqC3d_zHaQ.png" /></figure><p><strong>(SASS)</strong></p><p>Here, I defined three states named light, gray and dark for the color variable and assigned color values to these states.<br>Likewise, I assigned small, medium and big states to the size variable and specified the pixel values.<br>When I come to the sections to be used, when you specify it as <strong>map-get($state name, assigned value)</strong>, I will display in the CSS document that the value I have chosen is assigned.</p><p>❗️An important warning should be made for the Sass file: These situations must be defined side by side, it gives an error one after the other.</p><p><strong>(SCSS)</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1-GNLE2KvUAopimhvzsstQ.png" /></figure><p>In Scss, there is no obligation to write side by side, you can also make your definitions one under the other. It can be used in two ways as in the example. If you want, you can give the values directly, or you can use them by specifying that they are <strong>map</strong> and <strong>key</strong>.</p><h4>💡Nesting</h4><p>Rather than repeating the same selectors over and over again, you can write one style rules inside another. Sass will automatically combine the outer rule’s selector with the inner rule’s.</p><p><strong>(SASS)</strong></p><p>I mentioned in Sass that spaces are important. You can use spaces to indicate which element is below which element without repetition.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HbPR8Yz1o2NddpjdXdtZNA.png" /></figure><p><strong>(SCSS)</strong></p><p>In scss, we use curly braces to indicate that they are children of each other. It is sufficient to add curly braces to cover the nested items.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7F7vkoaJv2zHmD6K5jEeeA.png" /></figure><h4>💡Mixin</h4><p>Mixins allow you to define styles that can be re-used throughout your stylesheet. So you don’t have to repeat the same style elements over and over. Simply call the mixin you want to use with include.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rGAI7qeO1uH2SJU2Ep_5sg.png" /></figure><p>First, we define the mixin, which includes recurring features, as <strong>@mixin mixinname</strong>. Then you can come to the box class you want to use and call it statically as <strong>@include mixinname.</strong><br>If you want, you can give parameters to the mixin to use it dynamically. Thus, you can make it easier to use by changing the color or size you want with the parameter.<br>If you want to define more than one parameter and call it with a single parameter, you must specify it while defining the mixin, otherwise, if you give the direct value, it will be based on the first parameter. If you do not want it to be based on the first parameter, you must call it with the name of the parameter you defined <strong>($height:1000px)</strong>. This time, if you do not define both parameters with <strong>:null</strong>, it will give an error because :null means that this parameter can also be empty.</p><p>Scss is also used in the same way, only the semicolon and curly brackets are different.</p><h4>💡Function</h4><p>Functions allow you to define complex operations on <a href="https://sass-lang.com/documentation/values">SassScript values</a> that you can re-use throughout your stylesheet. They make it easy to abstract out common formulas and behaviors in a readable way.</p><p>Operations such as for loop, if-else structure, mathematical operations can be used within functions. Returns a value with <strong>@return.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*exfWX88OF1V_IlNEKwAwow.png" /></figure><p>As in the example, the function is defined and the style element is added according to the return values and the value it is called.</p><p>Scss is also used in the same way.</p><p>We have come to the end of the second part of the Sass &amp; Scss article, I will talk about other topics in the next parts.<br>See you in the next parts 👋</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2Fi67uIY4a61ejm%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2Fi67uIY4a61ejm%2Fgiphy.gif%3Fcid%3Decf05e47jv2geowmg7g6icqgwctb2sryrmu7k1u9vz0bx8dx%26rid%3Dgiphy.gif%26ct%3Dg&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2Fi67uIY4a61ejm%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="244" frameborder="0" scrolling="no"><a href="https://medium.com/media/3349ec09ae9ecac8c53d3f04678b3426/href">https://medium.com/media/3349ec09ae9ecac8c53d3f04678b3426/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8ff2ef0676d7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cnk-tech/sass-scss-part-2-8ff2ef0676d7">SASS &amp; SCSS — PART 2</a> was originally published in <a href="https://medium.com/cnk-tech">CNK Tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Google Harita ile Yer İşaretleri]]></title>
            <link>https://medium.com/cnk-tech/google-harita-ile-yer-i%CC%87%C5%9Faretleri-d126f9836a0?source=rss----83aee5fc001b---4</link>
            <guid isPermaLink="false">https://medium.com/p/d126f9836a0</guid>
            <category><![CDATA[maps]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[android-google-map]]></category>
            <category><![CDATA[androiddev]]></category>
            <dc:creator><![CDATA[Fatih Kurçenli]]></dc:creator>
            <pubDate>Wed, 01 Sep 2021 14:53:30 GMT</pubDate>
            <atom:updated>2021-09-01T14:53:03.787Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*syYDgLodokZeRAdQLc3VRA.jpeg" /><figcaption><a href="https://unsplash.com/photos/eyfMgGvo9PA">Used Unsplash site, made by Brett Zeck</a></figcaption></figure><p>Merhabalar arkadaşlar bu yazımda mobil dünyasında çokça kullandığımız haritalardaki işaretlerden bahsedeceğim. Bildiğiniz üzere konum adresimiz gönderirken veya bir konumu bulmak için işaretler kullanırız ve o adrese doğru yolculuk ederiz. Bazen ise bu adresler bir banka ATM’si, bazen bir restoran, bazen bir hastane gibi devam etmekte. Bazı yerlerde düşünüldüğünde birden fazla ATM bankasını işaretlemek zorunda kalıyoruz ve burada işaretler iç içe giriyor ve kaç ATM bankası sayısını bilmekte zorlanıyoruz. Haritalarda bu kısmı düzeltmek için Google Maps’te kullandığımız Cluster yapısını bugün değineceğim.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2Fl378jPZA8DVxUhCjS%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2Fl378jPZA8DVxUhCjS%2Fgiphy.gif%3Fcid%3D790b7611bbf1221a41eb490cccca1cf18e5cd75065351cf6%26rid%3Dgiphy.gif%26ct%3Dg&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2Fl378jPZA8DVxUhCjS%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="242" frameborder="0" scrolling="no"><a href="https://medium.com/media/e7445948144267ba9b4dd53f1a29b7d3/href">https://medium.com/media/e7445948144267ba9b4dd53f1a29b7d3/href</a></iframe><p>💻 İşaretçilerimizden önce google maps’imizi kuralım ve ekranımızda gösterlim. Eklememiz gereken iki kütüphaneyi app modulü altında dependency kısmında ekliyoruz. Birincisi Google Maps servisimiz ikincisi ise Cluster yapımız için kullanacağız. Eğer bu yazı tarihinden sonra güncellemeler geldiyse güncel değerlerini giriniz.</p><pre>//Google Maps<br>implementation &#39;com.google.android.gms:play-services-maps:17.0.1&#39;<br>implementation &#39;com.google.maps.android:android-maps-utils:2.2.5&#39;</pre><p>Kütüphanelerimizi eklediğimize göre diğer bir kısım olan Google Map API key alıyoruz ve local.properties MAPS_API_KEY=? yazıyoruz ve manifest dosyamızda meta data olarak ve google gms version meta datamızı ekliyoruz. İnternet izni ve lokasyon bilgisini almak için izinlerimizi ekliyoruz. Meta datamız &lt;application... tagın içerisinde olmasına dikkat ediyoruz. Eğer uygulamamız API leveli 28 ve üstü ve kütüphanemiz 16.0.0 üstü ise Google apache.http.legacy metadatamızı eklememizi istiyor aksi takdirde eklememize gerek olmadığı <a href="https://developers.google.com/maps/documentation/android-sdk/config#apache_http_legacy_library"><em>yazmakta</em></a>.</p><pre>&lt;uses-permission android:name=&quot;android.permission.ACCESS_COARSE_LOCATION&quot; /&gt;<br>&lt;uses-permission android:name=&quot;android.permission.ACCESS_FINE_LOCATION&quot; /&gt;<br>&lt;uses-permission android:name=&quot;android.permission.INTERNET&quot; /&gt;</pre><pre>&lt;application...</pre><pre>&lt;meta-data<br>    android:name=&quot;com.google.android.geo.API_KEY&quot;<br>    android:value=&quot;${MAPS_API_KEY}&quot; /&gt; </pre><pre>&lt;meta-data<br>    android:name=&quot;com.google.android.gms.version&quot;<br>    android:value=&quot;@integer/google_play_services_version&quot; /&gt;</pre><pre>&lt;!-- Eğer api levelimiz 28 ve üstüyse eklememiz gerekiyor--&gt;<br>&lt;uses-library<br>    android:name=&quot;org.apache.http.legacy&quot;<br>    android:required=&quot;false&quot; /&gt;</pre><pre>&lt;/application&gt;</pre><p>Kullanıcıdan lokasyon iznini isteyeceğiz neden kabul etmesi gerek hakkında bilgi vereceğiz. İzinler hakkında çok yakında bir yazı daha gelecek. Şimdilik izin için istenen kodu aşağıdaki gibi yazıyoruz.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2a6561a0a5cf181e0c484e01fefdb1bc/href">https://medium.com/media/2a6561a0a5cf181e0c484e01fefdb1bc/href</a></iframe><p>Şimdi xml dosyamızı düzenleyelim main sayfamızda bir framelayout koyarak fragmentımızı koyacağız.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/97bd059fa67d757bc0555a402b5a545a/href">https://medium.com/media/97bd059fa67d757bc0555a402b5a545a/href</a></iframe><p>Fragment yapımızı tasarımını yapalım.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d369a385598116235eb285940dfc8d4b/href">https://medium.com/media/d369a385598116235eb285940dfc8d4b/href</a></iframe><p>MainActivity’de fragmentımızı ekliyoruz.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/35ee9b496dd90b0e013290c1432dc218/href">https://medium.com/media/35ee9b496dd90b0e013290c1432dc218/href</a></iframe><p>Tasarımlarımız tamamladıktan sonra fragment yapımızı yazalım.Boş bir fragment yapısı oluşturuyoruz. Maps koyacağımız fragment view supportMapFragment sayesinde fragment yapımızı setliyoruz.</p><pre>//onCreatedView kısmında view layoutumuzu setleyip dönüyoruz.<br>View view = inflater.inflate(R.layout.<em>fragment_map</em>, container, false);<br>//initialize map fragment<br>SupportMapFragment supportMapFragment = (SupportMapFragment) getChildFragmentManager().findFragmentById(R.id.<em>google_map</em>);</pre><p>Artık nesnesini ürettiğimizin supportMapFragment yapısında getAsyncMap fonksiyonumuzu çağırıyoruz. Asenkron fonksiyonlar uygulamamız açılırken yeni bir thread açarak asenkron bir şekilde çalışmasını sağlar bu sayede kullanıcı UI ekranında kasma görmemekte ve stabil bir şekilde arka tarafta isteklerimizi atarken kullanıcı uygulamada gezinebilmeyi sağlamakta.</p><pre>private GoogleMap mMap;<br>private ClusterManager&lt;MyClusterItem&gt; clusterManager;</pre><pre>supportMapFragment.getMapAsync(new OnMapReadyCallback() {<br>    @Override<br>    public void onMapReady(@NonNull GoogleMap googleMap) {<br>       mMap = googleMap;<br>    }<br>});</pre><p>onMapReady fonksiyonumuz override ederek artık googleMap nesnemize erişebilmekteyiz. Private olarak sınıfımızın içerisinde fonksiyonlarımız erişmesi için GoogleMap’ten mMap nesnesine eşitliyoruz.</p><p>Sırada Cluster’larımızı yerleştirmekte. Öncelikle MyClusterItem adlı bir sınıf kuruyoruz ve ClusterItem’dan impelements almasını sağlıyoruz. ClusterItem kütüphanesi import ediyoruz.</p><pre>import com.google.maps.android.clustering.ClusterItem;</pre><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f6670c8b5ba84925519d5ff4e8c24288/href">https://medium.com/media/f6670c8b5ba84925519d5ff4e8c24288/href</a></iframe><p>MyClusterItem yapımızda new bir position için latitude and longitude değerlerini constructor yapımızda alıyoruz ayrıca her bir yer işareti için title ve snippet alanı alıyoruz. ve ClusterItem’dan implements aldığımız fonksiyonlarımızı override ediyoruz. Pozisyon değeri null bir değer olamaması için NonNull annotation yazıyoruz. Şimdi setupCluster() fonksiyonumuzu oluşturuyoruz. Bu fonksiyonumuzda ClusterManager nesnemizi setliyoruz. Ayrıca başlangıç olarak İstanbul kordinatlarını veriyorum ve açıldığı zaman map ilk olarak İstanbul açılmasını sağlıyoruz</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/01a90392db9004b296fc89f70bde9039/href">https://medium.com/media/01a90392db9004b296fc89f70bde9039/href</a></iframe><p>ClusterManager nesnesi oluşturuyoruz ve bu nesnemize context ve oluşturduğumuz mMap(GoogleMap) nesnesini consturctora veriyoruz. Eğer activity kullanıyorsak thisdiyerek context yapısına erişebiliriz. mMap yapımıza setOnCameraIdleListener() yapısına oluşturduğumuz clusterManager nesnemizi veriyoruz. Bu sayede clusterManager yapımız map hareketliliklerini dinleyerek işlem yapacaktır. Ayrıca Mapte tıklama hareketlerini de setliyoruz. Yer işaretlerimizi oluşturmak için setMarkerList() fonksiyonumuzu yazıyoruz.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6756bb70dfbbb6f4f326c3b1cbc72726/href">https://medium.com/media/6756bb70dfbbb6f4f326c3b1cbc72726/href</a></iframe><p>Datalarımızı yüklüyoruz. Buradaki değerleri ben Mock data olarak ekledim. Eğer servisten gelen verileriniz var ise burada setlemeniz gerekmektedir. Son olarak Fragment yapımız aşağıdaki gibi olmaktadır.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2af5e2c215915388c4428587dd0cc550/href">https://medium.com/media/2af5e2c215915388c4428587dd0cc550/href</a></iframe><p>Sonuç olarak belli bir alanda birden fazla yer işaretleri olduğu zaman eğer haritayı büyüttüğümüzde yer işaretleri toplanarak kaç tane yer işareti olduğunu gösteren haritamızı elde etmiş oluyoruz.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/360/1*J1NlttZb5PCTosxWpFER7w.gif" /><figcaption>Cluster Markers</figcaption></figure><p>Uygulamanın github linki;</p><p><a href="https://github.com/fatihkurcenli/ClusterMarkersMap">GitHub - fatihkurcenli/ClusterMarkersMap: ClusterMarkers with Google maps using Java Language</a></p><p>📚 Kaynaklar</p><ul><li><a href="https://developers.google.com/maps/documentation/android-sdk/utility/setup">Maps SDK for Android Utility Setup | Google Developers</a></li><li><a href="https://developers.google.com/maps/documentation/android-sdk/utility/marker-clustering#maps_android_utils_clustering_cluster_item-kotlin">Google Maps Android Marker Clustering Utility | Maps SDK for Android</a></li></ul><p>Bir sonraki yazıma kadar görüşmek üzere keyifli kodlamalar dilerim. :)</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F1pAe8oyaf96Me1ClgH%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2F1pAe8oyaf96Me1ClgH%2Fgiphy-downsized-large.gif%3Fcid%3D790b7611683abdab2b3814bcf9d3232d108dcf8598c92cc8%26rid%3Dgiphy-downsized-large.gif%26ct%3Dg&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2F1pAe8oyaf96Me1ClgH%2Fgiphy-downsized-large.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="435" frameborder="0" scrolling="no"><a href="https://medium.com/media/f296c3384fb9365081f9990e9876c3a7/href">https://medium.com/media/f296c3384fb9365081f9990e9876c3a7/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d126f9836a0" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cnk-tech/google-harita-ile-yer-i%CC%87%C5%9Faretleri-d126f9836a0">Google Harita ile Yer İşaretleri</a> was originally published in <a href="https://medium.com/cnk-tech">CNK Tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SASS & SCSS — Part 1]]></title>
            <link>https://medium.com/cnk-tech/sass-and-scss-part-1-83e69e84247f?source=rss----83aee5fc001b---4</link>
            <guid isPermaLink="false">https://medium.com/p/83e69e84247f</guid>
            <category><![CDATA[css]]></category>
            <category><![CDATA[scss]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[frontend]]></category>
            <category><![CDATA[sass]]></category>
            <dc:creator><![CDATA[Sena Akbulut]]></dc:creator>
            <pubDate>Tue, 17 Aug 2021 17:54:32 GMT</pubDate>
            <atom:updated>2021-09-01T13:23:34.903Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*09pfe5KWt3xRonJfQ7dCSQ.jpeg" /></figure><p>Hello, in this article I will talk about Sass and Scss. Let’s first look at what Sass and Scss are, then let’s take a look at their features.</p><p>Topics we will talk about in this section:</p><ul><li>What is Sass?</li><li>What is Scss?</li><li>Install Sass</li><li>Converting Sass file to CSS file</li><li>Sass and Scss Spelling Rules</li><li>Variables in Sass and Scss</li></ul><h4>💡 What is Sass?</h4><p>Sass (Syntactically Awesome Stylesheets) is a CSS preprocessor. In other words, we can say that CSS is translated into the programming language.</p><p>It is there to avoid confusion and repetition that occurs when long CSS codes are written. It compiles the codes written with the logic of the programming language and converts them to CSS codes.</p><h4>💡 What is Scss?</h4><p>The difference between Scss and Sass is the syntax difference. What are these syntaxes? Curly braces and semicolons. It is preferable for those who cannot switch directly from CSS to Sass. In short, we can say that it is the version of Sass that is closer to CSS.</p><p>Now that we have learned what Sass and Scss are for, let’s look at how to install them.</p><h4>💡 <strong>Install Sass</strong></h4><p>For installation, you will see that there are various installation paths from Sass’s site <a href="https://sass-lang.com/install">https://sass-lang.com/install</a>. For this, the application can be downloaded and used, it can also be used by installing from the terminal. I prefer to install via npm. The code you need to type in the terminal is as follows:</p><pre>npm install -g sass</pre><p>In this way, you include the Sass and Scss structure in your project.</p><h4>💡 Converting Sass file to CSS file</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mbFvaJ-Dk2aKeo2nCsRbsw.png" /></figure><ul><li>In order to convert the Sass or Scss files to a CSS file, the <strong>css.map</strong> file runs in the meantime and this file does the conversion operations. There are several methods to provide these operations and convert them to CSS files. The first of these methods is to specify the Sass file you want to convert and the .css extension you want to convert manually in the terminal. For this you have to enter the following command:</li></ul><pre>sass index.scss index.css</pre><ul><li>Another method is to use extensions. As soon as we save the code with the extension, there are extensions that enable compilation and conversion to .css code. VS Code offers us a plugin called <strong>Live Sass Compiler</strong> for this. With this plugin, you can convert Sass and Scss files to .css files.</li></ul><h4>💡 Sass and Scss Spelling Rules</h4><p>📍 <strong>Sass</strong></p><p>One of the most distinctive main features of Sass is the absence of curly braces and commas. As in CSS and Scss, you will not get an error when you do not put them, on the contrary, you should not use these elements. It’s actually a great preprocessor for those who forget continuous semicolons and curly braces.</p><p>Another spelling rule is indentation. The indentation is very important in Sass because the features you want to specify are determined according to which element they belong to.</p><p>In the example below, the properties of the box are specified in a tab. If the title is in line with the box’s properties, this title is now the child element of the box, that is, it is specified as .box.header in CSS. Likewise, if the content class is under the header, this time the content is the box and the element under the header. If the content was at the level of the box, it would have been a separate class.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xZGN0_z6af8W9eUSrhO9yg.png" /></figure><p>📍<strong>Scss</strong></p><p>Curly braces and semicolons are used in Scss, so it is very similar to CSS, but of course, it has many different features from CSS, which I will talk about in the next topics. Unlike Sass, indentations have no meaning. Indent as much as you want, the elements do not affect each other.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_aOXgtrdFZG1tS0C3sIf6w.png" /></figure><h4>💡 Variables in Sass and Scss</h4><p>Variables in Sass and Scss can be used by defining them and calling them wherever desired. This allows you to easily call <strong>($name)</strong> by the name we choose, without the need to specify the same color or the same size all the time.</p><p>Values that are not defined in any element at the top are <strong>global variables</strong>. If they are not changed, they can be used everywhere with the same value.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YLupe4hKtY7RxpAUdiGR2A.png" /></figure><p>There are <strong>local variables</strong> as well as global variables. Local variables are defined in the specified scope and are valid in that scope. Even if there is a local variable with the same name, they do not change the global variables, they can only change it in a single case, which changes the value defined above after making the local variable a global variable by typing<strong> !global</strong> next to the variable value defined in the scope. In addition, in the scope where a local variable with the same name is used, the local variable is checked first.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3ciUXSozWBxVmk-cSEiiHw.png" /></figure><p>We have come to the end of the first part of the Sass and Scss article, I will talk about other topics in the next parts.<br>See you in the next parts 👋</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FvxNCVEe0PI9A3YVJEX%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fathomewithamysedaris-amy-sedaris-at-home-with-ah208-vxNCVEe0PI9A3YVJEX&amp;image=https%3A%2F%2Fmedia4.giphy.com%2Fmedia%2FvxNCVEe0PI9A3YVJEX%2Fgiphy.gif%3Fcid%3D790b76119aa043ea100c6406108beb5ce8f8ac7fc19ef015%26rid%3Dgiphy.gif%26ct%3Dg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="244" frameborder="0" scrolling="no"><a href="https://medium.com/media/33c011f040ff340b9ec2fce257862eae/href">https://medium.com/media/33c011f040ff340b9ec2fce257862eae/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=83e69e84247f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cnk-tech/sass-and-scss-part-1-83e69e84247f">SASS &amp; SCSS — Part 1</a> was originally published in <a href="https://medium.com/cnk-tech">CNK Tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>