﻿
{"id":931,"date":"2012-11-19T11:36:15","date_gmt":"2012-11-19T11:36:15","guid":{"rendered":"http:\/\/www.gencayyildiz.com\/blog\/?p=931"},"modified":"2012-11-19T11:38:40","modified_gmt":"2012-11-19T11:38:40","slug":"asp-net-mvc-proje-olusturma-ve-proje-elemanlari","status":"publish","type":"post","link":"https:\/\/www.gencayyildiz.com\/blog\/asp-net-mvc-proje-olusturma-ve-proje-elemanlari\/","title":{"rendered":"Asp.NET MVC Proje Olu\u015fturma Ve Proje Elemanlar\u0131"},"content":{"rendered":"<div id=\"fb-root\"><\/div>\n<p>Bir Asp.NET MVC projesi nas\u0131l olu\u015fturulur, solutiondaki proje elemanlar\u0131 nelerdir bir g\u00f6z atal\u0131m.Yaz\u0131ya ba\u015flamadan \u00f6nce belirtmem gereken husus \u015fu ki, ben \u00e7al\u0131\u015fmalar\u0131m\u0131 \u015fimdilik Asp.NET MVC 2.0 s\u00fcr\u00fcm\u00fcne g\u00f6re yapaca\u011f\u0131m.MVC 4 s\u00fcr\u00fcm\u00fc \u00e7\u0131kmas\u0131na ra\u011fmen neden 2.0 \u0131 tercih etti\u011fimi sorarsan\u0131z e\u011fer, temel olarak kayna\u011f\u0131 bol ve anla\u015f\u0131lmas\u0131 kolay olan s\u00fcr\u00fcm 2.0 oldu\u011fu kanaatindeyim ve bu s\u00fcr\u00fcmden sonra rahatl\u0131kla 4 s\u00fcr\u00fcm\u00fcne \u00e7\u0131kabilece\u011fimizin d\u00fc\u015f\u00fcncesindeyim.<\/p>\n<p>\u015eimdi konumuza d\u00f6nersek e\u011fer, Visual Studio 2010 versiyonunda &#8220;New Project&#8221; diyerek gelen pencereden &#8220;Visual C#&#8221; kategorisinden &#8220;Asp.NET MVC 2 Web Aplication&#8221; \u0131 se\u00e7elim.Olu\u015fturaca\u011f\u0131m\u0131z projenin ad\u0131n\u0131 &#8220;OrnekCalisma&#8221; olarak de\u011fi\u015ftiriyorum.<\/p>\n<p><a href=\"http:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2012\/11\/MVCGiris1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-934\" title=\"MVC Proje Olu\u015fturma\" src=\"http:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2012\/11\/MVCGiris1.png\" alt=\"\" width=\"678\" height=\"532\" srcset=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2012\/11\/MVCGiris1.png 678w, https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2012\/11\/MVCGiris1-300x235.png 300w\" sizes=\"auto, (max-width: 678px) 100vw, 678px\" \/><\/a><\/p>\n<p>Projeyi olu\u015fturduktan sonra a\u015fa\u011f\u0131daki gibi bir pencere gelecektir.<\/p>\n<p><a href=\"http:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2012\/11\/MVCGiris2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-935\" title=\"MVCGiris2\" src=\"http:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2012\/11\/MVCGiris2.png\" alt=\"\" width=\"551\" height=\"342\" srcset=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2012\/11\/MVCGiris2.png 551w, https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2012\/11\/MVCGiris2-300x186.png 300w\" sizes=\"auto, (max-width: 551px) 100vw, 551px\" \/><\/a><\/p>\n<p>Bu pencerede bize olu\u015fturdu\u011fumuz projemize bir test projesi eklensin mi diye soruyor.Nedir bu test projesi.Projemizi geli\u015ftirme a\u015famas\u0131nda, yazd\u0131\u011f\u0131m\u0131z kodlar\u0131 bir teste tabii tutma gereksinimi isteyebiliriz.\u015eimdilik bu pencereye ben &#8220;No, do not create a unit test project&#8221; diyerek hay\u0131r diyorum.<\/p>\n<p>OK dedikten sonra kar\u015f\u0131m\u0131za bir pencere daha \u00e7\u0131k\u0131yor.<br \/>\n<a href=\"http:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2012\/11\/MVCGiris3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-936\" title=\"MVCGiris3\" src=\"http:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2012\/11\/MVCGiris3.png\" alt=\"\" width=\"628\" height=\"389\" srcset=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2012\/11\/MVCGiris3.png 628w, https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2012\/11\/MVCGiris3-300x185.png 300w\" sizes=\"auto, (max-width: 628px) 100vw, 628px\" \/><\/a>Bu penceredede tak\u0131m projesine baplan\u0131p ba\u011flanmamay\u0131 soruyor.Server adresini se\u00e7erek tak\u0131m projesine ba\u011flanabiliriz.Ben Cancel diyorum.<\/p>\n<p>Art\u0131k Asp.NET MVC projemiz a\u00e7\u0131lm\u0131\u015f bulunmaktad\u0131r.Solution Explorer penceresini incelersek e\u011fer,<br \/>\n<a href=\"http:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2012\/11\/MVCGiris4.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-937\" title=\"MVCGiris4\" src=\"http:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2012\/11\/MVCGiris4.png\" alt=\"\" width=\"278\" height=\"385\" srcset=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2012\/11\/MVCGiris4.png 278w, https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2012\/11\/MVCGiris4-216x300.png 216w\" sizes=\"auto, (max-width: 278px) 100vw, 278px\" \/><\/a>G\u00f6rd\u00fc\u011f\u00fcn\u00fcz gibi, Controllers, Models ve Views klas\u00f6rleri bulunmaktad\u0131r.Her katman\u0131n i\u00e7inde kendine \u00f6zg\u00fc s\u0131n\u0131flar\u0131 mevcuttur.\u00d6rnek olarak Views katman\u0131ndaki Home klas\u00f6r\u00fcn\u00fc a\u00e7arsak e\u011fer, index.aspx dosyas\u0131n\u0131 g\u00f6rece\u011fiz.Bu dosyan\u0131n i\u00e7eri\u011fi a\u015fa\u011f\u0131daki gibidir.<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\n&lt;%@ Page Language=&quot;C#&quot; MasterPageFile=&quot;~\/Views\/Shared\/Site.Master&quot; Inherits=&quot;System.Web.Mvc.ViewPage&quot; %&gt;\r\n&lt;asp:Content ID=&quot;Content1&quot; ContentPlaceHolderID=&quot;TitleContent&quot; runat=&quot;server&quot;&gt;\r\n    Home Page\r\n&lt;\/asp:Content&gt;\r\n&lt;asp:Content ID=&quot;Content2&quot; ContentPlaceHolderID=&quot;MainContent&quot; runat=&quot;server&quot;&gt;\r\n    &lt;h2&gt;&lt;%: ViewData&#x5B;&quot;Message&quot;] %&gt;&lt;\/h2&gt;\r\n    &lt;p&gt;\r\n        To learn more about ASP.NET MVC visit &lt;a href=&quot;http:\/\/asp.net\/mvc&quot; title=&quot;ASP.NET MVC Website&quot;&gt;http:\/\/asp.net\/mvc&lt;\/a&gt;.\r\n    &lt;\/p&gt;\r\n&lt;\/asp:Content&gt;\r\n<\/pre>\n<p>Yukar\u0131daki index.aspx i\u00e7eri\u011fine dikkat edersek e\u011fer, &#8220;<%: ViewData[\"Message\"] %>&#8221; kod blo\u011fu mevcuttur.Dinamik kodlar html taglar\u0131 aras\u0131nda bu \u015fekilde yaz\u0131lacakt\u0131r.<\/p>\n<p>Solution Explorer Penceresinde &#8220;Content&#8221; klas\u00f6r\u00fcnden bahsedersek e\u011fer, CSS dosyalar\u0131m\u0131z\u0131n bulundu\u011fu klas\u00f6rd\u00fcr.\u0130lla Content isminde olmas\u0131 gerekmiyor ama Visual Studio&#8217;nun varsay\u0131lan olarak verdi\u011fi isimdir.<\/p>\n<p>Scripts dosyas\u0131ndan bahsedecek olursak e\u011fer, projemizdeki javascript,jquery ve ajax dosyalar\u0131n\u0131n bulundu\u011fu dizindir.<\/p>\n<p>Son olarak Global.asax dosyas\u0131n\u0131 incelersek e\u011fer, URL Routing i\u015flemlerinin yap\u0131laca\u011f\u0131 dosya bu dosyad\u0131r.<\/p>\n<p>\u0130leride daha detayl\u0131 anlat\u0131mlar yapaca\u011f\u0131m.<\/p>\n<p>Umar\u0131m Asp.NET MVC&#8217;ye giri\u015f i\u00e7in yeterli d\u00fczeyde bilgi vermi\u015fimdir.<br \/>\nBir sonraki yaz\u0131mda g\u00f6r\u00fc\u015fmek \u00fczere&#8230;<br \/>\n\u0130yi \u00e7al\u0131\u015fmalar.<\/p>\n<!-- AddThis Advanced Settings generic via filter on the_content --><!-- AddThis Share Buttons generic via filter on the_content -->","protected":false},"excerpt":{"rendered":"<p>Bir Asp.NET MVC projesi nas\u0131l olu\u015fturulur, solutiondaki proje elemanlar\u0131 nelerdir bir g\u00f6z atal\u0131m.Yaz\u0131ya ba\u015flamadan \u00f6nce belirtmem gereken husus \u015fu ki, ben \u00e7al\u0131\u015fmalar\u0131m\u0131 \u015fimdilik Asp.NET MVC 2.0 s\u00fcr\u00fcm\u00fcne g\u00f6re yapaca\u011f\u0131m.MVC 4 s\u00fcr\u00fcm\u00fc \u00e7\u0131kmas\u0131na ra\u011fmen neden&#46;&#46;&#46;<!-- AddThis Advanced Settings generic via filter on get_the_excerpt --><!-- AddThis Share Buttons generic via filter on get_the_excerpt --><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[746,283],"class_list":["post-931","post","type-post","status-publish","format-standard","hentry","category-asp-net-mvc","tag-asp-net-mvc","tag-mvc"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/posts\/931","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/comments?post=931"}],"version-history":[{"count":0,"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/posts\/931\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/media?parent=931"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/categories?post=931"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/tags?post=931"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}