Kentico Xperience 13 for developers: Builders exercise issue

Nattawut Comlon asked on May 3, 2023 09:25

hi Kentico,

In training module: Builders, Implementing an image slideshow widget, after the "Exercise: Implementing slide management", where it says "Register the widget".

In the code snippet, the class "SlideshowEditorResource" wasn't implemented so far. this cause the build error. Not sure if the content is missing or if I miss that exercise to implement the class "SlideshowEditorResource", could you please tell me how to find it?

Thank you so much

Correct Answer

Jan Lenoch answered on May 3, 2023 14:56

Hi Nattawut,

Thanks for reaching out! That class is just an empty localization class without any implementation. Microsoft adopted a pattern that allows adding imperative logic into the otherwise declarative framework of localizable resource strings (.resx files). That pattern assumes you'll create a class for each of your .resx files. That class acts as a wrapper for the .resx file of your primary language and all its localized versions. That pattern, unfortunately, means that you need to create dummy classes for each of your .resx files, even though, in almost all cases, you don't have any imperative logic to implement.

When I started creating developer courses, I realized that mentioning all such dummy classes, "using" statements, namespaces, CSS styles, or other ancillary code in the course actually hurts more than it helps. Therefore, I opted for always providing trainees with fully implemented and working codebases in dedicated GH branches that the course points to (apart from the otherwise fully step-by-step kind of tuition). I hope you managed to find that class in the working codebase quickly. However, I'm still convinced that adding instructions to create these ancillary pieces of code would clutter the course without adding any value.

Therefore, if you encounter any such error, please take a look at the final state GH branch for your module (the xp-for-developers-builders branch in your case) and copy the missing piece from there.

I hope that helps.

Jan

0 votesVote for this answer Unmark Correct answer

Recent Answers


Nattawut Comlon answered on May 4, 2023 00:11 (last edited on May 4, 2023 00:11)

That makes sense, Thank you Jan,

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.