DEV Community

Discussion on: Twenty years of web development, a change is coming!

Collapse
 
macsikora profile image
Pragmatic Maciej

I hope JS will stop being a compilation target in favor of smth which really is low level - WebAssembly.

Web development was in chains of JS for 20 years, until we have switched to compiled solutions, even now there are advocates of writing plain JS, and this I cannot understand. JS is nominal example of the language which never was designed, it has its good parts as Douglas Crockford is saying, but outside of the good parts we have a lot of footguns and problems like weak typing.

JS is not maintanable for any bigger codebase. Some can say, not true we have x lines of code and works fine. Yes works but costs of maintainence of such language code is huge, and highly depends on human discipline only.

I think languages like Reason, Elm or PureScript are the future of web development. Not sure about TS, maybe if TS will break it's compatibility with JS and will go in its own path then it has a chance to survive, funny as the most important reason of such TS popularity is exactly it's JS core.

In summary - I hope we will compile our code into WASM and JS will be just one of possibilities of languages. I think JS will stay in the surface where it's origins where, so for simple interactions in simple web pages, but for sure not in enterprise level systems.

Collapse
 
fasani profile image
Michael Fasani

For me, I think it’s worth remembering that a lot of JS is browser API that sort of masquerades as being part of JS. If chromium which is now in most browsers just decides that WA2 can now use the API’s of BOM and DOM then really JavaScript is gone almost overnight. I also think when we look at the speed of rendering on the GPU and how annoying the general DOM layout box model is... well we could just render anything and everything to canvas with no such limitation. Then web experiences can become like most interactive game experiences we are used to today. But of course, things like SEO and accessibility for screen readers are problematic, but then we just need a new spec for how to translate SEO for canvas and webGPU based sites. Don’t get me wrong HTML is pretty solid for rendering blogs and text. We have pushed HTML/JS to incredible new places, and we continue to do so... but I think perhaps, just moving it out of the way would allow new creative freedom like never before. I'm excited to see what changes the next few years might bring, and perhaps I am entirely wrong, but that doesn't matter. 🥳

Collapse
 
leob profile image
leob • Edited

Interesting, what you propose or suggest is really a new application programming model that's only using Canvas and leaving DOM behind, and then for the communication layer you can use anything that rides on TCP/IP (doesn't even need to be HTTP).

Not really "web" anymore. But yes HTTP and HTML do have a lot of advantages (SEO and so on), so we'll need solutions for that.

Collapse
 
elmuerte profile image
Michiel Hendriks

JavaScript (and the browser) is a great example of the quote

"We build our computer (systems) the way we build our cities: over time, without a plan, on top of ruins." - Ellen Ullman.

The lack of a plan is also quite visible in the rapid addition of new (in-development) APIs to the browser platform. More extensions are started then they finish. And people adopt these new constructions which are still extremely subject to change. These are the new ruins.

Add in NodeJS with also putting this construction on the server, and Electron for putting it on the desktop (and turning every simple application in a resource hogging browser).