BYOJS (Bring your own JS)
BYOJS promotes web application development using core JavaScript, advocating for loosely-coupled libraries over frameworks, emphasizing simplicity, and includes various components, all released under the MIT License.
Read original articleBYOJS (Bring Your Own JS) is a project focused on encouraging the development of web applications using core JavaScript, rather than relying heavily on various frameworks or languages like TypeScript. The initiative emphasizes the value of using well-designed, loosely-coupled libraries instead of tightly integrated frameworks, advocating for simplicity and minimalism in coding practices. The guiding principle of BYOJS is to select the least powerful tool necessary to accomplish a task, promoting solutions that require minimal complex code. The project includes several components such as a simple key-value storage API, an event emitter with asynchronous capabilities, a modal wrapper around SweetAlert2, a throttled toggler, a throttle/debounce scheduler, and exclusive asynchronous locks. All code and documentation are authored by Kyle Simpson and are released under the MIT License.
- BYOJS promotes building web applications using core JavaScript.
- The project encourages using loosely-coupled libraries over tightly integrated frameworks.
- A guiding principle is to choose the least powerful tool for tasks.
- The project includes various components like storage APIs and event emitters.
- All materials are released under the MIT License.
Related
Execute JavaScript in a WebAssembly QuickJS Sandbox
QuickJS is a secure JavaScript execution tool in a WebAssembly sandbox. It includes security features, file system access, custom node modules, a fetch client, and a test runner. Find detailed documentation and examples in the repository. Users can seek further assistance for inquiries.
Microjs
Microjs showcases lightweight JavaScript micro-frameworks and libraries, emphasizing efficiency and portability. It allows developers to find and contribute to compact tools, promoting smaller, specialized libraries over larger frameworks.
Show HN: Ayr.js – a reactivity model designed for simplicity
Ayr.js is a lightweight reactivity model enabling developers to create reactive components without build tools. It features state management, effects, and derived state, but is still in early development.
Show HN: Tiny JS – A Tiny JavaScript Library for Easy DOM Creation
Tiny JS is a lightweight JavaScript library that simplifies DOM manipulation, allowing dynamic HTML creation, deep property assignment, easy content appending, and straightforward installation, while encouraging community contributions.
Show HN: WebJSX – A tiny Web Components and JSX library
WebJSX is a minimal library for building web applications using Web Components and JSX, featuring createElement and applyDiff functions, supporting custom elements, and available for installation via npm.
I have never felt as powerful or productive with JS (as much as I love it) as I have with Ruby on Rails.
I’ve “almost built” countless projects that never actually shipped with Node. Whereas with Rails I have shipped so much I feel like I was cheated out of the first few years of my career not knowing Rails.
All that to say. I love JS (and especially TS), but they’ve got to find their “Rails” before I can truly come all the way back.
There’s a few contenders (Redwood, Adonis), but none of them have been battle tested the way Rails has—yet!
I hope to move to TS in 2025
But, we still don't use a frontend framework, we just write components as classes. Each component takes a root node that the parent is supposed to "own", and that's kinda it. React is more productive short term, but I find this easier long term with complex UIs, keeping memory usage low, and less work keeping stuff upgraded.
There's very strong reasons a vast amount of people are switching to typescript. It can very easily compile to clean javascript, you can commit that to git, and you are much better off.
I'd still not go without React (or something similar) to manage DOM in the user-land, but there's something blessed about using barely any to no JS at all in an admin/moderator UI, or in dev tooling. Don't have to consider any of the compatibility/update headaches outside of the user space.
That rant aside, I feel that the best approach to JS is a static one. Build your code and your artifacts, package them long-term... serve them when needed and you're done. It's somewhat retro, SPA style, but it works like a charm and doesn't require building all the time, nor babying all the dependencies and build steps.
Paired with Claude Sonnet 3.5 and I'm more productive than I've been in years.
storage for example:
https://github.com/unjs/unstorage vs byojs storage https://github.com/byojs/storage
most users are going to prefer autocomplete and types regardless of if they also use typescript.
you can try it here https://bwasti.github.io/mebm/
Yeah it is getting lost, more and more lost each year - you know why? The core JS language is bad. Note how the author uses the word 'core' instead of what they really mean: 'subset'. Use a subset or a small portion of the language, because if you use the whole breadth of language features, you will litter your application with so many landmines that you will eventually scrap it and re-write due to how awful most of the 'features' in JS are. Even using a subset you have no choice to resort to syntactical verbosity to get around bad language design, like === over ==, or const & let over var.
I wonder what the ultimate point of posts like these are; it's like someone trying to light a fire during a flood; and to what end? To pointlessly champion a bygone era of when people didn't know better? Let's be clear here, JS is popular because it is the only language shipped by default in browsers, since 1996. That's it; it's not popular because it's good; we're not using it in 2024 because it won out in a contest of merit. It's design phase was rushed and even its name betrays how stupidly conceived it was; 'JavaScript' - as if superficial association with an already trendy tech during the 90's was somehow enough to paper over it's obvious flaws as a language. Just laughable.
Seriously, it's 2024, we know better now - use TypeScript. It's actually kind of amazing how Microsoft released TypeScript only in 2012 and not years earlier.
I've done the whole "I'll write it all in JS by hand" to a ludicrous degree: https://luduxia.com/whichwayround (and the rest) and while there were advantages when this started I am now looking to port the useful bits over to saner ways for future maintenance.
Why this alienation?
Related
Execute JavaScript in a WebAssembly QuickJS Sandbox
QuickJS is a secure JavaScript execution tool in a WebAssembly sandbox. It includes security features, file system access, custom node modules, a fetch client, and a test runner. Find detailed documentation and examples in the repository. Users can seek further assistance for inquiries.
Microjs
Microjs showcases lightweight JavaScript micro-frameworks and libraries, emphasizing efficiency and portability. It allows developers to find and contribute to compact tools, promoting smaller, specialized libraries over larger frameworks.
Show HN: Ayr.js – a reactivity model designed for simplicity
Ayr.js is a lightweight reactivity model enabling developers to create reactive components without build tools. It features state management, effects, and derived state, but is still in early development.
Show HN: Tiny JS – A Tiny JavaScript Library for Easy DOM Creation
Tiny JS is a lightweight JavaScript library that simplifies DOM manipulation, allowing dynamic HTML creation, deep property assignment, easy content appending, and straightforward installation, while encouraging community contributions.
Show HN: WebJSX – A tiny Web Components and JSX library
WebJSX is a minimal library for building web applications using Web Components and JSX, featuring createElement and applyDiff functions, supporting custom elements, and available for installation via npm.