The idea that the whole web should converge on Flash was loopy for a ton of reasons. I was never drawn to Flash but it didn‘t bother me, until I got solar panels and started paying attention to where energy was going and found that Flash was one of the biggest energy pigs in the history of humanity. Remember that Dickens character from Hard Times whose little factories billow their black soot (that rains down on the town)? That dude‘s mojo was a veritable flea circus next to the amount of soot-stained waste on Flash‘s report card. And it‘s not over. Sure, they have capitulated and we know the future is not their‘s, but their junk is still out there sucking up battery (Ars estimated 30%!) and hence coal.
The prospect of combining either JSF or something like it with something like HTML5 is pretty enticing. Because we have all seen the usefulness of RIAs, all the way back to JFC/Swing, the huge barrier (which Flash proved was not that high a hurdle) was having to have people install stuff. HTML5 holds out the prospect of finally coalescing enough consensus to get everyone on board with making it part of their core offering. Not just so we can do the stupid jiggly stuff that Flash seemed to be constantly focused on, but so we can do things like web interfaces that use diagrams, schematics, mixed media (images/video), etc., without having to install a bunch of crap on the client machine.
Having done a bunch of projects that included some diagramming, I started to do a new one recently and was wondering ‘what format should I output these into?‘ And the usual suspects came out and a huge surprise with them: HTML5 supports SVG! I guess I kind of knew that, but what a great thing to realize. Was pretty excited about SVG when it showed up and it‘s one of those technologies that I have never understood why it didn‘t get traction. Looking at it again, kind of made me ill because I am so sick of xml-based ideas, but it‘s actually pretty cool, and, let‘s face the facts: the browser is going to have to put whatever we want to do into a dom tree anyway so..
Went looking for sources and it looks like the HTML5 bubble is just starting to hit now. There are a few books, and there are books about SVG going all the way back almost a decade, but looks like there are a slew in the offing. Meantime, though, I did decide that I would use SVG.
Will post more about this, but here are a few thoughts. First, I was interested in what it would be like from Java. I had seen Batik before. Looks interesting. I like the idea that you can just paint the way you would and it will generate the SVG, but who uses Java2D anymore? No one. And this project looks pretty dead. I was kind of psyched at the idea of having a DSL for SVG, so I could do my usual fluent builder stuff and buildup images that contain circles, squares, arrows, etc., complete with animations. But then there's the Objective-C side of the equation. There is an offering on that side: libsvg, but looks like it‘s sleepy: last release 2005. I am thinking about starting with a DSL on the O-C side for generating the SVG. Fluent looks different of course in O-C but it is possible.
Thankfully, if you are doing things for the mac, the picture here is very good. Because Safari is a first class supporter of HTML5 right now. I got to thinking ‘ok, generate a project and put a web view in it then get that to show some SVG.‘ It was stupid how simple this turned out to be. Furthermore, when you pull the SVG into Xcode, it will even show it to you rendered in there. So this is good because it means I can write a bunch of DSL code in unit tests that execute in a second or two and then see the results pretty quickly, and this will work in a Mac app, or an iPhone/iPad one. BTW, just straight out high octane coding is much better now in Xcode because the new m2 maven plugin in eclipse means every few times you go to run your unit tests, even ones that are tiny and totally isolated, you get the dialog box and it does its resource syncing. This never happens in Xcode. One other benefit at this stage: I found that OmniGraffle Professional can export to SVG, so you have a forge for making your sprites/components that is readily available. Kind of an interesting Agile/Lean angle here on how this all will come together, including how such a tool could support extension.
Ultimately, what I want is a way to componentize a bunch of this and that‘s where the franken fears creep in. Is it going to be doable? or will it turn into a nightmare of trying to glue disparate elements together and hope they don‘t come apart in flight? Only time will tell (or maybe some books that look at real examples). One encouraging sign was I did a search to find out how one would do a drop shadow in SVG and found this gem . Looks like maybe these things can be orchestrated..
Summary: fan so far. This is looking very promising…