问题
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 the Material Design guidelines
- Seamless integration with other JS frameworks and libraries
Or were there some other reasons behind deprecating MDL?
回答1:
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.
回答2:
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.
来源:https://stackoverflow.com/questions/41769959/why-was-material-design-litemdl-deprecated-with-mdc