437 points · by jarek-foksa · 12y ago · 73 comments
1) Joel was talking on the context of a software business -- if you have working code it can be detrimental to business to do a rewrite from scratch, it will take you years, you will leave stuff off, piss off your customers, lose ground to the competition etc. It's not like Gravit.io has that kind of "business reasons" at this moment (this is their initial version offering), so his reasons do not apply to it.
2) Gravit.io is a port of a project to another language. This is not a rewrite -- much less a "rewrite from scratch". Again, Joel's reasons do not apply to the situation.
What front-end frameworks/technologies did you use?
Why is that everyone's first question? I get this constantly when I demo my stuff at meetups and hackathons. None. The answer is none. And they look at me like I just admitted to being a person who prefers to breath water. Vanilla JS is not that hard. It's a sight easier to know one language than to have to relearn the darling framework of the year all the time.
Are you the creator of Gravit.io? If not, then your response is useless, because nobody asked YOU that.
Plus, from his cv: "I've been doing JavaScript since it was invented.".
[1] https://github.com/quasado/gravit/blob/master/bower.json
Application performance is typical of modern, hand-coded JS. Or rather, I should say, the only reason I can see for why people tolerate bloated frameworks is because they've just come to expect JS to be slow. There is a reason some of us insist on sticking to vanilla JS. It's not because we're crotchety, old, greybeards. We wouldn't be touching JS at all if that were the case.
It appears they might also be using layered canvases to render different parts of the workspace that update at different rates. So that prevents them from having to redraw the checkered background every time you move the drawing. And it prevents them from having to redraw the existing drawing every time you add a new element and are still adjusting it.
Pretty standard techniques for anyone with experience working with Canvas, actually.
The main reason most web apps don't also feel very fast is not "DOM manipulation" or things that happen inside the page, is that they also do AJAX network calls and that adds huge latencies.
This app, judging the functionality, does everything inside the VM (no need to do AJAX calls for a drawing app), so can offer the full speed JS can do.
This might be a dumb question if they don't really occupy the same space. But naively it seems to me like they overlap somewhat, and maybe I should move some of what I currently do in Inkscape to Gravit? (I'm not all that proficient in Inkscape, and at first usage Gravit seems simpler.)
Why anyone would use this rather than inkscape on either Linux or Windows, however, is beyond me.
But, how do I insert an image from my computer as the layer?
Save/Export doesn't seem to work on my machine (Chrome 37, Mac OSX).
Would be nice to see some kind of SVG export instead of raster formats.
All saving also disabled for me, guessing the back end isn't quite there yet.
Found on http://gravit.io/, upper right corner.
All the best
For a snappy drawing program, native code remains the way to go.
No, he and I disagree that your experience is typical for everybody. Most people in this thread (including me) praised this for its quick loading, snapiness and speed.
Perhaps "Atom" and "1GB of RAM" doesn't cuts it for this kind of in-browser app, despite GIMP (a native app) running "pretty smooth). It makes sense if this has a minimum memory use requirement -- below which you can't run it at all because you don't have enough space that it needs to load, and after which you're OK and it's fast.
That said, people have run it on their iPads, and it's extremely snappy there too.
I'm also not sure the core dump was because of "out of memory". How about some glitch with your graphics card driver and the canvas renderer (which is not uncommon)?