Re:Google Web Designer
by alphakappa on Monday September 30, 2013 @01:22PM
(#6470875)
The amount of code it generates for a page containing just a rectangle is not a good way to judge the tool. They may have some finite overhead because of the expectation that most users will be using the tool to create more complex pages. If the tool is good for the average ad-page that's created, while maintaining cross-browser compatibility, and bad for extremely simple pages, then who is to judge?
[ Parent
| on HN ]
I agree. The big(gish) script they injected is just fixed overhead, as is the CSS for positioning the canvas. It's just stuff we're used to having in separate files. The actual non-boilerplate part is this:
{\"type\":1,\"xoff\":0,\"yoff\":-1.4210854715202004e-14,\"strokeWidth\":1,\"strokeColor\":[0,0,0,1],\"fillColor\":[1,0,0,1],\"tlRadius\":0,\"trRadius\":0,\"blRadius\":0,\"brRadius\":0,\"width\":201,\"height\":104.00000000000003,\"strokeStyle\":\"Solid\",\"strokeMat\":null,\"fillMat\":null}
That could be better, to be sure. It's for some reason part of a JSON-encoded string inside a JS object instead of just a JS object (hence the hard-to-read escaped quotes). And the properties could use defaults to spare us "strokeMat: null" and such. But it's not horrible.
Edits: numerous and minor
Please edit; stretches the page on 1366 width.
arg, too late for me to do it