<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Fatih Çınar on Medium]]></title>
        <description><![CDATA[Stories by Fatih Çınar on Medium]]></description>
        <link>https://medium.com/@fatihcinar96?source=rss-55f0b1242a0a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*BFNSorshw9mk7Gtt.</url>
            <title>Stories by Fatih Çınar on Medium</title>
            <link>https://medium.com/@fatihcinar96?source=rss-55f0b1242a0a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 06:04:06 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@fatihcinar96/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Starting a MVC Web App Using .Net Core]]></title>
            <link>https://medium.com/@fatihcinar96/starting-a-mvc-web-app-using-net-core-58e8a1a1fde7?source=rss-55f0b1242a0a------2</link>
            <guid isPermaLink="false">https://medium.com/p/58e8a1a1fde7</guid>
            <category><![CDATA[mvc]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[entity-framework-core]]></category>
            <category><![CDATA[aspnetcore]]></category>
            <dc:creator><![CDATA[Fatih Çınar]]></dc:creator>
            <pubDate>Fri, 09 Aug 2019 13:39:44 GMT</pubDate>
            <atom:updated>2019-08-09T17:05:44.678Z</atom:updated>
            <content:encoded><![CDATA[<h3>Starting an MVC Web App Using .Net Core</h3><p>Hi, in this read i would talking about what is MVC(Model-View-Controller) Web App and how we use it in .Net Core.</p><p>Let’s start;</p><p>In an</p><p>MVC app , we have three layer.</p><p>To detect our needs : Models.</p><p>Our process layer : Controllers.</p><p>The present layer : Views.</p><p>Now, let’s create an app like this ;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*HvfTW3WToAs3wJVc1QIBuQ.jpeg" /><figcaption>“Visual Studio 2017 Interface”</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/788/1*pMahsgrjSUUzCIGegjJ_fg.png" /><figcaption>Here, I disabled the “Configure for HTTPS” checkbox because we don’t need that in this article.Also in the authentication area I didn’t choose anything because we won’t use an identity process.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/328/1*oXb8LMqUirUGInmm3F22lA.jpeg" /><figcaption>As you see,In solution explorer we have;</figcaption></figure><ul><li>wwwroot folder for our front-end libraries and files like images or css,javascript files.</li><li>Controllers folder for our controllers to process the data and send them to View area.</li><li>Models folder for seperate our data areas,data access and etc.</li><li>Views folder to see what we have done :)</li></ul><p>Let’s click the debug button(IIS Express)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i-wYbnuHG_c_d1hUUCG05Q.jpeg" /><figcaption>As you see in the URL bar,IIS gave us a port to see our project.</figcaption></figure><p>You can change the welcome label in Views/Home/Index.cshtml file.</p><p>Let’s go to Controllers/HomeController.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/769/1*9Bc4GB4Xbh98mNQ387j4xA.jpeg" /><figcaption>Controllers/HomeController</figcaption></figure><p>In the HomeController,you will see we have three methods as Index,Privacy and Error.For now,we would interest with Index method.</p><p>In Index method, we return an ActionResult.The “return View()” line goes to Views/Home/Index because of our method name is Index.</p><p>Now,to understand better let’s create a new controller.Right click on the Controllers file and click Add Controller.(Don’t forget to being out of debug mode)</p><p>After,choose MVC Controller-Empty and click Add.Give a name for controller.I gave MainController.</p><p>After scaffolding,Visual Studio will Create the controller with an Index method.</p><p>Go to the Startup.cs in Solution explorer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/479/1*6iy_PvQI_Fo2O3waXkWpbw.jpeg" /><figcaption>Startup.cs</figcaption></figure><p>In template line,we see how to see our view in url.If we don’t give anything in the URL,it would go to localhost:”Your port”/Home/Index as default.</p><p>So to see our MainController/Index view we would write the url bar localhost:”Your port”/Main/Index. Let’s see what happens.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fItUA2QIRFU-sf2pIRpvmg.jpeg" /><figcaption>Program gave us an error because we didn’t create the View file…</figcaption></figure><p>Let’s go to MainController;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/332/1*CUzRNQjldI1L-hQOX2hJYg.jpeg" /><figcaption>Controllers/MainController</figcaption></figure><p>Right click on the View text in Index method.Then click “Add View”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/590/1*r-9lb6pAvQDwfqB3taiIfQ.jpeg" /><figcaption>Click Add.</figcaption></figure><p>Then,go to the localhost:”your port”/Main/Index and see your first view.</p><p>Let’s send data from controller to View using “ViewBag”.</p><p>Go to Controllers/MainController and change it like this;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/425/1*5XpRAwno8lmHDGtGGOQu1w.jpeg" /><figcaption>Controllers/MainController</figcaption></figure><p>Then go to our view(Views/Main/Index) and show the data using “@ViewBag.Data”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/327/1*R4YabHy28KTslvHdU_MAIA.jpeg" /><figcaption>Views/Main/Index</figcaption></figure><p>Then go to localhost:”your port”/Main/Index and see the result.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/557/1*fz8540x2GUCtAU8WTZ7eMA.jpeg" /></figure><p>Now,I think you basically understand Controllers and Views.Let’s interest with the models.</p><ul><li>Right click the Models folder.</li><li>Click Add -&gt; Class</li><li>Create a class named Student.</li><li>Give the properties like this;</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/357/1*gk4r-Dj_aF2UkDg5hhXvwA.jpeg" /><figcaption>Models/Student.cs</figcaption></figure><p>Now,we create a connection with database.First,to do this;</p><ul><li>Right Click on project(MvcSample)</li><li>Click Manage Nuget-Packages</li><li>Click Browse</li><li>Install Microsoft.EntityFrameworkCore</li><li>Install Microsoft.EntityFrameworkCore.SqlServer (I am using Sql Server,for other dbms : see <a href="https://docs.microsoft.com/tr-tr/ef/core/providers/">https://docs.microsoft.com/tr-tr/ef/core/providers/</a> )</li></ul><p><strong>Designing Database Context</strong></p><ul><li>Right click the models folder.</li><li>Create a class named “EFCoreContext”</li><li>Design it like this ;</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/738/1*M_2nZd-ybBVGd7qmvj5c7A.jpeg" /><figcaption>Models/EFCoreContext.cs</figcaption></figure><ul><li>Inherit the class from DbContext using Microsoft.EntityFrameworkCore library.</li><li>In the rounded area it’s my connection string.You can write your string for your own database.For help see -&gt; <a href="https://www.connectionstrings.com/">https://www.connectionstrings.com/</a></li></ul><p>Go to the Startup.cs and add the following lines in ConfigureServices method.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/825/1*RhSbmtfxZ8cs-dZHiw2qPA.jpeg" /><figcaption>Startup.cs</figcaption></figure><p>Don’t forget the add these libraries;</p><blockquote>using MvcSample.Models;</blockquote><blockquote>using Microsoft.EntityFrameworkCore;</blockquote><p>Then,go back the EFCoreContext.cs and add the following line.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/740/1*HdiMfpMYTFOFCL0AeJqyDw.jpeg" /><figcaption>Models/EFCoreContext.cs</figcaption></figure><p>Go to Tools/Nuget Package Manager/Package Manager Console</p><p>Write the following command to package manager console.</p><blockquote>add-migration Initial</blockquote><p>After that,run the following command in package manager console.</p><blockquote>update-database</blockquote><p>Then go to your DBMS and see the database that created by Entity Framework for your Student model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/291/1*FL9yI9whKQHeUyetox3BQg.jpeg" /></figure><p>Let’s design our app and do CRUD operations with our database.</p><p>Create an empty MVC Controller named StudentController.</p><p>Create a method named Add</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/333/1*SJPfTqI3F-V8qA-Z17plgw.jpeg" /><figcaption>Controllers/StudentController</figcaption></figure><ul><li>Create a view for Add method.</li><li>Go to the view and design it like this;</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/671/1*wUysVbn-fok3YHJRdz6sOw.jpeg" /><figcaption>Views/Student/Add.cshtml</figcaption></figure><p>In the top of the page,we add a model class to give fields for our requirements.</p><p>We’ve created a form to post the datas our controller.</p><p>Go back to StudentController and add the following line for define our DbContext.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/349/1*_zt-eO3rV8W1mrvVAlj3WA.jpeg" /><figcaption>Controllers/StudentController</figcaption></figure><p>Then create a HttpPost Add method to save data to database that comes from View.Add the following lines.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/333/1*gbC9AGQ1Zc3kYmDHtgdr4A.jpeg" /><figcaption>Controllers/StudentController</figcaption></figure><p>After this,your controller should look like this;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/483/1*EYQ8Atmb6U7GZbt5_gLkMw.jpeg" /></figure><p>After that,create a view for Index method to list Students and design it like this;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/761/1*PKNeLGBLOdyG6NipWx6G0A.jpeg" /><figcaption>Views/Student/Index.cshtml</figcaption></figure><p>Go to localhost:”your port”/Student/Add and create a record.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o13huUIW4zeTZoH_dUZ1ng.jpeg" /></figure><p>After clicking submit,the method returns you to Index method and you will see the Student list.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dPBe-ZLuT_QyKm-z6cQhMw.jpeg" /></figure><p>I hope this article can helpful for you.Have a nice day!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=58e8a1a1fde7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Popüler JavaScript İstek Kütüphaneleri]]></title>
            <link>https://medium.com/@fatihcinar96/pop%C3%BCler-javascript-i%CC%87stek-k%C3%BCt%C3%BCphaneleri-590f7c2c3676?source=rss-55f0b1242a0a------2</link>
            <guid isPermaLink="false">https://medium.com/p/590f7c2c3676</guid>
            <category><![CDATA[http-request]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[server-side]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Fatih Çınar]]></dc:creator>
            <pubDate>Fri, 09 Aug 2019 10:30:34 GMT</pubDate>
            <atom:updated>2019-08-09T10:30:34.881Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Axios</strong></p><p>Promise-based bir istek kütüphanesidir.</p><p>Hem server hem browserda çalışır</p><p>Promise API destekler</p><p>Bir isteği iptal edebilir veya düzenleyebilirsiniz.</p><p>Bir response zaman aşımı belirlenebilir.</p><p>Dinamik olarak response u JSON a çevirmeyi sağlar.</p><p>Eski browserlarda da çalışır.</p><p><strong>SuperAgent</strong></p><p>Axios gibi promise based ve hem server hem de client tarafında çalışır.</p><p>Eklenti ekosistemi ile ekstra fonksiyonlar eklenebilir.</p><p>Konfigüre edilebilir.</p><p>HTTP Requestler için iyi bir arayüzü vardır.</p><p>Upload süreçlerini destekler.</p><p><strong>Request</strong></p><p>Çok basit bir şekilde istek yapabilmeyi sağlar.</p><p>Diğer kütüphanelere göre çok daha az kod yazılır.</p><p>Promise-based değildir.</p><p><strong>Fetch</strong></p><p>Browser tarafında çalışan bir HTTPRequest kütüphanesidir.</p><p>“Callback Hell” in önüne geçmek için promise tabanlıdır.</p><p>Bütün modern tarayıcılar tarafından desteklenir.</p><p>Basit bir kullanımı vardır.</p><p>Server tarafında desteklenmez.</p><p><strong>SuperTest</strong></p><p>Node JS Serverlarında test için kullanılır.</p><p>Chai.Js veya Mocha gibi diğer test platformlarıyla organize çalıştırılabilir.</p><p>Basit ve akıcı bir kullanımı vardır.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=590f7c2c3676" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>