Concepts

125 bookmarks
Custom sorting
HTTP/3 From A To Z: Core Concepts — Smashing Magazine
HTTP/3 From A To Z: Core Concepts — Smashing Magazine
What exactly is HTTP/3? Why was it needed so soon after HTTP/2 (which was only finalized in 2015)? How can or should you use it? And especially, how does this improve web performance? Let’s find out.
·smashingmagazine.com·
HTTP/3 From A To Z: Core Concepts — Smashing Magazine
A Web Component Intro with Example
A Web Component Intro with Example
I will demonstrate writing a web component by implementing tabbed panels. The finished tabs will look like below. You can find the source code in this repository. Web Component is a standard built into the browser. At the time of writing every major browser supports this feature. It is an underrated feature and often shadowed by popular SPA frameworks like React and Angular. I say this feature is underrated because WC (Web Component) predates React and it does not require importing any external libraries. Enough of history lets see how to write a component. A WC needs two steps. A class that extends HTMLElement. Registering the component as a custom element. <!DOCTYPE html> <html> <head> <script> class WCTab extends HTMLElement { } //Step 1 customElements.define("wc-tab", WCTab) //Step 2 </script> </head> </html> That's it. A Web Component is ready to use. In registering the WC, the name must always contain a hyphen that is the reason it is wc-tab instead of wctab. This name is what needed to use this WC. We can use it just be creating a tag with same name as below. <body> <wc-tab></wc-tab> </body> Opening the html in browser doesn't show anything. It is not any better than an empty div at this point. Lets write something in between the opening and close tag. <wc-tab> <p>Hello world!</p> </wc-tab> This actually prints Hello world! in the browser! Shadow Root You almost always should enable shadow root in your WC. Shadow root provides scoped DOM tree with the web component as its root element. This enables us to import css styles without polluting the global scope. That means we can use css stylesheets and those styles will apply only within this custom element. Any tag with matching css selectors outside the custom component are unaffected. This can be enabled in our constructor as below. class WCTab extends HTMLElement { constructor() { super(); this.shadow = this.attachShadow({ mode: "open" }); } } As soon as this change is made, the hello world printed in the browser has disappeared. When shadow DOM is attached, it replaces our existing children. WC has few lifecycle callbacks, one of them is connectedCallback. It is called as soon as the WC is attached to dom. Lets add it! class WCTab extends HTMLElement { constructor() { super(); this.shadow = this.attachShadow({ mode: "open" }); } connectedCallback(){ console.log("connected!"); } } This prints connected! in console when the page is refreshed. Tab - Example Lets define how our tab component is going to be designed. Our WC will have each tab as div. The WC should define tab and its content as shown below. <wc-tab> <div name="Tab 1">Tab 1 content</div> <div name="Tab 2">Tab 2 content</div> <div name="Tab 3">Tab 3 content</div> </wc-tab> We are going to read the provided children as input and generate a UI to show them as tabs. it is possible to make each tab as its own custom element instead of div tag. We will stick with div for this example. Let's see how to access the children in our component. We are going to do this in our lifecycle method connectedCallback connectedCallback(){ let tabs = this.querySelectorAll("div"); console.log(tabs); } This is how we read the children. Unfortunately this does not work. connectedCallback is called before the children are attached to DOM. There is no simple way to read them as soon as they are attached. We go with MutationObserver. This observes changes for children and calls the given callback. connectedCallback() { let thisNode = this; let observer = new MutationObserver(function () { let tabs = thisNode.querySelectorAll("div"); console.log(tabs); }); // We are only interested in the children of // this component observer.observe(this, { childList: true }); }
·blog.rasvi.io·
A Web Component Intro with Example
An Introduction to Computer Networks
An Introduction to Computer Networks
A free and open textbook covering computer networks and networking principles, focused primarily on TCP/IP
·intronetworks.cs.luc.edu·
An Introduction to Computer Networks
Email explained from first principles
Email explained from first principles
Modern email is a patchwork of protocols and extensions. Here is one article to understand them all.
·explained-from-first-principles.com·
Email explained from first principles
Métavers l'infini et au-delà | USERADGENTS
Métavers l'infini et au-delà | USERADGENTS
Alors que la vague métavers engloutit le monde, difficile de ne pas boire la tasse… Cette étude entend aider les marques à voir le métavers à moitié plein et à identifier leurs opportunités sur le sujet.
·useradgents.com·
Métavers l'infini et au-delà | USERADGENTS
Measuring Software Complexity: What Metrics to Use?
Measuring Software Complexity: What Metrics to Use?
Do we need to measure complexity? With what metrics? What benefits can it brings? This is the questions we'll answer in this article.
·thevaluable.dev·
Measuring Software Complexity: What Metrics to Use?
Learning Containers From The Bottom Up
Learning Containers From The Bottom Up
What is a Container? Container vs. VM? Docker vs. Kubernetes. How to organize the learning efficiently?
·iximiuz.com·
Learning Containers From The Bottom Up
Le mystère Satoshi : enquête sur l'inventeur du bitcoin | ARTE
Le mystère Satoshi : enquête sur l'inventeur du bitcoin | ARTE
À l’ère d’Internet, un groupe d’informaticiens, les Cypherpunks, cherche à coder une monnaie électronique anonyme et autonome, libre, directe, sans intermédi...
·youtube.com·
Le mystère Satoshi : enquête sur l'inventeur du bitcoin | ARTE
HTTP caching - HTTP | MDN
HTTP caching - HTTP | MDN
The performance of web sites and applications can be significantly improved by reusing previously fetched resources. Web caches reduce latency and network traffic and thus lessen the time needed to display resource representations. HTTP caching makes Web sites more responsive.
·developer.mozilla.org·
HTTP caching - HTTP | MDN
Solid - A Better Web (Simply Explained)
Solid - A Better Web (Simply Explained)
We have no privacy on the web anymore. Our data is stored with many third-parties, some even sell it behind our backs. Solid aims to put all our data in a si...
·youtube.com·
Solid - A Better Web (Simply Explained)
Searching the green web with Searx - The Green Web Foundation
Searching the green web with Searx - The Green Web Foundation
We all search the web. And as we become more aware about our climate changing, we want to use greener products and services too. But how can you find them? We recently finished a project with the open source privacy protecting search engine Searx, to turn it into a green open source privacy protecting search… Read More »Searching the green web with Searx
·thegreenwebfoundation.org·
Searching the green web with Searx - The Green Web Foundation
Functorio
Functorio
You might have heard people say that functional programming is more academic, and real engineering is done in imperative style. I’m going to show you that real engineering is functional, and …
·bartoszmilewski.com·
Functorio
IDEA - nonverbal algorithm assembly instructions
IDEA - nonverbal algorithm assembly instructions
IDEA is a series of nonverbal algorithm assembly instructions, created by Sándor P. Fekete and Sebastian Morr.
·idea-instructions.com·
IDEA - nonverbal algorithm assembly instructions
Webhooks – A Conceptual Deep Dive | Ably Realtime
Webhooks – A Conceptual Deep Dive | Ably Realtime
Webhooks enable effective realtime messaging by sending callback data back to application providers when events occur at the service provider’s end.
·ably.com·
Webhooks – A Conceptual Deep Dive | Ably Realtime
Des expériences pour mieux appréhender la croissance exponentielle
Des expériences pour mieux appréhender la croissance exponentielle
Albert Bartlett (1923-2013), professeur de physique à l’Université du Colorado, et qui a donné à partir des années 70 plus de 17209 conférences sur le thème: « arithmétique, population et énergie », ne cessait de répéter:
·pixees.fr·
Des expériences pour mieux appréhender la croissance exponentielle
Lazy loading - Web Performance | MDN
Lazy loading - Web Performance | MDN
Lazy loading is a strategy to identify resources as non-blocking (non-critical) and load these only when needed. It's a way to shorten the length of the critical rendering path, which translates into reduced page load times.
·developer.mozilla.org·
Lazy loading - Web Performance | MDN
Jamstack Explorers — Free Jamstack Courses
Jamstack Explorers — Free Jamstack Courses
Take free Jamstack courses and complete missions about React, Vue, Angular, Next.js and more! See your progress and earn rewards as you go. Get started today!
·explorers.netlify.com·
Jamstack Explorers — Free Jamstack Courses
The story behind Markdown.
The story behind Markdown.
How the most popular plain text formatting syntax came to life, inspired by emails and the work behind other plain text syntaxes.
·capiche.com·
The story behind Markdown.
A General Introduction to Cloud Computing | DigitalOcean
A General Introduction to Cloud Computing | DigitalOcean
This conceptual article provides an introduction to the history, features, benefits, and risks of cloud computing. It is part of the Cloud Computing curriculum, which includes beginner-friendly, hands-on tutorials for setting up and securing servers,
·digitalocean.com·
A General Introduction to Cloud Computing | DigitalOcean
Overview
Overview
A collection of resources and posts to help people understand compression algorithms.
·go-compression.github.io·
Overview
Content delivery networks (CDNs)
Content delivery networks (CDNs)
This article provides a comprehensive overview of content delivery networks (CDNs). In addition, it explains how to choose, configure, and optimize a CDN setup.
·web.dev·
Content delivery networks (CDNs)