গাইড
ember-best-practices-এর ৫৮টা rule, হুবহু ইংরেজিতে। প্রতিটা পাতায় আগে Incorrect কোড, তার নিচে ভাঁজ করা Correct আর ব্যাখ্যা — আগে নিজে লিখুন, তারপর খুলুন।
1 · Route Loading and Data Fetching
৫Efficient route loading and parallel data fetching eliminate waterfalls. Using route model hooks effectively and loading data in parallel yields the largest performance gains.
2 · Build and Bundle Optimization
৩Using Embroider with static build optimizations, route-based code splitting, and proper imports reduces bundle size and improves Time to Interactive.
3 · Component and Reactivity Optimization
১৭Proper use of Glimmer components, modern file conventions, tracked properties, and avoiding unnecessary recomputation improves rendering performance.
- Avoid Constructors in Componentsদিন ০০১
- Avoid CSS Classes in Learning Examplesদিন ০০২
- Avoid Legacy Lifecycle Hooks (did-insert, will-destroy, did-update)দিন ০০৩
- Avoid Unnecessary Trackingদিন ০০৪
- Build Reactive Chains with Dependent Gettersদিন ০০৫
- Component File Naming and Export Conventionsদিন ০০৬
- Prefer Named Exports, Fallback to Default for Implicit Template Lookupদিন ০০৭
- Prevent Memory Leaks in Componentsদিন ০০৮
- Use {{on}} Modifier for Event Handlingদিন ০০৯
- Use @cached for Expensive Gettersদিন ০১০
- Use Class Fields for Component Compositionদিন ০১১
- Use Component Composition Patternsদিন ০১২
- Use Glimmer Components Over Classic Componentsদিন ০১৩
- Use Native Forms with Platform Validationদিন ০১৪
- Use Strict Mode and Template-Only Componentsদিন ০১৫
- Use Tracked Toolbox for Complex Stateদিন ০১৬
- Validate Component Argumentsদিন ০১৭
4 · Accessibility Best Practices
৫Making applications accessible is critical. Use ember-a11y-testing, semantic HTML, proper ARIA attributes, and keyboard navigation support.
5 · Service and State Management
৫Efficient service patterns, proper dependency injection, and state management reduce redundant computations and API calls.
6 · Template Optimization
১০Optimizing templates with proper helpers, avoiding expensive computations in templates, and using {{#each}} efficiently improves rendering speed.
- Avoid Heavy Computation in Templatesদিন ০৩৭
- Compose Helpers for Reusable Logicদিন ০৩৮
- Import Helpers Directly in Templatesদিন ০৩৯
- No helper() Wrapper for Plain Functionsদিন ০৪০
- Optimize Conditional Renderingদিন ০৪১
- Template-Only Components with In-Scope Functionsদিন ০৪২
- Use {{#each}} with @key for Listsদিন ০৪৩
- Use {{#let}} to Avoid Recomputationদিন ০৪৪
- Use {{fn}} for Partial Application Onlyদিন ০৪৫
- Use Helper Libraries Effectivelyদিন ০৪৬
7 · Performance Optimization
১Performance-focused rendering and event handling patterns help reduce unnecessary work in hot UI paths.
8 · Testing Best Practices
৬Modern testing patterns, waiters, and abstraction utilities improve test reliability and maintainability.
9 · Tooling and Configuration
১Consistent editor setup and tooling recommendations improve team productivity and reduce environment drift.
10 · Advanced Patterns
৫Modern Ember patterns including Resources for lifecycle management, ember-concurrency for async operations, modifiers for DOM side effects, helpers for reusable logic, and comprehensive testing patterns with render strategies.