D could catch this wave: web assembly

Joakim via Digitalmars-d digitalmars-d at puremagic.com
Sat Jun 20 22:42:12 PDT 2015


On Saturday, 20 June 2015 at 19:39:06 UTC, Ola Fosheim Grøstad 
wrote:
> Yes, but would it be better to just have pages and no apps? I 
> don't think so. When I build an order system it is very useful 
> to build it like an app.

No, I'm not arguing for pages at all, I'm saying that model is 
dead and gone.  I think the hyperlink was the killer feature of 
the web, but everything else, HTML/CSS/JS, is just detritus 
accumulated on top, that needs to be thrown away.

> The fact is that networking bandwidth is now so large that you 
> often can download the catalog for an online shop at once, 
> compressed it is the size of an image...

You can do some interesting things with caching, sure, but the 
web frontend is still unwieldy and slow and round-trip latency 
anytime you do something is what kills you.

>> widgets of AJAX and HTML5, rifts crop up.  The recent web 
>> components efforts you highlight do not address this at all, 
>> they merely make it easier to build more dynamic webapps.
>
> It kinda does. Because you can then serve pages with markup 
> that do things that are specific for the site. When you can 
> attach behaviour to tags implicitly you get to build your own 
> markup-language for the site.

Again, none of this helps with the fundamental problem: you are 
engineering an app UI layout engine into an old-fashioned 
document format.  You are always going to be constrained by the 
architectural constraints and inefficiency of the document format.

>> My point was that text makes some sense for the layout of a 
>> document format, but efficiency is key in vector graphics, so 
>> you always want to go binary there.
>
> If the vector graphic is intricate it will take time to render 
> it. So there is a limit to how much data you want, I don't 
> think text-transmission is the main issue.

Text compression will get you part of the way to lessening the 
bandwidth, but parsing and analyzing the SVG text will always 
take longer than if it were binary.  I have not actually profiled 
an SVG renderer to see where the bottleneck is, but I bet using 
text plays a big role.

> You can do that if you want. Just download binary data and plot 
> it to a canvas.

The fact that I could render SVG images to a png and download 
that instead doesn't excuse the fact that they're putting full 
text SVG renderers into the browser.

> But there is no way you could introduce binary SVG when using 
> SVG dynamically. That would require specialized binary-format 
> editors for both SVG and HTML. You would basically want binary 
> HTML too, then.

Of course you could use binary SVG dynamically: you'd simply need 
the right hooks in the browser and in the binary format to 
manipulate it using javascript.  It would not require 
"binary-format editors" or "binary HTML."

However, I have long said that they should have tightened up HTML 
into a binary format around HTML 3 or so, so that needed to be 
done on its own anyway.

On Saturday, 20 June 2015 at 20:31:35 UTC, Nick Sabalausky wrote:
> An excellent example of this is sites like github that actually 
> manage to break the "back" button, even though it's *clearly* a 
> page-based site (that somehow doesn't seem to believe it is).

Heh, you don't know how many times that's hit me. :)

> "Smart" TVs also have trouble there:
>
> http://www.quirksmode.org/blog/archives/2014/07/samsung_smart_t.html

Heh, I have never tried to use a browser on a TV, especially 
since I basically haven't watched a TV screen in the last decade, 
maybe a couple hours of sports a year.  I just download the same 
or other online videos and watch them on my computer or mobile 
devices.

