Share options

Links to related pages

Essays about connection. Essays about context. Critiques of coding practices.

Essays about code

By code we include semantic HTML, CSS, JavaScript, Typescript. Also types, components, functional programming, formatting, linting, testing, naming, etc.

Adding simple PubSub, part 2
From event delegation to true pubsub.
We turn the simple event delegation system we created in our previous essay into a true PubSub system.
Adding simple PubSub, part 1
PubSub is a great way to decouple components.
An excellent way to decouple our web page components is to use a PubSub system (effectively, an event bus). One component publishes; another subscribes.
Letʼs enhance our forms
Start with workable HTML forms, then make them better.
Once we have our HTML forms working (and validating) well without recourse to JavaScript, we can use a bit of JS to enhance their capabilities.
Native form validation is easy
You can validate your forms without JavaScript.
Your forms can validate themselves. We can create forms that work without JavaScript, then add just enough JavaScript to enhance that validation.
Progressive enhancement
Best for accessibility, usability, performance, sustainability.
First create a responsive-by-default page with semantic HTML. Then it is easy to make it moʼ better with progressive enhancement.
Responsive by default
Until we use CSS to blow it.
HTML is responsive by default. Then we add CSS and destroy that responsiveness. Often, this is because we didnʼt get the HTML right from the start. Semantic HTML is the key.
The Dao of just-in-time coding
The uncarved block … of code.
A wise young coder once said, “never write a line of code until you have to”. At Craft Code, we took that advice to heart. Now we write code just in time.

Links to related pages

Essays about connection. Essays about context. Critiques of coding practices.

Get notified form

Get notified of site updates
Button bar

Carbon emissions for this page

Cleaner than 99% of pages tested
0.014g on first visit; then on return visits 0.007g
QR Code

Scan this code to open this page on another device.