|
1 | 1 | # From the orbital height |
2 | 2 |
|
3 | | -This section describes a set of modern standards for "web components". |
| 3 | +Bu bölüm, "web bileşenleri" için bir dizi modern standardı tanımlayacaktır. |
4 | 4 |
|
5 | | -As of now, these standards are under development. Some features are well-supported and integrated into the modern HTML/DOM standard, while others are yet in draft stage. You can try examples in any browser, Google Chrome is probably the most up to date with these features. Guess, that's because Google fellows are behind many of the related specifications. |
| 5 | +Şu anda bu standartlar geliştirme aşamasındadır. Bazı standartlar iyi bir desteğe sahip ve modern HTML/DOM standardına entegre edilmişken, diğerleri henüz taslak aşamasındadır. Örnekleri herhangi bir tarayıcıda deneyebilirsiniz, Google Chrome muhtemelen bu özellikler konusundaki en güncel tarayıcı seçeneği olacaktır. Bunun nedeni belki de Google takımının ilgili birçok özelliğin arkasında olmasıdır. |
6 | 6 |
|
7 | | -## What's common between... |
| 7 | +## ... arasında ortak olan nedir? |
8 | 8 |
|
9 | | -The whole component idea is nothing new. It's used in many frameworks and elsewhere. |
| 9 | +Bu bileşen fikri tamamen yeni bir şey değil. Birçok framework ve dahası tarafından daha önceden kullanılmaktaydı. |
10 | 10 |
|
11 | | -Before we move to implementation details, take a look at this great achievement of humanity: |
| 11 | +Detayları tanımlamaya başlamadan önce insanlığın bu büyük başarısına bir göz atalım: |
12 | 12 |
|
13 | 13 |  |
14 | 14 |
|
15 | | -That's the International Space Station (ISS). |
| 15 | +Bu, Uluslararası Uzay İstasyonu (ISS). |
16 | 16 |
|
17 | | -And this is how it's made inside (approximately): |
| 17 | +Bu ise içerisinde ne olduğu (hemen hemen): |
18 | 18 |
|
19 | 19 |  |
20 | 20 |
|
21 | | -The International Space Station: |
22 | | -- Consists of many components. |
23 | | -- Each component, in its turn, has many smaller details inside. |
24 | | -- The components are very complex, much more complicated than most websites. |
25 | | -- Components are developed internationally, by teams from different countries, speaking different languages. |
| 21 | +Uluslararası Uzay İstasyonu: |
| 22 | +- Birçok bileşenden meydana gelir. |
| 23 | +- Her bileşen kendi tarafında, içerisinde çok sayıda küçük detaylara sahiptir. |
| 24 | +- Bileşenler oldukça karmaşık, birçok websitesinden çok daha karmaşık bir yapıdadır. |
| 25 | +- Bileşenler; farklı dilleri konuşan, farklı ülkelerden takımlar tarafından, uluslararası olarak geliştirilir. |
26 | 26 |
|
27 | | -...And this thing flies, keeps humans alive in space! |
| 27 | +... Ayrıca bu şey, içerisinde insanları canlı tutarak uzayda uçar! |
28 | 28 |
|
29 | | -How such complex devices are created? |
| 29 | +Bu kadar karmaşık cihazlar nasıl oluşturulur? |
30 | 30 |
|
31 | | -Which principles we could borrow to make our development same-level reliable and scalable? Or, at least, close to it. |
| 31 | +Geliştirmemizi aynı düzeyde güvenilir ve ölçeklenebilir hale getirmek için hangi prensipleri ödünç alabiliriz? En azından, yaklaşabilmek için. |
32 | 32 |
|
33 | | -## Component architecture |
| 33 | +## Bileşen mimarisi |
34 | 34 |
|
35 | | -The well known rule for developing complex software is: don't make complex software. |
| 35 | +Karmaşık yazılım geliştirmenin en meşhur kuralı şudur: karmaşık yazılım yapma. |
36 | 36 |
|
37 | | -If something becomes complex -- split it into simpler parts and connect in the most obvious way. |
| 37 | +Bir şey eğer karmaşıklaşacaksa -- onu parçalara ayır ve birbiriyle en açık şekilde bir araya getir. |
38 | 38 |
|
39 | | -**A good architect is the one who can make the complex simple.** |
| 39 | +**İyi bir mimar, karmaşığı basit bir şekilde oluşturabilendir.** |
40 | 40 |
|
41 | | -We can split user interface into visual components: each of them has own place on the page, can "do" a well-described task, and is separate from the others. |
| 41 | +Kullanıcı arayüzünü görsel bileşenlere ayırabiliriz: herbiri sayfada kendi yerine sahip olur, iyi tanımlanmış bir görev "yapar" ve diğerlerinden ayrıdır. |
42 | 42 |
|
43 | | -Let's take a look at a website, for example Twitter. |
| 43 | +Şimdi bir web sitesine, örneğin Twitter'a bir göz atalım. |
44 | 44 |
|
45 | | -It naturally splits into components: |
| 45 | +Doğal olarak bileşenlere ayrılıyor: |
46 | 46 |
|
47 | 47 |  |
48 | 48 |
|
49 | | -1. Top navigation. |
50 | | -2. User info. |
51 | | -3. Follow suggestions. |
52 | | -4. Submit form. |
53 | | -5. (and also 6, 7) -- messages. |
| 49 | +1. Üst menü. |
| 50 | +2. Üye bilgisi. |
| 51 | +3. Takip önerileri. |
| 52 | +4. Gönderi formu. |
| 53 | +5. (ve aynı zamanda 6, 7) -- mesajlar. |
54 | 54 |
|
55 | | -Components may have subcomponents, e.g. messages may be parts of a higher-level "message list" component. A clickable user picture itself may be a component, and so on. |
| 55 | +Bileşenler alt bileşenlere sahip olabilir; örneğin mesajlar, bir üst seviyedeki "mesaj listesi" bileşeninin birer parçası olabilir. Tıklanabilir bir kullanıcı resmi kendi başına bir bileşen olabilir ve bu şekilde gider. |
56 | 56 |
|
57 | | -How do we decide, what is a component? That comes from intuition, experience and common sense. Usually it's a separate visual entity that we can describe in terms of what it does and how it interacts with the page. In the case above, the page has blocks, each of them plays its own role, it's logical to make these components. |
| 57 | +Bir bileşenin ne olduğuna nasıl karar vereceğiz? Bu biraz da sezgiden, deneyimden ve sağduyudan gelir. Genellikle ne yaptığını ve sayfa ile nasıl etkileşimde bulunduğunu tanımlayabildiğimiz, ayrılmış bir görsel varlıktır. Yukarıdaki durumda sayfa bloklara sahiptir, bunların herbiri kendi rolünü oynar. Bu durumda bunları bileşen yapmak mantıklıdır. |
58 | 58 |
|
59 | | -A component has: |
60 | | -- its own JavaScript class. |
61 | | -- DOM structure, managed solely by its class, outside code doesn't access it ("encapsulation" principle). |
62 | | -- CSS styles, applied to the component. |
63 | | -- API: events, class methods etc, to interact with other components. |
| 59 | +Bir bileşen şunlara sahiptir: |
| 60 | +- kendi JavaScript sınıfı. |
| 61 | +- yalnızca kendi sınıfı tarafından yönetilen DOM mimarisi, dış kod buna erişemez ("kapsülleme" prensibi). |
| 62 | +- Bileşen tarafından uygulanan CSS stilleri |
| 63 | +- API: diğer bileşenlerle etkileşime geçmek için olaylar, sınıf metotları vs. |
64 | 64 |
|
65 | | -Once again, the whole "component" thing is nothing special. |
| 65 | +Bir kez daha değinelim, tüm bu "bileşen" yapısı özel bir şey değildir. |
66 | 66 |
|
67 | | -There exist many frameworks and development methodologies to build them, each one with its own bells and whistles. Usually, special CSS classes and conventions are used to provide "component feel" -- CSS scoping and DOM encapsulation. |
| 67 | +Bunları oluşturmak için çok fazla framework ve geliştirme metodolojisi vardır, herbirinin kendi gösterişi vardır. Genellikle "bileşen hissi" sağlamak adına, CSS kapsamı ve DOM kapsülleme için özel CSS sınıfları ve kuralları kullanır. |
68 | 68 |
|
69 | | -"Web components" provide built-in browser capabilities for that, so we don't have to emulate them any more. |
| 69 | +"Web bileşenleri" bunun için yerleşik tarayıcı özellikleri sağlar, bu yüzden bunları artık taklit etmemize gerek yok. |
70 | 70 |
|
71 | | -- [Custom elements](https://html.spec.whatwg.org/multipage/custom-elements.html#custom-elements) -- to define custom HTML elements. |
72 | | -- [Shadow DOM](https://dom.spec.whatwg.org/#shadow-trees) -- to create an internal DOM for the component, hidden from the others. |
73 | | -- [CSS Scoping](https://drafts.csswg.org/css-scoping/) -- to declare styles that only apply inside the Shadow DOM of the component. |
74 | | -- [Event retargeting](https://dom.spec.whatwg.org/#retarget) and other minor stuff to make custom components better fit the development. |
| 71 | +- [Özel elementler](https://html.spec.whatwg.org/multipage/custom-elements.html#custom-elements) -- özel HTML elementleri tanımlamak için. |
| 72 | +- [Gölge DOM](https://dom.spec.whatwg.org/#shadow-trees) -- bileşen için iç DOM oluşturarak onu diğerlerinden gizlemek için. |
| 73 | +- [CSS Kapsamı](https://drafts.csswg.org/css-scoping/) -- yalnızca bileşen içindeki Gölge DOM'a etki edecek stiller tanımlamak için. |
| 74 | +- [Olay yeniden hedefleme](https://dom.spec.whatwg.org/#retarget) ve özel bileşenlerin geliştirmeye daha çok uyması için diğer şeyler. |
75 | 75 |
|
76 | | -In the next chapter we'll go into details of "Custom Elements" -- the fundamental and well-supported feature of web components, good on its own. |
| 76 | +Bir sonraki bölümde, web bileşenleri için temel, iyi desteğe sahip ve kendi başına iyi bir yapıya sahip olan "Özel Elementler"in detaylarına ineceğiz. |
0 commit comments