Explanation: Aura Components and Lightning Web Components are two technologies that are built on a framework that fully supports the business requirement of building a responsive application capable of responding to touch events, that will be executed on stateful clients. Both technologies are part of the Lightning Component Framework, which is a modern UI framework for developing dynamic web apps for mobile and desktop devices. The Lightning Component Framework uses standard web technologies, such as HTML, CSS, JavaScript, and Web Components, to create reusable and interoperable components that can adapt to different screen sizes, devices, and orientations. The framework also provides features such as data binding, event handling, state management, and server-side integration, to enable developers to create rich and interactive user interfaces.
Aura Components are the original technology for creating Lightning components. They use a custom XML-based markup language, Aura, to define the component structure and behavior. Aura Components can respond to touch events using the ui:input component, which provides a generic input element that can handle different input types, such as text, number, date, checkbox, radio, toggle, and email. The ui:input component also supports touch gestures, such as swipe, tap, and pinch, by using the ontouchstart, ontouchend, ontouchmove, and ontouchcancel attributes. Aura Components are stateful, meaning that they maintain their state on the client-side and communicate with the server only when necessary. This reduces the network traffic and improves the performance and user experience.
Lightning Web Components are the newer technology for creating Lightning components. They use standard HTML, CSS, and JavaScript to define the component structure and behavior. Lightning Web Components can respond to touch events using the standard HTML input element, which provides a native input element that can handle different input types, such as text, number, date, checkbox, radio, toggle, and email. The input element also supports touch gestures, such as swipe, tap, and pinch, by using the standard touch event listeners, such as touchstart, touchend, touchmove, and touchcancel. Lightning Web Components are also stateful, meaning that they maintain their state on the client-side and communicate with the server only when necessary. This reduces the network traffic and improves the performance and user experience.
Visualforce Components and Visualforce Pages are two technologies that are not built on a framework that fully supports the business requirement of building a responsive application capable of responding to touch events, that will be executed on stateful clients. Visualforce Components are reusable UI elements that can be used in Visualforce Pages. Visualforce Pages are web pages that can display and interact with Salesforce data and logic. Visualforce Components and Pages use a custom XML-based markup language, Visualforce, to define the UI elements and behavior. Visualforce Components and Pages can be made responsive by using the Salesforce Lightning Design System (SLDS), which is a collection of design guidelines, components, and resources that enable developers to create consistent and beautiful user interfaces across devices. However, Visualforce Components and Pages do not have native support for touch events, and require custom JavaScript code to handle them. Visualforce Components and Pages are also stateless, meaning that they do not maintain their state on the client-side and communicate with the server on every request. This increases the network traffic and affects the performance and user experience.
References:
- Lightning Component Framework
- Aura Components Developer Guide
- Lightning Web Components Developer Guide
- Visualforce Developer Guide
- Salesforce Lightning Design System