DEV Community

Nick Mudge
Nick Mudge

Posted on

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.

Top comments (0)