DEV Community

Nick Mudge
Nick Mudge

Posted on

5 1

Why I Created Webscript

Webscript is a way to create DOM elements in Javascript. You can see the documentation here: https://mudgen.github.io/webscript/docs/

Why did I create Webscript?

I want to have and use a frontend web development stack that is easy to use to rapidly develop web applications and has no build. Building the DOM is one part of that which is solved with Webscript.

But there are already tools that exist that build the DOM, like ..., er... HTML. Duh.

The problem with HTML is that it lacks programming logic like loops and functions. What if I make an ajax call to get data from a database and need to generate DOM elements with it?

But HTML templating languages exist to add programming logic to HTML.

Well, my beef with HTML templating languages is that I already have a programming language in the browser and it is called Javascript. I'd rather just use that. And Javacript is probably more capable than any HTML templating language. What I like about Webscript is that it is Javascript.

Well there's JSX which is HTML in Javascript. My beef with JSX is that it is a build step. JSX must be compiled to Javascript when building an application. As I said in my goal above: I want to have a frontend web development stack that has no build. My build is the Javascript I write plus the libraries and resources I link and import. No compiling, no Babel, no Typescript. Don't like it? Sorry. It is super simple and makes it easy to rapidly develop web applications.

AWS Q Developer image

Your AI Code Assistant

Implement features, document your code, or refactor your projects.
Built to handle large projects, Amazon Q Developer works alongside you from idea to production code.

Get started free in your IDE

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay