Sunday, 15 January 2017

In response to....The DOM Is NOT Slow, Your Abstraction Is

I was not able to comment on this thread (http://webreflection.blogspot.com.au/2015/04/the-dom-is-not-slow-your-abstraction-is.html) so I have made comment here...

Ok, this is an old thread, but I think the post + the comments outline something which Im sure there are many people thinking. As one comment points out, we have take an abstraction because ~'the DOM is good for documents, but we are building apps'...
BAM, the problem isn't the abstraction is it. It is us. We are trying to shove an application into a web browser.
History 101:
The Web was designed to a collection of DOcuMents, navigable via hyperlinks.
A Web browser purpose has always been to render the documents (HTML, SVG, etc...)
WEB 2.0 tried to cram on a bunch of features which would be useful for Web Applications into the HTML standard.
blah blah blah, point is, a web browser was not designed for the purpose we are using it
Analogy time...
Man wants to achieve flight, the Wright brothers managed to do this with a couple of sticks, some cloth and a tin can engine. Massive Kudos to them. Fast forward a few years, NASA needs to put a man on the moon. Did NASA say, well to get off the ground we need to fly, so lets get the wright brothers airplane and take it back to the shop and get tinkering? No, they built a massive f-off rocket! A web browser delivering a web application is a jazzed up wright brothers plane.
So why the hell are we doing this? In essence, the abstraction makes more sense to our puny brains. Im building an application. Ill write my code like its an application. Ill let the framework handle all that other boring shit like Making The Thing Work...after all, its the one thats gotta go back and create a document for the browser to render. Oh, but wait, then ill bitch about the performance of this-framework v that-framework... even worse, ill bitch about the performance of the native DOM! You are all using the wrong tool for the job, it will never be what you want it to be.
I advocate for a separation. Let's see browser vendors enable a split between applications and web pages/documents. Lets see  rendering engine built for applications. Lets see web app stores where you can release your application and have them run 'natively' in the browser. Lets stop, crying about the performance of something when we are abusing its purpose. All those in favour of WAM (Web Application Model) over DOM say I.