Architecture Comparison
Technology Stack
| Component | Luma | Hyvä |
|---|---|---|
| JavaScript | KnockoutJS + RequireJS | Alpine.js + ES Modules |
| CSS | LESS | Tailwind CSS |
| Build | Magento static deploy | Vite |
| UI Framework | Magento UI Components | Alpine.js |
| Bundle Size | 500KB+ | ~50KB |
File Structure
Luma:
├── view/frontend/
│ ├── requirejs-config.js
│ ├── web/css/source/_extend.less
│ └── Magento_*/templates/
└── Vendor Module/
└── view/frontend/
Hyvä:
├── view/frontend/
│ ├── web/src/
│ │ ├── css/input.css
│ │ └── main.js
│ ├── tailwind.config.js
│ └── vite.config.js
└── Magento_*/templates/
Code Example
Luma (KnockoutJS)
<div data-bind="scope: 'cart'">
<span data-bind="text: items().length"></span>
<button data-bind="click: addItem">Add</button>
</div>
<script type="text/x-magento-init">
{
"*": {
"Magento_Ui/js/core/app": {
"component": "cart"
}
}
}
</script>
Hyvä (Alpine.js)
<div x-data="{ items: [], addItem() { this.items.push({}) } }">
<span x-text="items.length"></span>
<button @click="addItem">Add</button>
</div>
Performance Comparison
Core Web Vitals
| Metric | Luma | Hyvä | Improvement |
|---|---|---|---|
| LCP | 2.5-4s | 0.8-1.2s | 60-70% faster |
| FID | 100-200ms | 20-50ms | 75-80% faster |
| CLS | 0.1-0.3 | 0.02-0.05 | 80% better |
| TTFB | 1-2s | 0.3-0.6s | 65-70% faster |
Lighthouse Scores
Luma:
Performance: 50-70
Accessibility: 80-90
Best Practices: 70-80
SEO: 85-95
Hyvä:
Performance: 90-100
Accessibility: 90-100
Best Practices: 95-100
SEO: 95-100
Bundle Size
JavaScript:
Luma: 500KB+ (KnockoutJS, RequireJS, jQuery UI)
Hyvä: ~50KB (Alpine.js, minimal dependencies)
CSS:
Luma: 200KB+ (compiled LESS)
Hyvä: 10-30KB (purged Tailwind)
Total:
Luma: 700KB+
Hyvä: ~80KB
Server Impact
- TTFB: Hyvä reduces server processing time
- Caching: Better cache hit rates
- Bandwidth: 85%+ reduction in payload
- CPU: Lower client-side processing
Development Experience
Luma Development
# Setup
bin/magento deploy:mode:set developer
bin/magento cache:clean
# Build
bin/magento setup:static-content:deploy -f
# Debug
bin/magento dev:template-hints:enable
Hyvä Development
# Setup
npm install
npm run dev
# Build
npm run build
# Watch
npm run watch
Development Speed
| Task | Luma | Hyvä |
|---|---|---|
| Initial setup | 30 min | 10 min |
| CSS changes | 1-2 min (compile) | Instant (HMR) |
| JS changes | 1-2 min (deploy) | Instant (HMR) |
| Full rebuild | 5-10 min | 30 sec |
Debugging
Luma: Template hints, browser console, RequireJS debugger
Hyvä: Browser DevTools, Alpine.js debugger, Vite HMR
Learning Curve
- Luma: High (KnockoutJS, RequireJS, Magento UI)
- Hyvä: Low (Alpine.js, Tailwind, standard HTML)
Migration Considerations
When to Stay with Luma
- Complex custom KnockoutJS components
- Heavy reliance on Magento UI Components
- Limited budget for migration
- Short timeline
- Many incompatible extensions
When to Migrate to Hyvä
- Performance is critical
- New project (no legacy code)
- Budget available for migration
- Extensions are compatible
- Team comfortable with modern stack
Migration Cost Factors
Low Cost:
- Simple catalog site
- Few custom modules
- Compatible extensions
Medium Cost:
- Standard e-commerce
- Some custom modules
- Most extensions compatible
High Cost:
- Complex B2B
- Many custom modules
- Incompatible extensions
ROI Analysis
Benefits:
- 50-70% faster page loads
- 20-30% conversion improvement
- 10-20% revenue increase
- Lower hosting costs
- Better SEO rankings
Costs:
- Migration development
- Extension compatibility
- Testing and QA
- Training team
Decision Framework
- Audit: List all customizations
- Test: Check extension compatibility
- Estimate: Calculate migration cost
- Project: Calculate ROI
- Decide: Based on data
Quiz
1. How much faster is Hyvä compared to Luma?
2. What is the typical Lighthouse score for Hyvä?
3. When should you stay with Luma?
Flashcards
Question
What is the main difference between Luma and Hyvä?
Click to reveal answer
Answer
Technology stack: KnockoutJS/LESS vs Alpine.js/Tailwind
Question
How much JavaScript does Hyvä load?
Click to reveal answer
Answer
~50KB vs 500KB+ for Luma
Question
What is the typical performance improvement?
Click to reveal answer
Answer
50-70% faster page loads
Question
When to migrate to Hyvä?
Click to reveal answer
Answer
Performance critical, compatible extensions, budget available
Question
What is the main benefit of Hyvä?
Click to reveal answer
Answer
90+ Lighthouse scores and better Core Web Vitals
Revision Notes
Key Takeaways
- 1. Hyvä uses Alpine.js + Tailwind vs KnockoutJS + LESS
- 2. 50-70% faster page loads with Hyvä
- 3. 90+ Lighthouse scores vs 50-70 for Luma
- 4. Migration cost depends on customizations
- 5. Choose based on performance needs and budget
Interview Tips
- • Explain the technology differences
- • Know the performance metrics
- • Discuss when to use each frontend
- • Be ready to evaluate migration needs
Cheat Sheet
Luma: KnockoutJS + RequireJS + LESS
Hyvä: Alpine.js + Tailwind + Vite
Performance:
Luma: 50-70 Lighthouse
Hyvä: 90-100 Lighthouse
Bundle Size:
Luma: 700KB+
Hyvä: ~80KB
Migration:
Audit → Test → Estimate → Decide