Last week I had the pleasure to take part in the first HTML5-IL meetup. If you are a front-end developer that live in Israel you should try and come to this group events. Lots of great developers, designers and others that share the same passion for the web. Great stuff. Unfortunately I didn’t have more then 30min for this new, hot, complicated topic. So I hope to have more time to cover some of the aspects during the next meetup. From the four main aspects we touched only on the first two: Continue reading
Tag Archives: custom elements
Web Components On Google Developers Live Israel (Part 1)
Today, in our weekly Google Developers Live Israel show we spoke about HTML5 and web component. It was a macro level overview on this new edge of front-end development. This new project is composed of a group of technologies that should help us (web developers) create moderan web apps using HTML, CSS and JS. They do this by allowing toolkit makers to encapsulate their widgets and UI elements as easily reusable components.
We covered the main players:
- Templates – We can think on it as a new HTML element. It allow us to inert chunks of clonable DOM that can be activated for later use (e.g MDV). You can think of it as objects you creating out of your class definition. This new ‘object’ can contain markup (=CSS) and script (=JS) so it’s much more powerful from the ‘just’ CSS that we have today. We can use it as a decorator to give new style and functionality to our custom (new) HTML element.
- Custom elements – which can be looked as our toolbelt when we are coming to build a new web app and we wish to reuse ‘wheels’ and not reinvent them. We showed how to create new HTML elements by expanding HTML’s existing vocabulary.
- Shadow DOM – It’s like the regular DOM you know (and love) but it’s down in the ‘shadows’ hidden from our eyes. It’s main goal is to give us encapsulations. It’s the glue that let us insert and work with our components. Think of a ‘tab’ component that you don’t need to ‘know’ about it’s style, functionality etc’. It will work for you and you can’t break it from your JS code because you forgot to use a namespace for your app logic.
- Mutation Observers – and how to watch for changes in the DOM in the most efficient way. Continue reading
