Web Tools #391 - JS Libraries, JSON/DB, Uncategorizables

Web Tools Weekly
WEB VERSION
Tools for Web Developers

Issue #391 • January 14, 2021

Advertisement
Preflect Surveys
Websites of all types use Preflect to create fast on-site surveys. Learn more about your visitors, optimize for conversion, and create better user experiences with Preflect. Install now for free!
Try Now for Free
Preflect

One of the things that developers loved about jQuery was its use of the $(document).ready() method.

This useful method allows you to run any JavaScript code and safely interact with any DOM element without worrying that the element doesn't exist. If you want to do this with vanilla JavaScript, you have a couple of options:

  • Listen for the DOMContentLoaded event on the window or document
  • Listen for the load event on the window
The DOMContentLoaded event fires as soon as the DOM is ready to be interacted with. So this is almost the equivalent of jQuery's $(document).ready().

The load event, on the other hand, fires when the page and all of its resources are finished loading. So this one could be useful in some circumstances, but more than likely the one you want is DOMContentLoaded.

For example, if you want to get the exact dimensions of an element on the page and the content hasn't finished loading, you won't get an accurate measurement. So the load event would be useful in that case.

I mentioned that DOMContentLoaded isn't exactly the same as jQuery's method. The jQuery docs explain the difference:

"jQuery's .ready() method differs in an important and useful way: If the DOM becomes ready and the browser fires DOMContentLoaded before the code calls .ready( handler ), the function handler will still be executed. In contrast, a DOMContentLoaded event listener added after the event fires is never executed."
Regarding this problem, MDN suggests the following:

"DOMContentLoaded may fire before your script has a chance to run, so it is wise to check before adding a listener."

Then they provide the following suggestion for your code:
 
if (d.readyState === 'loading') {
  d
.addEventListener('DOMContentLoaded', doSomething);
} else {
  doSomething();
}

In this instance "d" is a variable that represents the document.

Notice that first the script uses the readyState property to check if the DOM is still loading. The 'loading' state is the one that occurs right before the 'interactive' state in the loading process. So the DOM is not yet loaded. Thus I can safely attach the event.

If the 'loading' state has already passed, the else branch goes directly to the stuff to load after the DOM is ready.

As you can see, as long as you understand exactly what the vanilla JavaScript events accomplish, then you shouldn't need to use jQuery at all, assuming you're not worried about browser bugs and inconsistencies, of course.
 

Now on to this week's tools!

JavaScript Libraries and Frameworks

Preflect Surveys
Websites of all types use Preflect to create fast on-site surveys. Learn more about your visitors, optimize for conversion, and create better user experiences with Preflect. Install now for free! sponsored 

Inertia.js
Lets you quickly build modern single-page React, Vue and Svelte apps using classic server-side routing and controllers.

Dojo3D
A JavaScript library for simple 3D interactive storytelling, aimed at all ages of coders and no software installation required.

Moddable
JavaScript for IoT. Tools to create open IoT products using standard JavaScript on low cost microcontrollers.

Replay
A cross-platform JavaScript game engine inspired by React. Declarative API, open source, with built-in tooling and testing.

Replay

Merkur
A tiny extensible JavaScript library for front-end microservices that's flexible, extensible, and SSR-ready.

Aleph.js
A React Framework in Deno, inspired by Next.js. TypeScript in Deno, ES module imports, file-system routing, SSR & SSG, and more. No config needed.

24a2
An ultra-minimalist game engine that lets you to build a game in a few hours. Has a very limited set of features, which makes it easy to learn and encourages you to solve problems creatively.

Danfo.js
An open-source JavaScript library providing high-performance, intuitive, and easy-to-use data structures for manipulating and processing structured data.

Presenta Lib
A JavaScript library to build expressive web presentations in seconds.

BotUI
An older project that I've never included here. A JavaScript framework to build conversational UIs. Try it out on the page to see what it does.

Flux
Facebook's application architecture for building UIs is now at version 4+, the last major release, and will be in maintenance mode going forward.

Workbox
Now at version 6+. A collection of JavaScript libraries for Progressive Web Apps.

JSON, Databases, etc.

Beacon
Run SQL commands directly in Slack, then share them with your team.

BToolKit
A minimalist Mac app that lets you quickly do base64 encoding/decoding and URL encoding/decoding.

Hotwire
An alternative approach to building modern web applications without using much JavaScript, by sending HTML instead of JSON over the wire.
 
Hotwire

JSON Editor Online
A web-based tool to view, edit, and format JSON. It shows your data side by side in a clear, editable tree view or a code editor. You can store documents locally or in the cloud.

jose
Universal "JSON Web Almost Everything" - JWA, JWS, JWE, JWT, JWK with no dependencies using native crypto runtimes.

WDR
Web Data Render, a method to render web pages using JSON as the data rather than HTML. View the source of the page to see how it's constructed.

LavaStore
A flexible and scalable local database for the web with a simple and readable API and TypeScript support.

JSON Formatter Live
An installable PWA that's a quick way to format/minify JSON without needing to open another tab.

Momoa JSON
A general purpose JSON utility toolkit that includes a JSON parser, tokenizer, traverser, and printer.

Graffiti
A minimalistic GraphQL framework. The file-system is the main API and every .js file becomes a schema definition that gets processed and converted to GraphQL.

The Uncategorizables

Canonic
A low code platform to craft APIs in minutes. Allows you to publish complex REST and GraphQL APIs complete with webhook workflows, documentation, and a CMS.

ProWebScraper
A fast and powerful web scraping tool that lets you build a web scraper in thre easy steps.

