Taking JavaScript into Python

#​650 — August 3, 2023

Read on the Web

JavaScript Weekly

A Tale of Evading JavaScript Anti-Debugging Techniques — When you’re poking arounddebugging code written and distributed by a third party, there might be some sneaky traps thrown in your path to prevent your usual techniques from working. What next? Disable breakpoints in DevTools? Use a proxy? What about.. recompiling your entire browser? 😆

Veritas

This reminds me of the guy who scraped pages by dumping heap snapshots from the browser – another fun post if you enjoy low level spelunking.

VanJS 1.0: A 1KB Reactive UI Framework Without React/JSX — VanJS is particularly light and elegant, and its author has put some serious effort into documenting it and offering tools to convert your HTML to its custom format. This week’s v1.0 release is a relatively big step forward for what is still a young project. GitHub repo.

Tao Xin

Add Excel-Like Spreadsheet Features to Your JavaScript Apps: SpreadJS — SpreadJS is the industry-leading JavaScript spreadsheet for adding advanced spreadsheet features to your enterprise apps. Build finance, analysis, budget, and other apps. Excel I/O, 500+ calc functions, tables, charts, and more. View demos now.

SpreadJS from GrapeCity sponsor

PythonMonkey: JavaScript/WASM Interop for Python — The alpha release of a new way to bring Python and JavaScript together, by way of embedding Mozilla SpiderMonkey into the Python VM. This post introduces the concept with some examples, an idea of where the project is headed, as well as some Colab demos. GitHub repo.

Will Pringle

dnt: A Tool to Publish a Hybrid npm Module for ESM and CommonJS — From the Deno team comes a tool that lets you write modules in JavaScript or TypeScript and then transforms them to support CommonJS, ESM, browsers, Deno, Node, and more.

Andy Jiang (Deno)

⚡️ IN BRIEF:

🎧 The popular Syntax.fm podcast has had a run of interesting episodes lately covering topics like the idea of ▶️ server-side JavaScript standards, ▶️ Rust for JavaScript developers, and ▶️ the role of polyfills.

A social engineering campaign that targets tech employees has been spreading through npm malware, claims Feross Aboukhadijeh of Socket.

Radix UI is now available in Vue thanks to Radix Vue.

Google has unveiled some big improvements to how the Google Maps JavaScript code can be loaded.

Firefox 116’s DevTools now support Custom Object formatters. This feature, long supported by Chrome, lets sites determine how certain types of object representation are formatted in the console and debugger.

The Svelte project has posted its latest monthly update. There’s a lot going on in the Svelte world right now.

Logging and Tracing Re-invented. Stop Sampling, Get Axiom
“In the beginning there was stdout….” Get started for free, or get 1tb for $25/mo.

Axiom sponsor

🎉 RELEASES:

Backbone 1.5 – Yes. Really. And it’s still a thing of beauty.

Shoelace 2.6 – Popular suite of agnostic UI Web Components.

Prisma 5.1 – Next-gen Node.js + TypeScript ORM.

eslint-config-prettier 8.10 – Turn off ESLint rules that clash with Prettier.

📒 Articles & Tutorials

Understanding React Server Components — If you’ve struggled to get your head around the ideas involved, and Dan Abramov’s ‘let’s recreate RSCs from scratch’ went too deep, this is a good, high-level explanation of the fundamentals covering what problems RSCs solve, why you might use them, and how Next.js makes it all easier.

Alice Moore (Vercel)

Type vs Interface: Which Should You Use in 2023? — Learn the key differences between interfaces and type aliases in TypeScript, including their use cases and important features to consider.

Matt Pocock

How to Build a Multilanguage Website with Next.js & Storyblok

Storyblok sponsor

Speeding Up V8 Heap Snapshots — When diagnosing a memory leak in a JavaScript app, engineers at Bloomberg encountered some weird performance issues with capturing a single full-size heapshot taking more than 30 minutes(!) at times. Here’s the full story of how they investigated and resolved the problem.

José Dapena Paz (Igalia)

‘If Web Components Are So Great, Why Am I Not Using Them?’ — Do Web Components have a marketing problem? Dave thinks so, and shares what he thinks the issues are for this slowly-adopted technology.

Dave Rupert

