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

🐍 New Python tutorials on Real Python

Saturday, April 27, 2024

Hey there, There's always something going on over at realpython.com as far as Python tutorials go. Here's what you may have missed this past week: Write Unit Tests for Your Python Code With

Bogus npm Packages Used to Trick Software Developers into Installing Malware

Saturday, April 27, 2024

THN Daily Updates Newsletter cover Webinar -- Uncovering Contemporary DDoS Attack Tactics -- and How to Fight Back Stop DDoS Attacks Before They Stop Your Business... and Make You Headline News.

This Smart Scale for iPhone Is the Best on the Market

Saturday, April 27, 2024

The ultimate checkup, with electrocardiogram.¹ Learn about your body at every weigh-in: pinpoint muscle and fat mass, monitor your cardiovascular health and detect a cardiac anomaly. Body Scan, the

How are you liking the Tip of the Day?

Saturday, April 27, 2024

Dear iPhone Life Reader, Now that you've been enjoying Tip of the Day for a few weeks, we have a quick favor to ask: If you've found the daily emails helpful, please share this link with a

📧 Request Response Messaging Pattern With MassTransit

Saturday, April 27, 2024

​ Request Response Messaging Pattern With MassTransit Read on: m​y website / Read time: 5 minutes BROUGHT TO YOU BY ​ Get ready for POST/CON 24! ​ Join us in San Francisco from April 30 - May 1 for

Tesla Autopilot investigation closed

Friday, April 26, 2024

Inside the IBM-HashiCorp deal and Thoma Bravo takes another company private View this email online in your browser By Christine Hall Friday, April 26, 2024 Good afternoon, and welcome to TechCrunch PM.

Microsoft's and Google's bet on AI is paying off - Weekly News Roundup - Issue #464

Friday, April 26, 2024

Plus: AI-controlled F-16 has been dogfighting with humans; Grok-1.5 Vision; BionicBee; Microsoft's AI generates realistic deepfakes from a single photo; and more! ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏

🤓 The Meta Quest Might Be the VR Steam Deck Soon — Games to Play After Finishing Wordle

Friday, April 26, 2024

Also: Why a Cheap Soundbar Is Better Than Nothing, and More! How-To Geek Logo April 26, 2024 Did You Know TMI: Rhinotillexomania is the medical term for obsessive nose picking. 🖥️ Get Those Updates

JSK Daily for Apr 26, 2024

Friday, April 26, 2024

JSK Daily for Apr 26, 2024 View this email in your browser A community curated daily e-mail of JavaScript news A Solid primer on Signals with Ryan Carniato (JS Party #320) Ryan Carniato joins Amal

So are we banning TikTok or what?

Friday, April 26, 2024

Also: Can an influencer really tank an $800M company? View this email online in your browser By Haje Jan Kamps Friday, April 26, 2024 Image Credits: Jonathan Raa/NurPhoto / Getty Images Welcome to