The simplest ay to test above code is to create a Canvas Element in your HTML fie and set its Id Attribute to "portalcanvas". And Paste above code in a script tag, that's all. You can also see my previous code about basics of canvas Canvas Part 1
You're showing how to use canvas as svg (kind of) - i doubt people will actually make complex graphics with writing code. You'll probably get some tool to export (kind of) vector graphics from graphics programs to your style of drawing.
That makes me wonder - will they make some html elements representing lines, boxes, arcs, etc to nest inside canvas element? Would save alot of coding time..
You are right in saying that what i have drawn can be drawn with use of SVG, but I have two things to say, firstly I posted this article to introduce some of the methods and properties by actually using them in drawing that stuff, secondly I believe that use of canvas is equally important when drawing static content (like graphs and charts) and dynamic content (like animations and games) and can not be done with SVG. SVG could be used for making some shapes but anything more than that is quite frankly like killing yourself . The best part i like about canvas is that it can be manipulated so easily with JavaScript without even worrying about DOM further it being stateless makes it more efficient drawing surface.