Polls API
A simple and powerful API to add polls to your website or application.
 
Polls API

Overlay
Transform your Figma or Sketch design components into clean React, Vue, and HTML components.

geoapi
Lightweight API service to get geolocation data from IP addresses.

Devbook
Mac or Linux app. A new kind of search engine made just for developers. A single input that allows you to search Stack Overflow, documentation, code, third-party tools, etc.

arokite
Preview your business cards in a 3D scene you can save and export as a JPG or transparent PNG. Upload the front and/or back images, and includes 4 templates.

qr.new
An online QR code builder with options for link, text, images, and more.

pdfmatrix
HTML to PDF conversion  to create high quality PDFs from URLs and HTML.

Cloudcraft
Create a professional architecture diagram in minutes a visual designer, optimized for AWS with smart components.

Replicache
Build blazingly fast offline-first apps with any back end.

A Tweet for Thought

Is Japanese customer service really this good? Can someone show this to Google, where talking to a real human is against the law?

A Tweet for Thought
 

Send Me Your Tools!

Made something? Send links via Direct Message on Twitter @WebToolsWeekly (details here). No tutorials or articles, please. If you have any suggestions for improvement or corrections, feel free to reply to this email.
 

Before I Go...

Here's a neat little Railroad switches game (harder than it looks!) built in JavaScript and based on a 1984 Commodore 64 game called "Donald Duck's Playground". The page also explains how it was built.

Thanks to everyone for subscribing and reading!

Keep tooling,
Louis
@WebToolsWeekly

Support This Newsletter:  PayPal.me  Patreon  GitHub Sponsors

Older messages

Web Tools #390 - Frontend Frameworks, Testing Tools, Media

Thursday, January 7, 2021

Web Tools Weekly WEB VERSION Issue #390 • January 7, 2021 Promotion Frontendor UI Library A UI library to build beautiful and professional landing pages. Includes 100+ UI Blocks & 6+ Templates. Add

Web Tools #389 - Top 30 Tools of 2020

Thursday, December 31, 2020

Web Tools Weekly WEB VERSION Issue #389 • December 31, 2020 As mentioned last week, this issue is the second part in the countdown of most clicked tools. This week features the 30 most-clicked tools in

Web Tools #388 - Top Tools of 2020 (Pt. 1)

Thursday, December 24, 2020

Web Tools Weekly WEB VERSION Issue #388 • December 24, 2020 This week and next week are down weeks work-wise for many of you, so these two issues will feature this newsletter's 60 most clicked

Web Tools #387 - ES6 Generators, React Tools, Git/CLI, Uncats

Thursday, December 17, 2020

Web Tools Weekly WEB VERSION Issue #387 • December 17, 2020 Advertisement Cubbit Personal Cloud Sync store and share your files with Cubbit Cloud. Enjoy the highest security standards and stop paying

Web Tools #386 - Frontend Frameworks, SVG, Build Tools

Thursday, December 10, 2020

Web Tools Weekly WEB VERSION Issue #386 • December 10, 2020 The following intro is a paid product review for Preflect, a microsurvey and navigation tool that helps visitors stay engaged on your website

You Might Also Like

WP Weekly 226 - Launches - New Elementor Theme, WP 6.8 in April 2025, Automattic Scale Back

Monday, January 13, 2025

Read on Website WP Weekly 226 / Launches 2025 has just started, and there is a slew of new launches like Hello Biz Theme, Meta Box Lite, FooConvert, Affililink, and more. Also, the next WordPress 6.8

SRE Weekly Issue #459

Monday, January 13, 2025

View on sreweekly.com A message from our sponsor, incident.io: Effective incident management demands coordination and collaboration to minimize disruptions. This guide by incident.io covers the full

Saving One Screen At A Time 🖥️

Monday, January 13, 2025

Why the screen saver stopped being so in-your-face. Here's a version for your browser. Hunting for the end of the long tail • January 12, 2025 Today in Tedium: Having seen a lot of pipes, wavy

Software Testing Weekly - Issue 253

Monday, January 13, 2025

Software Testing Weekly turns 5! 🥳 View on the Web Archives ISSUE 253 January 13th 2025 COMMENT Welcome to the 253rd issue! Oh my, time flies! It's hard to believe this week marks 5 years since I

CES 2025 - Sync #501

Sunday, January 12, 2025

Plus: Sam Altman reflects on the last two years; Anthropic reportedly in talks to raise $2B at $60B valuation; e-tattoo decodes brainwaves; anthrobots; top 25 biotech companies for 2025; and more! ͏ ͏

PD#608 Mistakes engineers make in large established codebases

Sunday, January 12, 2025

You can't practice it beforehand ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌ ͏ ‌

C#539 A detailed look at EF Core’s JSON Columns feature

Sunday, January 12, 2025

Comparing it with the traditional tables with indexes ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

RD#488 How to avoid issues with custom Hooks

Sunday, January 12, 2025

Using them carelessly can lead to many problems ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

Daily Coding Problem: Problem #1666 [Easy]

Sunday, January 12, 2025

Daily Coding Problem Good morning! Here's your coding interview problem for today. This problem was asked by Amazon. Given n numbers, find the greatest common denominator between them. For example,

🛜 Here's What Happens to Old Websites — Features the Pixel Should Copy From Samsung's One UI 7

Sunday, January 12, 2025

Also: What Instagram Needs to Compete With TikTok, and More! How-To Geek Logo January 12, 2025 Did You Know Mount Wingen, located near Wingen, New South Wales in Australia, is better known as Burning