▶  How to Build a Drag-and-Drop Kanban Board — A complete screencast walkthrough of using React to build a Trello-like app based around the familiar Kanban board pattern. It also serves as an introduction to the dnd-kit drag-and-drop toolkit.

Kliton Bare

An Introduction to Quicksort — A good, beginner friendly introduction to the Quicksort algorithm, concluding with a JavaScript implementation. (Beware the floating burger though..)

Kirupa Chinnathambi

Everything Mux Learnt Migrating 50K Lines of Code to React Server Components

Darius Cepulis (Mux)

▶  Refactoring an Angular App to Modern NgRxNgRx is a reactive state management approach for Angular.

Marko Stanimirovic

🛠 Code & Tools

tsup 7.2: Bundle Your TypeScript Library with No Config — Throw your .js, .json, .mjs, .ts, and .tsx files at the esbuild-powered tsup and say hello to transpiled, bundled code for distribution. More in this tutorial.

egoist

Vite React Boilerplate: A Production Ready Starter Template — A new ‘batteries included’ Vite + React app template that leans upon, well, a lot of batteries from Zustand to Zod to Storybook.

Ricardo Valdovinos

Add Authorization, MFA, Biometrics and More to Your JavaScript App in Just Minutes — It’s about time that somebody talked some sense about OAuth and JavaScript. So we did. You’re welcome.

FusionAuth sponsor

Hackathon Starter 8.0: A Boilerplate for Node Web Apps — For when you might want to start building a Node app quickly (like at a hackathon, say) including key features like auth/OAuth, Bootstrap 5, account management, email forms..

Sahat Yalkabov

OGL 1.0: A Minimal WebGL Framework — WebGL is far from the easiest technology to use on its own, so libraries like Three.js are often used to make it more accessible. OGL has a similar motive to Three.js while remaining far closer to the WebGL metal.

Nathan Gordon et al.

💻 Jobs

Senior Software Engineer (Frontend Lead) — Come lead Emerge’s web platform, used by teams like DoorDash, Square, Dropbox & Airbnb (our stack: Next.js, React, TS, Vercel).

🛸 Emerge Tools

Find JavaScript Jobs with Hired — Hired makes job hunting easy-instead of chasing recruiters, companies approach you with salary details up front. Create a free profile now.

Hired

🧑‍💻 Got a job listing to share? Here’s how.

Size Limit 8.2: JavaScript Performance Budgeting Tool — Calculate the real ‘cost’ to run your JS app or lib and maintain an eye on performance and raise the alarm (in your CI system, say) when things go awry. Supports ES modules and tree shaking.

Andrey Sitnik

Stockfish.js 16 – The famous Stockfish chess engine in JS via WASM.

Marked 6.0 – Fast Markdown parser and compiler. Now rewritten in TypeScript.

eta (η) 3.1 – Embedded JS template engine. Now with Bun support.

Tremor 3.6 – React library for building dashboards.

Octokit.js 3.1 – ‘Batteries-included’ GitHub SDK.

React Image Gallery 1.3 – Image gallery carousel component.

YouTube.js 5.8 – Library to use YouTube’s private API.

🐴 Let’s hit the Oregon Trail

The Oregon Trail was a 2000+ mile wagon route used by traders and migrants headed west in the early days of the United States. It was also a hugely popular computer game that, more often than not, ended in disaster for the virtual settlers whose lives you directed.

Particularly popular on the Apple II and early Macs, you can give the game a spin via the following project:

Macintosh.js: A Virtual Macintosh Running via Electron — An impressive virtual machine emulating a 1991 Macintosh Quadra 900 with System 8, all running in Electron. We linked to this several years ago but it’s had some updates since then and runs faster than before. As well as a few games, such as Oregon Trail, there are a variety of apps pre-installed, including a trial of Adobe Photoshop 3 which starts up faster than my real Photoshop now.. (Download necessary since it’s an Electron app and all..)

Felix Rieseberg, Apple, et al.

2023 N|Solid Awards: The Top 10 Best Node.js Open Source Projects to Watch

