開発者は、Apex クラス内のメソッドをインポートする Lightning Web コンポーネントを作成します。検証ボタンが押されると、メソッドが実行され、複雑な検証が実行されます。 この実装シナリオでは、MVC アーキテクチャに従ってコントローラーの一部となる 2 つのオプションはどれですか。 2つの回答を選択してください
正解:C,D
In the Model-View-Controller (MVC) architecture applied to a Lightning Web Component (LWC) that imports an Apex method: Controller refers to the logic that handles input and interactions. In this scenario, when a button is pressed, the method runs to execute complex validations. Option C: Apex class Part of Controller. The Apex class contains the method that performs the complex validations. It acts as the server-side controller logic. The JavaScript file of the LWC handles the client-side logic. It invokes the Apex method when the button is pressed. The HTML file defines the component's template (View), not the Controller. Option B: XML file Configuration File. The XML file (configuration file) defines metadata about the component, such as where it's available, but it's not part of the Controller. Conclusion: The Controller parts in this scenario are the Apex class and the JavaScript file, which are Options C and D. Reference: Calling Apex Methods Option D: JavaScript file Part of Controller. JavaScript Controller in LWC Incorrect Options: Option A: HTML file View Layer.