Web Developer Specialization - Sample Exam - Question 10 clarification


Can someone please explain to me why the anwser of question 10 of the sample test for the web developer specialization is what it is?

The question is as follows:

Consider a scenario where we need to fetch the daily energy consumption and display it in a chart on a Dashboard Screen. The daily energy consumption is saved in the EnergyDailyConsumption Entity in the next image. The relevant information for the chart is the day (Day attribute) and the consumption in KWh (ConsumptionKWh attribute), and this calculation is going to be needed in other places in the app. Which of the following approaches, if not all of them, follow the recommended best practices to support this scenario? A. Solution A 
B. Solution B 
C. Solution C 
D. All solutions follow the recommended best practices

The answer is C.

Kind regards,



Hi Chris, 

I found this one also difficult to understand, but i think it is as follows: 

They key-sentence in the question is: "this calculation is going to be needed in other places in the app".  Therefor a serveraction is created (that can be used in other places), that only returns the needed Day and ConsumptionKWH.  So there is not too much returned.

In A there is no reusable serveraction created.

In B the serveraction returns too much

So C is the correct answer, the serveraction is used in several places and does not retuns too much.

Best regards, and good luck with your exam!


yes agree with Marlies, A is not the answer they are looking for because it doesn't promote reuse (although the example is a but too simple, reuse what exactly, it's a simple query ??), B is inferior because of performance, see rule 10 on this page.


Addition to Marlies answer, In B the Data type is of aggregate so it is returning all the attributes whereas in C, Data type is defined as structure with only 2 required attributes so it becomes light wight and ideal in performance perspective.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.