Why was material design lite(MDL) deprecated with MDC?

前端 未结 2 1647
心在旅途
心在旅途 2021-02-20 00:38

which of the 3 high-level goals did MDL fail:

  • Production-ready components consumable in an a-la-carte fashion
  • Best-in-class performance and adherence to t
相关标签:
2条回答
  • 2021-02-20 01:10

    MDL only failed at being easily consumable in an a-la-carte fashion.

    It is a bit harsh to say it failed at seamless integration with other JS frameworks and libraries although there were multiple issues.

    Material Components for the web (MDC-Web) will hopefully be easy to migrate to. Time will tell.

    0 讨论(0)
  • 2021-02-20 01:24

    One of the core team members for MDC Web here. We have a migration guide if you're curious about switching from MDL to MDC Web.

    One thing we accomplished by moving to MDC Web was a new architecture for JavaScript components. MDC Web is built in a way that is completely framework agnostic, so the same code base can be used in idiomatic JS, React, Angular etc... We also publish the components in a way where they can be installed in an ala carte fashion, though if you want to grab everything it is 164K.

    Essentially we accomplish this by splitting up concerns into two concepts: Components and Foundations. A Component is a ready-to-use JavaScript component, while a Foundation contains all of the shared UI code. The Foundation is useful for low-level usage by frameworks like React/Angular/Vue etc..., and more complex rendering logic.

    The last piece of the puzzle is the concept of an Adapter. In MDC Web, an Adapter is a configuration object that gets passed to the Foundation. This will include any logic surrounding data-binding, templating, key/input handling, etc... What this all boils down to is a logical set of defaults which can be overridden if you're using a framework like React or SSR where those things diverge from how they are done in vanilla javascript in the browser.

    Finally, we have a public Discord server if anyone is interested in chatting with us. We are happy to answer any implementation questions or work through any issues.

    0 讨论(0)
提交回复
热议问题