this post was submitted on 27 Nov 2026
138 points (88.3% liked)

Programming

29423 readers
176 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 3 years ago
MODERATORS
 

IMPORTANT DISCLAIMER: This is my own project. I am using AI. Its important to get that out of the way... because its the key reason for why YOU SHOULD NOT USE IT. Im not trying to promote "yet another secure messaging app", this is an example to see what is possible with a related UI framework im working on ( https://github.com/positive-intentions/dim ). Its unreviewed, unaudited and far from finished. This framework is intended for myself on my own projects. It is provided open-source for transparency, testing and demo purposes only. There will be breaking changes.

The key details that set this approach apart:

  • No minification or transpilation
  • No React, NPM or bundler
  • Works from index.html

The architecture is also a bit unique. Module federation has been around for a while but still fairly under-used. Im aiming for something that could be described as like a vanilla JS "decentralized microfrontend architecture", where in this approach, i can abstract complexity into seperate repositories to manage reusble functionality like in the boilerplate example:

To avoid vibecoded cryptography, the aim here is to avoid handling encryption where appropriate. Browsers that support webrtc, will have their own mechanisms for managing encryption (as required by the spec). The keys will not be accessible from app-level JS code. For security best-practice, users should use an OS, browser and network they trust.

To make something complicated at scale, i would need to have an approach for testing out changes in a way thats more isolated/focused. The npm ecosystem is useful because you can have things like storybook, unit-testing and browser automation tools. So i wanted to see what is possible with the pure javascript approach and created runTests.html. Like the main app, the code is just plain javascript and so it can be imported and tested with production statics. The testing functionality here is especially far from finished. This is an important feature to do it properly because it would be doing a lot of heavy lifting as the project improves.

P.S. The disclaimer above is always worth repeating. Im aiming for a post like this to be like "building in public". If interesting to anyone, i hope its inviting to take a look. It's hard to determine if / when its a good time to share, so best to get it out there sooner for any outstanding issues i may have overlooked.

you are viewing a single comment's thread
view the rest of the comments
[–] EloySg@lemmy.zip 8 points 1 day ago* (last edited 1 day ago) (4 children)

So, what we change JavaScript for? Lua? Lisp? WebASM+C++/Rust?

Edit: I'm genuinely curious but the web in this day and age NEEDS a substitute for JavaScript.

[–] duckduckduck@programming.dev 7 points 1 day ago (2 children)

Just don't.

If you want to make an application, make an application. But if you want to serve web pages, html is all you need.

[–] bitfucker@programming.dev 3 points 1 day ago

Until you cannot publish the application (iOS, and next is Android with developer verification even for apk outside of the play store). Web Application is seriously a powerful tool too. I don't want yet another application just to update my peripheral settings. WebUSB got me covered. I don't want to install an application that I don't know if I will use frequently. Having a web version that I can occasionally visit is great. Even better if they can be installed as PWA as those provide isolation for app that I don't fully trust yet. Want to have instant messaging? Why should I install discord when the web version can also do voice and video call. And that is because I don't need discord monitoring what app I open every time it runs.

[–] dreadbeef@lemmy.dbzer0.com -1 points 21 hours ago* (last edited 21 hours ago) (1 children)

Exactly. Fuck lemmy! It needs to be a desktop application, not a website! We all need to download megabytes of lemmy for a desktop app that spies on your computer vs kilobytes of js for a sandboxed web app. One wrong hack with the desktop app and your bank account is gone, but thats worth it because web apps dont have that issue and thats actually bad for people who want their bank accounts stolen from hackers.

[–] u_tamtam@programming.dev 1 points 6 hours ago

I'm using lemmy via an app, because the web UI sucks big time, and I suppose I'm very far from the only one?

[–] tyler@programming.dev 7 points 1 day ago (1 children)

You can do so much in just pure css nowadays. Not saying you should. But you can.

[–] EloySg@lemmy.zip 3 points 1 day ago

That's the whole thing,using just CSS is a bad idea so using a language for Web is necessary

[–] RickyRigatoni@piefed.zip 4 points 1 day ago* (last edited 1 day ago) (1 children)
[–] EloySg@lemmy.zip 1 points 1 day ago (1 children)

Yeah but rawdogging it is a bad praxis.

[–] dreadbeef@lemmy.dbzer0.com 3 points 21 hours ago* (last edited 21 hours ago) (1 children)

Exactly. Everyone knows raw tailwind is much easier to reason about:

<header className="px-2 py-1 bg-teal-900 dark:bg-teal-950 bg-gradient-to-l from-teal-700 to-teal-700/0 dark:from-teal-900 dark:to-teal-900/0 text-stone-50 flex print:bg-white print:text-black print:from-transparent print:to-transparent text-shadow justify-between flex-wrap items-end gap-x-2 flex-row print:flex-col print:items-start">

No documentation necessary. Dont even need an LLM to understand what's going on here. It's so fucking readable.

[–] EloySg@lemmy.zip 1 points 19 hours ago

Is understandable but Holly Molly.

[–] HelloRoot@lemy.lol 1 points 1 day ago* (last edited 1 day ago) (1 children)
[–] PushButton@lemmy.world 2 points 13 hours ago (1 children)

It's actually pretty good for what it wants to be: "UI framework for business app".

Exactly how VB (6-like), VB.net, C#, even in the time of WinForms: UI Code with " code behind " binded both-sides.

Same premise, same patterns, same problems 😅

[–] u_tamtam@programming.dev 1 points 6 hours ago

Worse execution, though