Sẵn sàng thử sức?
Phỏng vấn thử với AI, nhận đánh giá và feedback chi tiết
Fullstack Developer làm gì? Khác gì so với Frontend/Backend?
Fullstack Developer có khả năng làm việc trên cả frontend và backend.
Trách nhiệm:
- UI/UX implementation (HTML, CSS, JS, React/Vue)
- Server-side logic (Node.js, Python, Go)
- Database design và queries
- API development
- Deployment và DevOps cơ bản
Client-Side Rendering vs Server-Side Rendering?
CSR: Browser tải HTML rỗng, JavaScript render content.
- Pros: Smooth interactions, giảm server load
- Cons: SEO khó, initial load chậm
SSR: Server render HTML đầy đủ, gửi về client.
- Pros: SEO tốt, fast initial page
- Cons: Server load cao hơn
Git workflow cơ bản? Các lệnh thường dùng?
# Clone repo
git clone https://github.com/user/repo.git
# Create branch
git checkout -b feature/login
# Stage và commit
git add .
git commit -m "Add login feature"
# Push
git push origin feature/login
# Pull latest
git pull origin main
# Merge
git checkout main
git merge feature/login
CORS là gì? Tại sao cần CORS?
CORS (Cross-Origin Resource Sharing) là cơ chế cho phép web page request resources từ domain khác.
Tại sao cần? Browser có Same-Origin Policy, block requests cross-origin để bảo mật.
// Backend (Express)
app.use(cors({
origin: 'https://frontend.com',
credentials: true
}));
Làm thế nào để connect Frontend với Backend?
1. REST API: HTTP requests (fetch, axios)
2. GraphQL: Single endpoint, flexible queries
3. WebSocket: Real-time, bidirectional
// Frontend fetch
const response = await fetch('/api/users', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ name: 'John' })
});
const data = await response.json();
Environment Variables dùng để làm gì?
Lưu trữ configuration như API keys, database URLs mà không hardcode trong code.
# .env file
DATABASE_URL=postgres://user:pass@localhost:5432/db
API_KEY=secret_key_here
# Access in Node.js
process.env.DATABASE_URL
Lưu ý: KHÔNG commit .env vào Git!