Module 30: SAPUI5 Interview Preparation
This module prepares you for real SAPUI5 interviews, focusing on:
- Conceptual clarity
- Performance scenarios
- RAP & Fiori Elements alignment
- Common interviewer traps
1. UI5 Fundamentals – Q&A
Q1. What is SAPUI5?
Answer:
SAPUI5 is a JavaScript-based UI framework for building enterprise-grade, responsive web applications, aligned with SAP Fiori design principles and deeply integrated with SAP backend systems via OData.
Q2. SAPUI5 vs OpenUI5?
| Aspect | SAPUI5 | OpenUI5 |
|---|---|---|
| License | Commercial | Open source |
| Controls | Full SAP set | Subset |
| SAP Integration | Native | Limited |
Q3. Why is sap.m preferred?
Answer:
sap.m controls are responsive, mobile-first, and fully compliant with SAP Fiori UX standards.
2. Data Binding – Interview Questions
Q4. Types of data binding in UI5?
Answer:
- Property binding
- Aggregation binding
- Element binding
Q5. Difference between OneWay and TwoWay binding?
| Binding | Description |
|---|---|
| OneWay | Model → UI |
| TwoWay | Model ↔ UI |
Interview Tip:
Use OneWay binding for performance-sensitive views.
Q6. What is element binding and why is it important?
Answer:
Element binding sets a binding context, allowing relative bindings and reducing deep path usage, improving performance and readability.
3. OData & Performance Scenarios
Q7. How do you optimize OData calls in UI5?
Answer:
- Use
$selectto limit fields - Use
$filterfor server-side filtering - Use
$expandsparingly - Enable server-side paging
- Avoid full model refreshes
Q8. Table performance is slow. What do you check?
Answer:
- Payload size
- Binding mode
- Formatters in cells
- Growing/paging enabled
- Control choice (
sap.m.Tablevssap.ui.table.Table)
4. Fiori Elements vs Freestyle UI5
Q9. When do you use Fiori Elements?
Answer:
For standard transactional and analytical apps where UI is driven by CDS annotations and consistency is required.
Q10. When is freestyle UI5 required?
Answer:
For highly customized UI, complex workflows, or non-standard layouts not supported by Fiori Elements.
Interview One-Liner
“If the UI is standard, use Fiori Elements. If it’s unique, use freestyle.”
5. RAP + UI5 Interview Questions
Q11. How does UI5 consume RAP services?
Answer:
UI5 consumes RAP via OData V4, typically using Fiori Elements, with draft handling, validations, and transaction management handled by RAP.
Q12. Does UI5 handle COMMIT WORK in RAP?
Answer:
No. RAP controls the transaction lifecycle. UI5 only triggers actions.
Never say UI5 handles commit/rollback in RAP.
Q13. How are RAP actions exposed in UI?
Answer:
Actions are defined in RAP behavior and exposed automatically in Fiori Elements using UI annotations.
6. Security & Authorization
Q14. Can UI5 enforce security?
Answer:
No. UI5 can only hide or disable UI elements. Real security must be enforced in the backend (CDS/RAP/OData).
7. Testing & Quality
Q15. How do you test UI5 applications?
Answer:
- QUnit for unit tests
- OPA5 for integration tests
- MockServer for backend simulation
- Integrated into CI/CD pipelines
8. Scenario-Based Questions (Very Important)
Scenario 1: App is slow on mobile
Fixes:
- Lazy load views
- Reduce initial payload
- Avoid tables
- Optimize bindings
Scenario 2: User sees button but action fails
Explanation:
- UI hides/controls UX
- Backend enforces authorization
9. Common UI5 Interview Traps
- submitChanges in OData V4
- Frontend-only security
- Overusing TwoWay binding
- Heavy formatters in tables
10. Rapid-Fire UI5 Questions
- What is manifest.json? → App descriptor
- What is Component.js? → App entry point
- Why async routing? → Performance
- Why view model? → UI state separation
11. Final Interview Strategy
- Explain why, not just how
- Mention performance & security
- Align answers with RAP + Fiori Elements
- Avoid legacy patterns