Forum Discussion

erikm's avatar
erikm
Guide
10 years ago

Polymer web components

Hi everyone,

 

I'd like to start designing my Lithium community with a responsive approach, developing for desktop and mobile simultaneously. I've used Polymer components in the past with good success and was wondering if anyone else has considered this for their Lithium instance. 

 

Does Lithium support Polymer-esque component libraries?

 

For context: https://www.polymer-project.org

 

Thanks

/Erik

  • Hey Erik, we definitely support Polymer in the way we support any library -- you have a lot of customization flexibility with the platform to use almost any JS and markup that you like. But as to whether we specifically have any hooks for Polymer -- we don't at this time. We provide our out-of-the-box functionality through our own component system.

     

    Polymer is all about Web Components, a set of recent/upcoming specs that are supposed (intended?) to change the way the Web will be built — designers can put together complex things from parts without knowing the fine technical details. In theory, the future will be made of "component stores" where you can grab modular UI functionality made by other people and easily incorporate that functionality into whatever you're building. (Sounds a little bit like Studio!)

     

    It always seemed to me that Polymer's main goal was to bootstrap the Web Components spec -- to get people excited about the new concepts and capabilities before the spec was fully mature and before browsers had decided to implement everything. I've heard Rob Dodson call it an "opinionated polyfill" on a couple of occasions. But when you're just building your own stuff on the Lithium platform, a lot of the modularity and composition features of Web Components don't really apply as well. Custom elements, templates, HTML imports -- the utility of these things is mostly in helping you share your UI with others so that they can use it more easily. Freemarker components actually serve the same purpose, and they can be more performant because the server gets to do what it's good at (building most of the page). Then the browser has less to prepare once it downloads the page, which could result in a better experience for your users.

     

    I did notice that Polymer is being suggested for implementing Material Design. It seems they have a lot of ready-to-use custom elements. That seems like something that would be interesting to play with, although I don't think there's anything specific in that library that would be required to do Material Design. Try it out and let us know how it goes!

  • AndrewF's avatar
    AndrewF
    Khoros Oracle

    Hey Erik, we definitely support Polymer in the way we support any library -- you have a lot of customization flexibility with the platform to use almost any JS and markup that you like. But as to whether we specifically have any hooks for Polymer -- we don't at this time. We provide our out-of-the-box functionality through our own component system.

     

    Polymer is all about Web Components, a set of recent/upcoming specs that are supposed (intended?) to change the way the Web will be built — designers can put together complex things from parts without knowing the fine technical details. In theory, the future will be made of "component stores" where you can grab modular UI functionality made by other people and easily incorporate that functionality into whatever you're building. (Sounds a little bit like Studio!)

     

    It always seemed to me that Polymer's main goal was to bootstrap the Web Components spec -- to get people excited about the new concepts and capabilities before the spec was fully mature and before browsers had decided to implement everything. I've heard Rob Dodson call it an "opinionated polyfill" on a couple of occasions. But when you're just building your own stuff on the Lithium platform, a lot of the modularity and composition features of Web Components don't really apply as well. Custom elements, templates, HTML imports -- the utility of these things is mostly in helping you share your UI with others so that they can use it more easily. Freemarker components actually serve the same purpose, and they can be more performant because the server gets to do what it's good at (building most of the page). Then the browser has less to prepare once it downloads the page, which could result in a better experience for your users.

     

    I did notice that Polymer is being suggested for implementing Material Design. It seems they have a lot of ready-to-use custom elements. That seems like something that would be interesting to play with, although I don't think there's anything specific in that library that would be required to do Material Design. Try it out and let us know how it goes!

    • erikm's avatar
      erikm
      Guide

      Thanks, Andrew! I'll keep you updated if I decide to go this route

  • Hey

    How u doing? Some disclosure!! I don't have a clue what the answer is to your question but I would say "hang fire"

    So as you may know what's out there today "out the box" isn't responsive and a number of people are doing some great work making the platform responsive cblown has done some cool stuff and may be able to help.

    That said a responsive framework is coming. Which I believe will make life easier, I don't know when it's coming but I'm also on the cusp of a redesign and I'm hanging back to make sure I do this the once rather than having to reinvent the wheel when lithium are doing some of the hard work for us :)

    Sorry I couldn't answer your question directly !!
    • erikm's avatar
      erikm
      Guide

      Thanks, Stephen! I just reached out to Lithium to hear more about their work on a responsive framework. It's great to hear they might be prioritizing responsive design. Really appreciate the tip

       

      For anyone who may know, I'm still curious to hear about Polymer support. Polymer's library of web components makes it pretty easy to incorporate material design, which brings interactive elements to life without significant CSS/JS magic.