NodeSource has been a part of the Node.js ecosystem since 2014, contributing to the open-source project, distributing binaries (over 100m annually!), providing expert Node Services, and building tooling (N|Solid) to support developers to make the best software leveraging Node.js. Every year, we look at the open-source projects we believe are the most interesting and will impact the ecosystem. This year we decided to recognize each of these projects with an award, so welcome to the first installment of the N|Solid Awards!

As the technology has become more ubiquitous in recent years, the list of Node.js projects and technologies to keep an eye on in 2023 is growing longer. As champions of Node, we are excited to see the creativity of the developers using Node.js and the positive impact the technology has in the world.

Node.js, a JavaScript open-source runtime environment, has become one of the most popular platforms for developing applications. With the rapid rise of Node.js usage, developers are constantly pushing the boundaries of what’s possible with the platform. As a result, many open-source Node.js projects are available for everyone to tinker around with.

“JavaScript is everywhere, including in 98% of the world’s websites. Representing this enormous developer ecosystem is a humbling and awesome responsibility. The work of our maintainers matters, as they keep lavaScript safe and modern for those who depend on it.” – OpenJS Foundation

Before we get to the award winners, here. A quick list of the pros and cons of Node.js:

Pros and Cons of Node.js

The pros of Node.js include the following:

Flexibility – Node.js is designed to be used with many different types of applications;
Speed – Node.js is faster than other server-side languages;
Scalability – Node.js makes it easy to scale applications;
Great ecosystems – Node.js has a large and vibrant community of developers constantly building new libraries and tools;
Async I/O – Node.js is built on the concept of asynchronous I/O, which makes it great for handling multiple requests simultaneously.
Cost savings – Node.js can reduce hosting and maintenance costs.

The cons of Node.js include the following:

Single threading – Node.js is single-threaded, which can limit performance;
Compatibility issues – As Node.js is updated, older versions may not be compatible with newer libraries and frameworks;
Lack of debugging

Skilled professionals like experienced Node.js developers require tools to get their jobs done quickly and effectively. However, it can be challenging to make the right choice from the range of options available. Node.js is known for its strong community that offers many tools. Such additions have been instrumental in contributing to the success of modern apps. To help you narrow down your choices, here are some of the top open-source projects you should keep an eye on.

The Winners of the N|Solid Award for 2023!

Selected for the project’s importance and value and the team’s outstanding effort, here are 10 of the best open-source projects (in no particular order) worth keeping an eye on…

Fastify-vite
Mercurius
Platformatic
Next.js
Prisma
Redwood
Nuxt
Strapi
Herbs.js
PNPM

Fastify-vite

Fastify-Vite is a minimalistic web framework designed to build modern web applications quickly. It supports React and Vue at the moment, which means you can use the same familiar components, lifecycle hooks, and other patterns. With its lightning-fast performance, developers can quickly develop, test, and deploy web applications.

Note: And if you ask, Why is fastify-vite but no vite itself? Because according to our lead engineers, it “is a game-changer in SSR” (And if we wanted to present the top 10, well, we couldn’t go on, to be honest, 😅🤷‍♀️); however, we are fans of the great work done by this project, so here: Vite itself has a special mention in our list.

And if we talk about Vite, then we cannot leave the Fastify ecosystem aside.

Fastify

Fastify is an open-source web framework for Node.js that enables developers to create modern and efficient web applications quickly. It provides a great foundation to build the application logic while abstracting away much of the complexity associated with web development. Fastify has an extensive ecosystem of modules, plug-ins, and tools that can be used to improve the development process. These include web servers, logging, validation, authentication, security, routing, and more. With such a wide range of features, Fastify makes it easy to create secure, reliable, and performant web applications.

Mercurius

Mercurius is a Node. a js-based project focusing on bringing IoT to the edge. It is designed for distributed IoT devices and provides tools for connecting them to cloud services such as Amazon AWS, Microsoft Azure, and Google Cloud Platform. It also supports real-time streaming, analytics, machine learning, and more. Mercurius provides an easy-to-use API that allows developers to quickly and easily interact with their devices. Furthermore, Mercurius is open-source and free to use, making it an ideal choice for developers who want to create innovative IoT solutions.

Platformatic

