Make sense to start with HTML

Опубликовано: 16 Ноябрь 2023
на канале: Stephen Blum
104
2

When we're dealing with popular web frameworks like React, Angular, and Vue, we sometimes forget to ask whether we really need these frameworks for our project. It turns out that many situations make sense to start with HTML as the main tool and continue using it. So we're checking out this site called html-first.com. It presents a set of principles aimed at making web software creation easier, faster, and more inclusive, and also easier to maintain. The principle I really appreciate is speed. It's just so quick. Most folks don't even notice the heavy overhead that these web frameworks carry. This slows down your browser and uses a lot of energy and compute power. All these end users speed up their CPUs just to handle these frameworks. Let's examine these principles now, which take advantage of the default capabilities of today's web browsers. Most browsers come with super quick capabilities built-in, which we used to rely on frameworks for, but are now integrated directly into the browsers. They are very efficient and highly functional. The next one talks about the extreme simplicity of HTML's attribute syntax. When we're writing HTML, an attribute might look like onClick equals this thing here. You can also create your own attributes, your own custom attributes, and the browser looks out for ones like these. Attributes that onClick, for example, will catch the browser's attention. This is all built into the browser. Finally, there's the principle leveraging the web's view source affordance. This is an unfamiliar term, but it's a vital feature of the web that allows people to copy, tweak, customize, and enhance source code. We can view the source code of this page to understand what's happening under the hood. After clicking on 'view developer' and then 'view source', we can see that the htmlfirst.com website uses the principles it describes. There's plenty of HTML used here.