You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/docs/faq-structure.md
+15-15
Original file line number
Diff line number
Diff line change
@@ -1,18 +1,18 @@
1
1
---
2
2
id: faq-structure
3
-
title: File Structure
3
+
title: Dosya Yapısı
4
4
permalink: docs/faq-structure.html
5
5
layout: docs
6
6
category: FAQ
7
7
---
8
8
9
-
### Is there a recommended way to structure React projects? {#is-there-a-recommended-way-to-structure-react-projects}
9
+
### React projelerini yapılandırmak için önerilen bir yol var mı? {#is-there-a-recommended-way-to-structure-react-projects}
10
10
11
-
React doesn't have opinions on how you put files into folders. That said there are a few common approaches popular in the ecosystem you may want to consider.
11
+
React dosyalarını klasörlere nasıl yerleştireceğinize dair genel bir kanaat bulunmamaktadır. Ancak dikkate almak isteyebileceğiniz ve ekosistemde popüler birkaç yaygın yaklaşım bulunmaktadır.
12
12
13
-
#### Grouping by features or routes {#grouping-by-features-or-routes}
13
+
#### Özelliklere veya rotalara göre gruplandırma {#grouping-by-features-or-routes}
14
14
15
-
One common way to structure projects is locate CSS, JS, and tests together inside folders grouped by feature or route.
15
+
Projeleri yapılandırmak için kullanılan yaygın yöntemlerden biri; CSS, JS ve testleri özellik veya rotalara göre gruplanan klasörlerin içine beraber koymaktır.
16
16
17
17
```
18
18
common/
@@ -35,11 +35,11 @@ profile/
35
35
ProfileAPI.js
36
36
```
37
37
38
-
The definition of a "feature" is not universal, and it is up to you to choose the granularity. If you can't come up with a list of top-level folders, you can ask the users of your product what major parts it consists of, and use their mental model as a blueprint.
38
+
"Özellik" tanımı evrensel değildir ve ayrıntı derecesini seçmek size bırakılmıştır. Eğer bir üst düzey klasörler listesi ortaya çıkaramazsanız, kullanıcılarınıza ürününüzün hangi ana bölümlerden oluştuğunu sorabilir ve akıllarındaki modeli bir taslak olarak kullanabilirsiniz.
39
39
40
-
#### Grouping by file type {#grouping-by-file-type}
40
+
#### Dosya türüne göre gruplandırma {#grouping-by-file-type}
41
41
42
-
Another popular way to structure projects is to group similar files together, for example:
42
+
Projeleri yapılandırmanın bir diğer popüler yöntemi ise benzer dosyaları birlikte gruplandırmaktır. Örneğin;
43
43
44
44
```
45
45
api/
@@ -59,16 +59,16 @@ components/
59
59
ProfileHeader.css
60
60
```
61
61
62
-
Some people also prefer to go further, and separate components into different folders depending on their role in the application. For example, [Atomic Design](http://bradfrost.com/blog/post/atomic-web-design/) is a design methodology built on this principle. Remember that it's often more productive to treat such methodologies as helpful examples rather than strict rules to follow.
62
+
Bazı insanlar daha da ileri gidip, bileşenleri uygulamadaki rollerine göre farklı klasörlere ayırmayı tercih ederler. Örneğin [Atomic Design](http://bradfrost.com/blog/post/atomic-web-design/), bu ilkeye dayalı bir tasarım metodolojisidir. Bu tür metodolojilerin takip edilmesi gereken katı kurallardan ziyade, yardımcı örnekler olarak değerlendirilmesi daha verimli olacaktır.
63
63
64
-
#### Avoid too much nesting {#avoid-too-much-nesting}
64
+
#### Çok fazla iç içe koymaktan kaçının {#avoid-too-much-nesting}
65
65
66
-
There are many pain points associated with deep directory nesting in JavaScript projects. It becomes harder to write relative imports between them, or to update those imports when the files are moved. Unless you have a very compelling reason to use a deep folder structure, consider limiting yourself to a maximum of three or four nested folders within a single project. Of course, this is only a recommendation, and it may not be relevant to your project.
66
+
Javascript projelerinde klasörleri derinlemesine iç içe koymanın çok fazla zararlı noktası bulunmaktadır. Klasörler arası bağıl import'lar yazmak veya dosyalar taşındığında bu import'ları güncellemek git gide zorlaşır. Derinlemesine bir dizin yapısı kullanmak için çok zorlayıcı bir nedeniniz olmadığı sürece, kendinizi tek bir proje için en fazla üç ya da dört iç içe klasör kullanmakla sınırlamayı düşünebilirsiniz. Tabii ki bu sadece bir öneridir ve sizin projeniz için uygun olmayabilir.
67
67
68
-
#### Don't overthink it {#dont-overthink-it}
68
+
#### Çok fazla düşünmeyin {#dont-overthink-it}
69
69
70
-
If you're just starting a project, [don't spend more than five minutes](https://en.wikipedia.org/wiki/Analysis_paralysis) on choosing a file structure. Pick any of the above approaches (or come up with your own) and start writing code! You'll likely want to rethink it anyway after you've written some real code.
70
+
Eğer bir projeye henüz yeni başlıyorsanız, dizin yapısı üzerine [beş dakikadan daha fazla zaman harcamayın](https://eksisozluk.com/analysis-paralysis--833201). Yukarıdaki yaklaşımlardan herhangi birini seçin (veya kendi yönteminizi getirin) ve kod yazmaya başlayın! Biraz gerçek kod yazdıktan sonra bu husus hakkında muhtemelen yeniden düşünmek isteyeceksinizdir.
71
71
72
-
If you feel completely stuck, start by keeping all files in a single folder. Eventually it will grow large enough that you will want to separate some files from the rest. By that time you'll have enough knowledge to tell which files you edit together most often. In general, it is a good idea to keep files that often change together close to each other. This principle is called "colocation".
72
+
Eğer tamamen çıkmaza girdiyseniz, tüm dosyaları tek bir klasörde tutarak başlayın. Eninde sonunda projeniz bazı dosyaları diğerlerinden ayırmak isteyeceğiniz kadar büyüyecek. O zamana kadar hangi dosyaları çoğu kez birlikte düzenlediğinizi söylemeye yetecek kadar bilginiz olacaktır. Genel olarak, sıklıkla birlikte değiştirilen dosyaları birbirlerine yakın tutmak iyi bir fikirdir. Bu prensip, "ortak yerleşim" olarak adlandırılır.
73
73
74
-
As projects grow larger, they often use a mix of both of the above approaches in practice. So choosing the "right" one in the beginning isn't very important.
74
+
Projeler büyüdükçe, pratikte yukarıdaki yaklaşımların her ikisinin de bir karışımı uygulanır. Yani başlangıçta "doğru" olanı seçmek çok önemli değil.
0 commit comments