Platformatic project in Node.js is a powerful and scalable platform that enables businesses to quickly create, deploy, and manage sophisticated customer experiences using the power of AI. Node.js is used to incorporate custom logic into Platformatic’s interactive environment, allowing for a more tailored user experience for customers. Node.js is also used to provide faster performance and improved scalability across the platform, which is essential for powering high-volume customer interactions. With Node.js at its core, Platformatic project in Node.js delivers an efficient, robust, and secure customer experience.

Next.js

Next.js is an open-source project used to build server-side rendered React applications. It is based on the React framework and is a popular choice for developing single-page applications. It is easy to start with Next.js, as it handles the configuration and provides built-in features such as server-side rendering, static site generation, routing, code splitting, and much more. It also enables developers to start building apps quickly and efficiently while providing a range of customization options.

Prisma

Prisma is an open-source project that provides an ORM (Object Relational Mapping) for Node.js applications. It is designed to make it simpler and easier to interact with databases, reduce complexity and pain points in the development process, and help developers quickly build and deploy robust applications. Prisma provides automatic schema management, powerful data modeling, scalability, and high-performance querying.

Redwood

Redwood is a full-stack JavaScript framework for building web, mobile, and desktop applications. It allows you to rapidly use modern technologies like React, Node.js, GraphQL, and TypeScript to create powerful applications with an opinionated yet extensible architecture rapidly. With Redwood, you get the best of both worlds: the robustness and scalability of a full-stack framework and the flexibility and efficiency of a modern JavaScript stack.

Nuxt

Nuxt is an open-source project built on Vue.js and Node.js that provides an easy-to-setup framework for server-side-rendered (Universal) or Single Page Applications (SPA). It supports Vue components and allows developers to create custom projects from scratch or pre-made templates. Nuxt comes with integrated routing, code-splitting, and hot module reloading out of the box and also provides features such as custom layouts, meta tags management, and server middleware.

Strapi

Strapi is an open-source Node.js project that allows developers to create and manage their own API’s with ease. It provides a RESTful API structure and a customizable admin panel that will enable users to manage content and users easily. Additionally, it supports multiple databases and can be easily extended with plug-ins. Strapi provides an intuitive user experience and allows for rapid development of web applications.

Herbs.js

Herbs.js is a Node.js project that helps developers streamline the development process by allowing them to quickly and easily create Node.js applications with the help of various pre-defined tools, libraries, and modules. It provides a wide range of features, such as code syntax highlighting, modular components, integrated debugging and testing, and a streamlined build process. It also offers a convenient command-line interface for creating and managing a Node.js project.

PNPM

PNPM is an advanced package manager for node.js. It is optimized for performance and focuses on being a minimal footprint and making dependency resolution faster by creating a hard link, symlink, or cloning the dependencies into the local project. It also features an automated garbage collection system that detects and removes unnecessary packages. PNPM is designed to create reproducible and reliable builds. It utilizes a deterministic package-lock file to ensure that the same version of all required packages is installed on each machine.

Congratulations to the projects and their teams, you are doing truly incredible work, and we are excited to see what you do throughout the year! If you would like to nominate a project for the N|Solid Award, reach out to our community team at [email protected] and tell us why!

Why Choose N|Solid on top of Node.js?

Companies and developers looking for an enterprise-grade Node.js platform should consider N|Solid due to its superior performance and scalability. N|Solid delivers up to 10x better performance than most other Node.js production platforms and offers a range of tools to help developers scale their applications quickly and easily.

Additionally, N|Solid solves the problem of missing debugging capabilities, offering advanced insights, profiling capabilities, and real-time monitoring with built-in alerting, so developers can quickly identify and fix issues. It also includes a range of additional features, such as progressive deployments, automated patching, secure log data transmission, and more. Read about the top ten features in N|Solid here!

Conclusion

Node.js is a powerful platform that can help you create the project of your dreams. With plenty of open-source projects available, you can find solutions to develop exceptional applications. From the top ten NodeJS open-source projects, you have the opportunity to try out something new or contribute actively.

It is possible to get overwhelmed by all the options, but this is a fantastic opportunity to build and experiment with the tools you need.

Please help us to reach more people and support use cases in Node.js. We care about the Node.js community! Happy to connect with you on

Twitter

LinkedIn,

GitHub.

You’re welcome to explore, read, and participate in the Node.js Project.
We proudly support Node.js Binary Distributions since 2014. 💚