Close Menu
Dripiv Plus
    Facebook X (Twitter) Instagram
    Dripiv Plus
    • Home
    • Business
    • News
    • LifeStyle
    • Technology
    • Health
    • Home Improvement
    • Travel
    • Social Media
    Dripiv Plus
    Home»Apps»Why Do We Need Web Components?
    Apps

    Why Do We Need Web Components?

    AlbertBy AlbertApril 10, 2021No Comments2 Mins Read
    Facebook Twitter Pinterest LinkedIn Tumblr Email
    Share
    Facebook Twitter LinkedIn Pinterest Email

    Web apps are created with HTML markups, CSS styles, and JavaScript code. Markups are the backbone of web apps that lay out the structure with content. HTML specification provides a set of standard built-in elements, including div, span, p, h1 to h6, section, etc. The set of built-in elements may expand in different specifications.

    For example, HTML5 introduces more semantic elements like main, article, section, header, footer, etc. These built-in elements are for general purposes only and provide limited semantics. However, modern web development requires much more than those simple elements.

    When developing with existing web frameworks, a typical component usually consists of the following three parts. Chapter 3 Web Components and Stencil 71

    • A fragment of HTML markup for the component to operate on. The markup can contain standard HTML elements and other components developed using the same framework.

    • A JavaScript object that manages the component’s internal states and interactions with end users and other components. This usually involves event handling and data bindings.

    Event handlers receive the user’s actions to trigger changes of internal states and communications with the back-end server. Data bindings render the HTML markup with dynamic content retrieved from the back-end server.

    Some frameworks also support bindings of HTML form elements with the component’s internal states.

    • Some CSS styles for the component’s look and feel. It’s recommended for these CSS styles to be scoped in the current component to avoid unexpected conflicts and overrides with styles from other components.

    A typical practice is to use a unique CSS class name for the root element of the component’s markup, and all the component’s styles are nested under this class name;

    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
    Albert
    • Website

    Related Posts

    Elevating Outdoor Comfort: The Importance of Dual Zone Fridges and Outdoor Space Heaters

    January 15, 2025

    How a Schedule Calendar Simplifies Appointment Management for Small Business Owners

    November 12, 2024

    Enhancing Your Ride: The Importance and Uses of Polaris Ranger Accessories

    September 11, 2024
    Categories
    • Apps
    • Automotive
    • Blog
    • Business
    • Digital Marketing
    • Education
    • Entertainment
    • Fashion
    • Fitness
    • Food
    • Gadget
    • Game
    • Health
    • Home
    • Home Improvement
    • Instagram
    • Latest
    • Law
    • Lifestyle
    • News
    • Pet
    • Real Estate
    • Shopping
    • Smartphones
    • Social Media
    • Sports
    • Technology
    • Travel
    • Trending
    • Website
    Facebook X (Twitter) Instagram Pinterest
    • Contact us
    • Privacy Policy
    Dripivplus.com © 2026, All Rights Reserved

    Type above and press Enter to search. Press Esc to cancel.