Lyra
Learn
AI Learning Platform
π Midnight
π Comfort
π₯ Ember
π Paper
β Contrast
Exams
Sign in to track progress
β Back to the lesson
Module 6 Β· Quiz
Layers That Earn Their Keep
1. What is the primary responsibility of the service layer in an MVC architecture?
Translating HTTP requests into application intent
Handling business logic and rules
Persisting data to the database
Formatting view models for presentation
2. Why should controllers not directly query the database?
It makes the code more complex
It risks untestable and un-reusable logic
It slows down the application performance
It is against coding standards
3. What role do view models play in the architecture described in the lesson?
They represent entities directly
They serve as a translation layer between entities and views
They handle business logic
They manage database connections
4. What should a developer ensure when implementing business logic in a view?
That it's flexible and easy to change
That it belongs in the service layer instead
That it operates independently of user input
That it meets all performance requirements
Submit answers
Continue: Services and Interfaces β
Review this lesson
Retake quiz