Which three operations should be done in a controller?
Choose 3 answers
Suggested Answer: A, C, E
Get Premium CCM-101 Questions
as Interactive Web-Based Practice Test or PDF
Real Exam Format
Detailed Explanations
Instant Access
Get Your Practice Test
26 comments · newest first
MI
Misty
10 months ago
Wait, why would you create a plain JS object in a controller?
WI
Willow
11 months ago
I think E is super important too!
VE
Venita
11 months ago
A is definitely one of the key operations!
EL
Elvera
11 months ago
C is a good choice, but not always necessary.
TO
Toshia
11 months ago
Totally agree with A and E, but B seems off to me.
GL
Glendora
11 months ago
I’m a bit confused about the Script API part; I thought that was more related to the view layer than the controller.
RO
Rochell
12 months ago
I feel like using the model needed for the view is a key operation, but I can't recall if creating a plain JavaScript object is really part of the controller's responsibilities.
BE
Bette
12 months ago
I remember practicing a question similar to this, and I think using middleware functions is important for handling requests.
MA
Mattie
1 year ago
I think generating the response as JSON or HTML is definitely something a controller should do, but I'm not sure about the other two.
FR
Francoise
1 year ago
Yep, I agree with Erin. Those three options cover the key duties of a controller in my experience.
ER
Erin
1 year ago
I think I'll go with A, C, and E. The controller should generate the response, use middleware when needed, and leverage the appropriate model.
AI
Aide
1 year ago
I'm a bit unsure about B and C. Using the Script API and middleware functions - are those really controller responsibilities?
RO
Rodney
1 year ago
Okay, let's see. I know the controller is responsible for handling the request and generating the response, so A and E seem like good options.
TE
Terrilyn
1 year ago
Hmm, this looks like a tricky one. I'll need to think carefully about the responsibilities of a controller.
IS
Isadora
1 year ago
I'd go with A, C, and E. Generating the response, using middleware, and accessing the model - that's the holy trinity of controller operations!
DA
Daniel
1 year ago
Haha, I bet the person who wrote this question is a backend developer who's never had to deal with the view layer! The controller is for business logic, not generating data for the view.
AN
Annmarie
1 year ago
I agree with Brandon. Those three options cover the main functions of a controller. B and D seem more like view or model responsibilities.
VI
Viva
1 year ago
E) Use the model needed for the view.
EA
Earlean
1 year ago
C) Use middleware functions when applicable
HU
Huey
1 year ago
A) Generate the response as JSON or HTML
BR
Brandon
1 year ago
A, C, and E seem like the correct operations for a controller. Generating the response, using middleware, and accessing the model are all typical controller responsibilities.
MI
Mitzie
1 year ago
Generating the response, using middleware, and accessing the model are all typical controller responsibilities.
DA
Daryl
1 year ago
A, C, and E are indeed the correct operations for a controller.
MA
Marylyn
1 year ago
I believe C should also be done in a controller. Middleware functions can help with request processing.
MO
Mollie
1 year ago
I agree with Aliza. Those operations are essential for controller functionality.
AL
Aliza
1 year ago
I think A, B, and E should be done in a controller.