神刀安全网

Understanding Web Components

The modern web is evolving at a crazy fast pace, new technologies are coming up all the time, new devices are being released constantly. Companies and developers need to follow the pace and be able to move fast, iterate, adapt and evolve.

Frontend Development is a discipline that moves particularly fast, where new frameworks and tools emerge constantly so fast adaptation is essential for survival.

“It is not the strongest of the species that survives, nor the most intelligent that survives. It is the one that is most adaptable to change.”

Charles Darwin

Why components?

By dividing your code in small reusable chunks, you’re reducing complexity, by narrowing your focus into small bits at a time, you’re improving reusability, so that you don’t have to reinvent the wheel every time you want to reuse something, that you or someone else has already done.

So it seems like a great concept, to have a set of reusable components, that are tested and ready to use, that we can group together in order to create bigger ones, transforming them into fully functional web apps.

“Treat your code like Lego; many smaller, simpler chunks can be combined and arranged to make a huge variety of structures. With a box of assorted Lego pieces you could build a car, or an airplane, or the Eiffel Tower, or Big Ben, or anything! All by combining the same little tiny pieces in different quantities, in a different way, and in a different order.”

Nicolle Sullivan

Why Web Components?

As the complexity of web applications grows, the need for modular code has also risen, if you’ve worked in a medium to large scale application, you’ve probably already made an attempt to divide your code into components. Or if you’re using a client side javascript framework, you’ve probably already created components of some kind, Angular, React, Ember, all have components, although each one thinks about components in its own way.

As we try or change to new frameworks (and in javascript new frameworks seem to appear every week) we need to redo all of our work again, wouldn’t it be really nice, if all of our components were built, using the same native core technologies, and reusable across all frameworks. Web Components make this possible by providing us with the tools to standardize and encapsulate our component construction. It’s even possible to have, components from different frameworks, talking to each other under the same application.

转载本站任何文章请注明:转载至神刀安全网,谢谢神刀安全网 » Understanding Web Components

分享到:更多 ()

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
分享按钮