George,<br><br>It's a great question. There is certainly a lot of reflection happening. Most of the wrapping actually occurs in client.js. The widgets in 0.2.2 didn't seem entirely stable, so I sandboxed them on the client. I don't necessarily defend this approach, but it works.
<br><br>Now that dojo 0.3 is out, and the widgets look a lot more stable, I'm going to revisit the relationship. I may keep the emerge client side wrappers, or I may move to instantiating the dojo widgets directly. Any suggestions here are of course appreciated.
<br><br>Here's an example of how a dojo control is wrapped, I'll show you the window widget:<br><br>like you said, there's not much in the C# (for now):<br><br> public class Window : Pane<br> {<br> }<br><br>just enough for reflection to see that this is a div with a different name.
<br><br>and then the javascript wrapper:<br><pre>Window.inherits( Widget );<br>function Window( args )<br>{<br> dojo.require("dojo.widget.ResizeHandle");<br> dojo.require("dojo.widget.FloatingPane");
<br> this.elemType = "DIV";<br> this.Widget(args);<br>}<br><br>Window.prototype.Render = function()<br>{<br> this.uber("Render", arguments);<br> var win = this.window = dojo.widget.createWidget
("FloatingPane",{id:<a href="http://this.id">this.id</a> + "_win"},this.elem);<br> win.domNode.style.left = 50;<br> win.domNode.style.top = 50;<br> win.domNode.style.height = 650;<br> win.domNode.style.width
= 650;<br> this.elem = win.clientPane.domNode;<br>}</pre>thanks for the feedback!<br><br>--ben<br><br><div><span class="gmail_quote">On 6/1/06, <b class="gmail_sendername">George Costanza</b> <<a href="mailto:gcostanza@operamail.com">
gcostanza@operamail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi Ben,<br>I've been checking your project religiously ever since your posted a
<br>hint on the dojo blog 2 months ago. At one point I even managed to<br>uncover the prototype home page digging through the links on your blog.<br>Anyways forgive my obtusity but reading through the code I still can't<br>
seem to figure out how exactly you are binding to dojo itself and what<br>the mechanisms for working this binding are. Or in other words I can see<br>and understand your framework, I just don't notice dojo in it, although
<br>it's lying in the bin folder :) Hmm must be something just round the<br>corner, possibly in the Widget.cs or client_master.js but I would have<br>expected more a class-for-class binding like .NET does for the standard
<br>windows API. You must be doing some heavy duty runtime reflection magic.<br><br>Could you provide a short overview of what is going on and where it will<br>go from here in relation to the dojo part?<br><br>_______________________________________________
<br>Dojo FAQ: <a href="http://dojo.jot.com/FAQ">http://dojo.jot.com/FAQ</a><br><a href="mailto:Dojo-interest@dojotoolkit.org">Dojo-interest@dojotoolkit.org</a><br><a href="http://dojotoolkit.org/mailman/listinfo/dojo-interest">
http://dojotoolkit.org/mailman/listinfo/dojo-interest</a><br></blockquote></div><br><br clear="all"><br>-- <br>ben joldersma<br><a href="http://ben.creationsnetwork.org">http://ben.creationsnetwork.org</a>