Web Components: The Secret Ingredient Helping Power The Web

Поделиться
HTML-код
  • Опубликовано: 17 июн 2019
  • As a web developer, you may or may not have tried Web Components - but as a web user, you almost certainly have. Adoption has quietly taken off. Millions of domains making up several percent of all page loads on the web use Web Components. This session will look at where Web Components can help you, like with interoperability, reuse and design systems. Learn how Salesforce uses Lightning Web Components to power their ecosystem of 5 million developers.
    LitElement → goo.gle/2MTQJvb
    Salesforce Lightning Components → goo.gle/2MQDb3l
    Open Web Component resources → goo.gle/2ZqBhIm
  • НаукаНаука

Комментарии • 47

  • @Benimation
    @Benimation 5 лет назад +20

    If you just want to know what web components ARE, skip to 11:38

  • @arodic
    @arodic 5 лет назад +29

    I notice there is still a lot of confusion about what "web components" actually means. Is it a synonym for "custom elements" or a set of APIs? A lot of people use "web components" and "custom elements" interchangeably. Some even say "custom components". This video is no exception.

    • @javiasilis
      @javiasilis 5 лет назад +2

      Custom Elements is the name of the spec. Web Components it he colloquial way to refer to it. (please correct me) www.caniuse.com/#feat=custom-elementsv1

    • @robfentress1421
      @robfentress1421 4 года назад

      @@javiasilis Actually, technically, I believe Custom Elements is only one part of the technology stack that makes up Web Components, although in common parlance the terms are used interchangeably in sloppy ways. The other technologies that make up Web Components are Shadow DOM, HTML Templates, and HTML Imports. I think the last two have kinda been replaced by the use of JavaScript template literals which allows for the importing of components using JavaScript instead. I found this resource to be helpful in understanding the complexities: medium.embengineering.com/web-components-vs-react-9a7be63e365c

  • @dougrudolph5400
    @dougrudolph5400 Год назад

    every time I see a chrome video that mentions native web-components/custom-elements I always leave a comment saying I've been using lit-element for years now and it's literally one of the best tools I use. the biggest upside is page performance and ease of development
    lit comes removes **all** of the run-time cost that you'd get with frameworks like react, lit's organization model and render model is nearly identical to react (but again, without the runtime performance cost you'd get from react), it makes it a lot easier to debug when you use the inspect tool (because your component names show up in the elements view), it makes the browser profiling tools a lot easier to work with because the profiler will actually display which components and which function/methods are running (unlike react where you have manually track down which subtree of html elements is a component), and lit still works in such a way where you can still take use of what ever state/store library you prefer to use
    tl;dr its a much lighter-weight version of react without the developer pain points

  • @cintron3d
    @cintron3d 5 лет назад +32

    First kill internet explorer, then this will really take off for Enterprise software.
    I also hear that Safari is just as bad as IE at keeping up with web components.

  • @hanzofuma
    @hanzofuma 4 года назад +3

    I wanted to learn Web components and Polymer but damn there is a very very poor community for this only few videos are available on RUclips for web components as well as for Polymer all tutorials made on 2014.
    It's an impressive technologies to learn that's why i hope that Google take care of this and publish tutorials for it.
    And thanks google for Angular Elements Which allow the developer to create Web Components more easly and faster.

  • @fritiof1995
    @fritiof1995 5 лет назад +4

    This is absolutely brilliant

  • @aleksandrmatyka3118
    @aleksandrmatyka3118 3 года назад

    Can you please tell me how to use the decorator syntax, the property property in conjunction with the redax?
    I want use @property({type: Array}) stages instead of
    static get properties() {
    return {
    stages: {type: Array}
    }
    but this property defined in _stateChanged(state) {
    this. = state.reducer.stages
    }
    so it posible?

  • @jazzy39217
    @jazzy39217 5 лет назад +2

    LitElement is product of the polymer team...... they were ahead of the game.....

    • @danko95bgd
      @danko95bgd 5 лет назад +1

      Apparently everyone in the world is ahead of every standard in javascript.
      Including web components with their shit api, thats why everyone is creating some wrappers around them..

  • @matarrjobe4577
    @matarrjobe4577 5 лет назад +4

    Thank God for web components.

  • @bwfrieds
    @bwfrieds 5 лет назад

    Will Flutter-web (hummingbird) output web components?

  • @LiiittleBigPlanet
    @LiiittleBigPlanet 5 лет назад

    Read Blog post about LitElement and webcomponents. After this I saw Google photos is an pwa now. Does someone know what Framework/Library Google use?

    • @matthewburson2908
      @matthewburson2908 5 лет назад +1

      It's probably in here somewhere: github.com/google

  • @joebazooks
    @joebazooks 5 лет назад +15

    Still don't understand what web components are. Started off strong, then all downhill from the Salesforce example

    • @bwfrieds
      @bwfrieds 5 лет назад +1

      It's just an open standard component model understood by all modern browsers. It's nice for devs wanting to avoid proprietary APIs and vendor lock in. It's not for everyone.

    • @debiprasadpanda619
      @debiprasadpanda619 4 года назад +1

      Needed a better approach, instead of the Salesforce example.

    • @andreaswarberg3996
      @andreaswarberg3996 3 года назад +1

      Having recently developed Salesforce Lightning Web Components, I can assure you they are just a bad example. It is a fully proprietary implementation, and you most definitely cannot use these "web components" outside of the Salesforce platform.

  • @muhamadivan3956
    @muhamadivan3956 5 лет назад +1

    neat!

  • @DarrenbyDesign
    @DarrenbyDesign Год назад

    This is the future

  • @StingSting844
    @StingSting844 5 лет назад +4

    Huge success huge success. Sorry, but where??

    • @hanzofuma
      @hanzofuma 4 года назад

      Yup i wanted to learn it and i barely got a useful tutorial series with 5 videos with 5 min length and the most watched video has 2k views as i remember.

  • @wintercounter2
    @wintercounter2 5 лет назад +3

    Unfortunatelly as complexity grows the less attractive Webcomponents are. Using it with multiple nested slots is making performance a joke.

  • @mjarc1
    @mjarc1 4 года назад

    How do we create a CSS Framework on Web Components? And I mean CSS only, no components suggestion please

    • @hanzofuma
      @hanzofuma 4 года назад +1

      If you will use Shadow DOM you will suffer with a CSS framework but if you use normal HTML on the components it will be as simple as styling a normal HTML element.

    • @mjarc1
      @mjarc1 4 года назад +1

      @@hanzofuma But I need shadow DOM to protect my components from stupid CSS developers

    • @hanzofuma
      @hanzofuma 4 года назад +1

      @@mjarc1 Yup i share with you the same idea.

  • @DrRobrez
    @DrRobrez 5 лет назад +1

    Preach 🙌

  • @babakfp
    @babakfp 3 года назад

    bull sheet * random()

  • @Loppy2345
    @Loppy2345 5 лет назад +3

    Why would I use React + a web component when I can just use a React component?

    • @gabrielmayta2297
      @gabrielmayta2297 5 лет назад +4

      Why I have to use React when I can use Web Components?

    • @MrTurbo_
      @MrTurbo_ 5 лет назад +8

      because you could reuse the web component outside of react

    • @reyronald
      @reyronald 5 лет назад +8

      A web component doesn't need any added runtime because it runs on APIs that are shipped in the browser. React components on the other hand, require react and react-dom to be loaded, that represents a couple hundred additional KBs that a user will have to download for the website to become responsive.
      If you are already using React, won't migrate away from it, and you won't share the web components with other sites, then there's no immediate benefit.

    • @DrRobrez
      @DrRobrez 5 лет назад +2

      If you don't care about others outside of your react using the component that is fine.
      It should be stated that LitElement outperforms everything (space and time) and makes components that work in any framework... Or even (gasp) a vanilla js app

    • @deps..
      @deps.. 5 лет назад

      Are you really watch the video??