開発者は、Apex クラス内のメソッドをインポートする Lightning Web コンポーネントを作成します。検証ボタンが押されると、メソッドが実行され、複雑な検証が実行されます。 この実装シナリオでは、MVC アーキテクチャに従ってコントローラーにどの 2 つのオプションがありますか? 2つの回答を選択してください
正解:B,C
In the context of the MVC (Model-View-Controller) architecture for a Lightning Web Component (LWC), the Apex class and JavaScript file are responsible for handling the controller's role: Apex Class (Controller): Acts as the server-side controller. Executes business logic, such as the complex validations mentioned in the scenario. Exposes methods for the LWC to call using@AuraEnabled. Reference:https://developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc.apex JavaScript File (Controller): Acts as the client-side controller. Manages the interaction between the HTML (View) and Apex methods. Executes functions triggered by user actions, such as clicking the "Validate" button. Reference:https://developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc. js_props_methods Why Not the Other Options?A. HTML file: Represents the "View" in MVC, focusing on UI rendering. D). XML file: Used for metadata configuration and is not part of the controller functionality.