VHow do you keep a large frontend codebase from slowing down?
Mülakat sorusuFrontend
Frontend pozisyonlarının mülakatçıları çoğu zaman platformla başlar: tarayıcı bir sayfayı nasıl çizer, JavaScript beklemeyi nasıl yönetir ve CSS bir yerleşimi (layout) nasıl kurar. Framework'ler birkaç yılda bir değişir ama bu fikirler aynı kalır. Bunları sade İngilizceyle anlatabiliyorsanız her framework'le çalışabilirsiniz.
Cevaplarınızı pratik tutun. Neyi ölçeceğinizi, tarayıcı araçlarında neye bakacağınızı ve kullanıcının ne göreceğini söyleyin. Mülakatçılar, teknik ayrıntıları sayfayı kullanan gerçek bir insanın deneyimine bağlayan adayları sever.
- ✓Kelimeler → ifadeler → cümleler → konuşma
- ✓Yanıtın anlamı
- ✓Dil
Sık sorulan mülakat soruları ve örnek cevaplar
How does the browser turn HTML and CSS into a visible page?
Tarayıcı HTML ve CSS'i nasıl görünür bir sayfaya dönüştürür?
Mülakatçı ne duymak ister. Adımlar (DOM, stiller, layout, paint, compositing) ve hangi değişikliklerin pahalı olduğu.
Yüksek sesle çalışmak için İngilizce örnek cevapThe browser parses the HTML into the DOM and the CSS into a style model. It combines them to find out what is visible and which styles apply. Then it does layout, which calculates the size and position of every element, then paint, which draws the pixels, and finally compositing, which puts the layers together. Layout is the expensive part. If I change something that affects geometry, like width or position, the browser may recalculate the layout for many elements. Changes to transform and opacity are usually cheaper, because the browser can often handle them in the compositing step. Also, scripts in the head can block rendering, so I load non-critical ones with defer or async.
How does asynchronous code work in JavaScript?
JavaScript'te asenkron kod nasıl çalışır?
Mülakatçı ne duymak ister. Tek bir ana thread, event loop, görevler (tasks) ile promise callback'leri arasındaki fark ve thread'i asla bloklamama kuralı.
Yüksek sesle çalışmak için İngilizce örnek cevapJavaScript runs on one main thread, so it does one thing at a time. When I start something slow, like a network request, the browser does the waiting outside the main thread. When the work finishes, a callback goes into a queue. The event loop takes work from the queue when the call stack is empty. Promise callbacks use a separate microtask queue, which runs before the next regular task. The async and await syntax sits on top of promises and makes asynchronous code look sequential. The practical rule is to never block the main thread with a long loop, because the page freezes. I also always handle errors, with try and catch or with a catch on the promise.
How do you manage state in a frontend application?
Bir frontend uygulamasında state'i nasıl yönetirsiniz?
Mülakatçı ne duymak ister. Farklı state türleri (yerel, paylaşılan, sunucu, URL) ve belirli bir kütüphane adı vermeden tek doğruluk kaynağı (single source of truth) ilkesi.
Yüksek sesle çalışmak için İngilizce örnek cevapI separate state by type. Local state, like whether a dropdown is open, stays inside the component. Shared client state, like the current user or a shopping cart, may need a central store or a shared context. Server state, like a list loaded from an API, is different. It needs caching, loading and error handling, and refetching, so I use a data-fetching layer for it and do not copy it into a global store. The URL is also state: filters and page numbers belong there, so users can share links. My rule is to keep state close to where it is used, and to have one source of truth for every piece of data.
A page loads slowly. How do you find the cause and fix it?
Bir sayfa yavaş yükleniyor. Nedeni nasıl bulur ve nasıl düzeltirsiniz?
Mülakatçı ne duymak ister. Önce ölçmeye dayalı bir yöntem, çerçeve olarak Core Web Vitals ve son bir kontrolle birlikte birkaç somut çözüm.
Yüksek sesle çalışmak için İngilizce örnek cevapI start by measuring, not guessing. I use the performance tools of the browser to see the loading time, and field data if I have it. The Core Web Vitals give a good frame: how fast the main content appears, how quickly the page responds to input, and whether the layout jumps. Common fixes are sending less JavaScript by splitting the bundle, compressing and resizing images, loading things below the fold lazily, caching static files with a CDN, and reserving space for images to avoid layout shifts. After each change, I measure again, because an optimisation that I cannot measure may not help.
How do you make a web page accessible?
Bir web sayfasını nasıl erişilebilir (accessible) yaparsınız?
Mülakatçı ne duymak ister. Önce semantik HTML, klavye desteği, kontrast ve metin alternatifleri, ARIA'nın dikkatli kullanımı ve elle test.
Yüksek sesle çalışmak için İngilizce örnek cevapAccessibility means that people can use the page with a keyboard, a screen reader or other assistive technology, and with different abilities. I start with semantic HTML: a real button for actions, a link for navigation, proper headings and labels for form fields. Native elements give keyboard support and the right role for free. I check that everything works with the keyboard alone, with a visible focus. I keep enough colour contrast and I write a meaningful alt text for images. I use ARIA only when native HTML is not enough, because wrong ARIA is worse than none. I test with automated tools and also by hand, because tools find only part of the problems.
Anahtar terimler nasıl telaffuz edilir
- JavaScript
- CA-vı-skript
- DOM
- di-o-em (harfleri tek tek söyleyin)
- asynchronous
- ey-SİN-krı-nıs
- accessibility
- ek-ses-ı-BİL-i-ti
- semantic
- si-MEN-tik
- responsive
- ri-SPON-siv
- viewport
- VYU-port
Cevap vermek için kullanışlı kalıplar
- I would measure it first with the performance tools.Önce performans araçlarıyla ölçerdim.
- That change triggers a layout recalculation.Bu değişiklik layout'un yeniden hesaplanmasını tetikler.
- The state should live as close as possible to where it is used.State, kullanıldığı yere mümkün olduğunca yakın durmalı.
- I would use a native element here, because it is accessible by default.Burada yerel (native) bir eleman kullanırdım, çünkü varsayılan olarak erişilebilir.
- The main thread is blocked, so the page freezes.Ana thread bloke olmuş, bu yüzden sayfa donuyor.
- It depends on whether the data is local or comes from the server.Verinin yerel mi yoksa sunucudan mı geldiğine bağlı.
- From the point of view of the user, what changes?Kullanıcının bakış açısından, ne değişiyor?
Sık yapılan hatalar
- Yalnızca bir framework'ü anlatmak. "The framework updates the screen" diyorsanız, tarayıcının altta ne yaptığını da söyleyin. Mülakatçılar önce temelleri yoklar.
- "Java" ile "JavaScript"i karıştırmak. İkisi farklı dillerdir ve karıştırmak özensiz duyulur. CA-vı-skript'i net söyleyin.
- Ölçmeden optimize etmek. Hangi aracı kullanacağınızı ve öncesinde ve sonrasında hangi sayıyı izleyeceğinizi söyleyin.
- Erişilebilirliği projenin sonuna kalan bir ek gibi görmek. Onu başından beri, semantik HTML ve klavye testiyle birlikte kurduğunuzu söyleyin.
- Zarf yerine sıfat kullanmak: "the page loads slow" ya da "it works good". "The page loads slowly" ve "it works well" deyin. Türkçede “yavaş yükleniyor” ve “iyi çalışıyor” için aynı sözcükler kullanıldığı için bu hata sık görülür.
Sıkça sorulan sorular
Hangi framework'ü bildiğimi söylemeliyim?
Gerçek bir projede kullandığınızı söyleyin ve onu nasıl kullandığınızı anlatın. Birçok mülakatçı HTML, CSS ve JavaScript temellerine daha çok önem verir, sonra bunları framework'te iyi uygulayıp uygulamadığınıza bakar.
CSS yerleşimini mülakatta nasıl anlatırım?
Flexbox'ın tek boyutlu yerleşim (bir satır ya da bir sütun) için, Grid'in ise iki boyutlu yerleşim (satırlar ve sütunlar birlikte) için olduğunu söyleyin. İkisi çoğu zaman aynı sayfada kullanılır. Box model'den ve media query'lerle duyarlı tasarımdan (responsive design) söz edin ve işinizden bir örnek verin.
Canlı kod yazmam gerekecek mi?
Çoğu zaman evet: küçük bir bileşen ya da asenkron kod içeren bir fonksiyon. Planınızı yüksek sesle söyleyin: önce HTML'de yapı, sonra stiller, sonra davranış. Boş durumdan (empty state), yükleme durumundan ve klavyeden söz edin; bunlar deneyimi gösterir.
Bir cevabı okumak ile onu söylemek aynı şey değildir. Her soruyu yüksek sesle çalışın, ardından kendi cevabınızın anlamını ve dilini karşılaştırın.
SpeakRole’i dene ↗Bu alandaki diğer konular