News for hackers. Stuff that matters.
Re:Building Better Interfaces with SVG (2015) by lj3 on Sunday January 08, 2017 @06:40PM (#13352814)
Is it worth investing that effort, though? WebAssembly has entered its public alpha on multiple browsers and is coming a long way. It'll make WebGL easier to use and will probably give rise to other graphical UI APIs that run directly in the browser. Does SVG still have a place in a WebAssembly world?
Re:Building Better Interfaces with SVG (2015) by stupidcar on Sunday January 08, 2017 @07:00PM (#13352944)
I don't know, but I really, really don't hope we get to the point where every web application ships a bespoke, WebAssembly rendering engine and treats the browser as WebGL dumb terminal. That sounds like a complete dystopia.

Think loading times are bad on script-heavy websites now? Wait until every web app uses its own mix of graphics, font and layout libraries, all compiled from C/C++ to WebAssembly and shipped in a 100MB blob. And rendered without any integration with accessibility technologies, and with basic things like copy and paste disabled to stop you "stealing" content. No thanks.

Re:Building Better Interfaces with SVG (2015) by jstewartmobile on Sunday January 08, 2017 @07:33PM (#13353089)
That's probably going to happen anyway. Just sayin'.
Re:Building Better Interfaces with SVG (2015) by int_19h on Monday January 09, 2017 @12:15AM (#13354175)
That'll be the first step. Then people will notice all those crazy download times, and someone will figure out that things could be better if they could write a single reusable "container" app in WebAssembly and WebGL that could host nearly arbitrary content, described in some kind of high-level markup language that's reasonably concise...
Re:Building Better Interfaces with SVG (2015) by SixSigma on Monday January 09, 2017 @06:52AM (#13355666)
SVG markdown
Re:Building Better Interfaces with SVG (2015) by mtdewcmu on Sunday January 08, 2017 @10:26PM (#13353781)
It costs more to employ C/C++ developers than Javascript/HTML/CSS developers, so people are not going to recreate everything with bespoke C/C++.
Re:Building Better Interfaces with SVG (2015) by tannhaeuser on Sunday January 08, 2017 @07:07PM (#13352975)
Neither WebAss, nor WebGL (nor the canvas API for that matter) is a vector graphics format. When using WebGL, you still need a way to integrate complex prepared graphic content. You could implement an SVG renderer in WebGL + JavaScript I guess, but that's certainly not easier than just using SVG content straight away.

SVG 2 leaves the "painter model" behind (where z-order is determined by document order of the respective shape within its container) in favour of the z-index CSS property, so that you can address it in CSS (eg. `:selected { z-index: 1 }`). This makes it possible to describe things like interactive maps and DVD-like menus where when you click on a shape, the shape gets scaled or applied some other transform for highlighting.

However, I agree that SVG 2 leaves a bit to be desired (for example, level of detail properties). Also, animation of SVG in FF sucks compared to Chrome and Safari, or at least it used to 3 years ago. I wanted to teach my 12-year old how to make a simple browser game, but had to resort to hackish workarounds to make it run smoothly on top of using rAF etc., ruining my pedagogical ambitions.

Re:Building Better Interfaces with SVG (2015) by stymaar on Monday January 09, 2017 @05:40AM (#13355379)
> Also, animation of SVG in FF sucks compared to Chrome and Safari, or at least it used to 3 years ago.

I can relate to this, I use to work on a svg-heavy project in 2014 and I had the same kind of issues and I filed many bugs on FF bug tracker .

Fortunately, they've all been fixed by the mid of 2015. I don't work with svg so I don't know if everything works well now, but at least there were improvements.

Re:Building Better Interfaces with SVG (2015) by Kinnard on Sunday January 08, 2017 @06:51PM (#13352897)
That's a great point. I bet WebAssembly will result in an altogether next generation of technology given what we want to achieve today, not what we wanted to achieve in the early 1990s. But I have a feeling svg will have a big roll to play, and not only as inspiration either.
Re:Building Better Interfaces with SVG (2015) by sydd on Sunday January 08, 2017 @06:49PM (#13352883)
I dont think that many websites will be made in webassembly. Its more made for full webapps and games.

CSS/SVG is used for websites.

Re:Building Better Interfaces with SVG (2015) by stymaar on Monday January 09, 2017 @05:05AM (#13355254)
Given that we see more and more desktop applications being built with web technologies (formerly with node-webkit and recently with electron), and new UI toolkit are not really popular projects right now, I really doubt that many people will develop/use a brand new UI toolkit built on top of wasm and webGL.

Time will tell though.