> (See the section "The viewport", just underneath the photo with 
> a phone held in front of a TV. Erm...speaking of which: 
> <https://semitwist.com/articles/article/view/html-fragment-linking-is-stupid-here-s-the-fix>)

Hmm, I had not heard of that fragment linking effort you wrote 
about.  I agree that in the old page model it'd be better if the 
user decides what he wants to link to, but in the new dynamic 
model, that is very hard to implement.

>> Pretty soon it won't. :) There are an estimated 2.5 billion 
>> smartphone
>> users:
>>
>> http://www.asymco.com/2014/04/07/postmodern-computing/
>>
>> The highest estimates of desktop and laptop users I've seen 
>> don't crack
>> 2 billion.  That means desktops are already a minority 
>> platform.
>
> People have been looking at the sales trends and predicting for 
> years that mobile will kill of PCs. And all that happened 
> (unsurprisingly, IMO) is that the decline in PC sales simply 
> leveled off.

Still declining though, just less than it was:

http://www.asymco.com/2014/07/23/is-the-pc-back/

I'd say this is a temporary respite before the final collapse.  
The only reason it hasn't happened yet is because mobile devices 
have not worked well with plugging into a large monitor with a 
mouse and keyboard, but that is now changing.

> Mobile will not, and cannot, replace traditional 
> laptops/desktops (as opposed to merely cooexisting with them as 
> is the case right now) until if/when they finally incorporate 
> all the usability and features of laptops/desktops. Obviously 
> they're not there right *now* yet. But as for the future...

Sure, but current mobile hardware is about as powerful as 
desktop/laptop chips from a year or two ago, which is what most 
people are actually running at work:

http://www.anandtech.com/show/9289/the-nvidia-shield-android-tv-review/3

At this point, it's just a software issue.  Mobile devices just 
need UI features like multiwindow to make more capable use of 
large desktop monitors.

>> All
>> the major mobile vendors are working on multi-window 
>> implementations
>> which will soon allow you to plug your mobile device into a 
>> dock that
>> connects to a monitor/keyboard/trackpad on your desk and run 
>> your mobile
>> apps in a similar way to the desktop: Apple's just-announced
>> multi-window feature to go along with their coming iPad Pro, 
>> Google's
>> in-development multi-window implementation that has been found 
>> in the
>> Android M build, and Microsoft's recently announced Continuum 
>> for mobile
>> devices, that lets you plug your Windows Phone into a monitor 
>> and use
>> Office with a desktop UI.
>>
>> What this means is that people will soon be using their mobile 
>> devices
>> for almost everything and desktop computers are effectively 
>> dead. :)
>> Now, workstations were killed off by PCs and they still sell a 
>> couple
>> million worldwide.  Similarly, there will always be a niche 
>> for PCs and
>> mainframes.  It's just a small niche.
>
> I don't think "phones/tablets replacing desktops/laptops" is an 
> entirely accurate way of describing how that will happen (if it 
> does).  More like "phones/tablets and desktops/laptops will 
> converge into a hybrid".

Yes and no.  As hardware form factors, the old desktop and laptop 
models are being ditched.  The desktop box will almost completely 
disappear, while the folding laptop is only really needed by a 
small niche, those for whom "lap-ability" in a plane or 
conference seat is needed.  I picked up a bluetooth keyboard for 
my tablet last year: that suffices for me, and I bet most people, 
since I'm always going to put them down on a hard surface before 
typing.  I bet 97% of the people who currently use laptops are in 
this category.

As for the desktop OS, Windows has essentially no penetration on 
mobile, while OS X and linux live on only in the core kernels of 
their mobile counterparts.

All that is converging is the software UIs, where mobile devices 
will be able to display apps appropriately both for constrained 
touchscreens and larger monitors controlled by a 
keyboard/trackpad.  Only in that last sense are mobile devices 
converging, by adding software UIs to work on large screens.

> Of course, that's dependent on the phone/tablet folks actually 
> managing to pull it off. Which is certainly a possibility, I 
> agree, but I'm not convinced they'll necessarily manage to, at 
> least not in the short term.

It's around the bend and frankly should have been done sooner.

> MS, oddly enough, seems to have the highest chance of 
> succeeding at this, as desktop/mobile convergence has been 
> their big goal since Win8. And then Win9 (erm, I mean 10) 
> cleans up some of the mess Win8 left. (Not that I like metro or 
> what the metro "theme" has done to the desktop side of windows, 
> even in Win9^H10, but that's beside the point here.)

They certainly seemed to start on it first, but screwed it up in 
some key ways.  Not allowing the desktop on Windows RT was a big 
mistake, which they appear to be sort of remedying with their 
recent Continuum/Universal-app moves.  Ironically, this was one 
of the few cases when Microsoft was too early, because mobile 
devices were probably not powerful enough when Windows 8 came out 
three years ago.

> Interestingly, Canonical could've beat everyone to the punch 
> here. They had what was basically "continuum for linux" more or 
> less already working, but then...they just...what, threw it in 
> the trash bin or something? I dunno, I don't quite get 
> Canonical sometimes.

I get the sense that they're a small organization that bit off 
something way too big for them.


More information about the Digitalmars-d mailing list