<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 12-09-24 9:17 PM, Colin Putney
wrote:<br>
</div>
<blockquote
cite="mid:CAD+=c1ioj2Kqhr81BQQL9dSQw64NCWn4LstOVwtBg=Ymc56PEA@mail.gmail.com"
type="cite">
<pre wrap="">There are a few things that
could be really useful—e.g., a DAV server and some way of storing
Javascript within the image—but I can't really see doing anything to
eliminate the need to write Javascript.
</pre>
</blockquote>
And abstracting over the JavaScript doesn't release a person from
the obligation of already knowing the JavaScript that you're
abstracting over either. I think I'd have to agree with you that
there is no blanket way of abstracting over it so that you're saving
effort in all situations. There are some situations where Lukas's
work in Scriptaclous was impressive in that you'd write a class and
then pop, pop, pop add attributes and you're on your way. I remember
translating an AJAX Hacks book example to his Scriptaculous and
being impressed by the brevity. <br>
<br>
At STIC Eric Clayberg was using HTML5 2D canvas examples incidental
to his Dart presentation. Afterward I found a library called
jCanvas[1] that is a plugin for jQuery. I'd like to make some
classes abstract over specs for shapes:<br>
<br>
<meta charset="utf-8">
<pre class="prettyprint lang-js demo" style="position: relative; padding: 10px; border: 1px solid rgb(187, 187, 187); border-top-left-radius: 5px; border-top-right-radius: 5px; border-bottom-right-radius: 5px; border-bottom-left-radius: 5px; background-color: rgb(255, 255, 255); background-image: url(http://calebevans.me/projects/jcanvas/resources/images/stripes.png); text-align: left; font-family: Courier, monospace; font-size: 11pt; line-height: 1.25em; color: rgb(51, 51, 51); white-space: pre-wrap; overflow: auto; box-shadow: rgb(221, 221, 221) 0px 1px 1px inset; text-shadow: none; cursor: pointer; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><span class="pln">$</span><span class="pun">(</span><span class="str" style="color: rgb(153, 51, 51); ">"canvas"</span><span class="pun">).</span><span
class="pln">drawRect</span><span class="pun">({</span><span class="pln">
fillStyle</span><span class="pun">:</span><span class="pln"> </span><span class="str" style="color: rgb(153, 51, 51); ">"#000"</span><span class="pun">,</span><span class="pln">
x</span><span class="pun">:</span><span class="pln"> </span><span class="lit" style="color: rgb(51, 136, 51); ">50</span><span class="pun">,</span><span class="pln"> y</span><span class="pun">:</span><span class="pln"> </span><span class="lit" style="color: rgb(51, 136, 51); ">50</span><span class="pun">,</span><span class="pln">
width</span><span class="pun">:</span><span class="pln"> </span><span class="lit" style="color: rgb(51, 136, 51); ">200</span><span class="pun">,</span><span class="pln">
height</span><span class="pun">:</span><span class="pln"> </span><span class="lit" style="color: rgb(51, 136, 51); ">100</span><span class="pun">,</span><span class="pln">
fromCenter</span><span class="pun">:</span><span class="pln"> </span><span class="kwd" style="color: rgb(0, 51, 136); ">false</span><span class="pln">
</span><span class="pun">});</span></pre>
would become something similar to one of Lukas's classes with a few
attributes. And then I'd like to code Breakout [2]. That'd be nifty.
<br>
<br>
Chris <br>
<br>
<br>
[1] <a class="moz-txt-link-freetext" href="http://calebevans.me/projects/jcanvas/index.php">http://calebevans.me/projects/jcanvas/index.php</a><br>
[2] <a class="moz-txt-link-freetext" href="http://billmill.org/static/canvastutorial/index.html">http://billmill.org/static/canvastutorial/index.html</a><br>
</body>
</html>