<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>ClientScript</title>
        <link>http://www.theruntime.com/blogs/jaykimble/category/84.aspx</link>
        <description>ClientScript</description>
        <language>en-US</language>
        <copyright>Jay Kimble</copyright>
        <managingEditor>jkimble@gmail.com</managingEditor>
        <generator>Subtext Version 1.9.5.0</generator>
        <item>
            <title>Core Addin Challenge: 2 weeks with CodeRush/Refactor Pro (CR/R!)</title>
            <link>http://theruntime.com/blogs/jaykimble/archive/2008/08/05/core-addin-challenge-2-weeks-with-coderushrefactor-pro-crr.aspx</link>
            <description>&lt;p&gt;[As &lt;a href="http://theruntime.com/blogs/jaykimble/archive/2008/07/22/core-addin-challenge--hello-coderushrefactor-pro.aspx"&gt;previously&lt;/a&gt; &lt;a href="http://theruntime.com/blogs/jaykimble/archive/2008/07/28/core-addin-challenge-1-week-with-coderushrefactor-pro.aspx"&gt;mentioned&lt;/a&gt; I have committed to switching from ReSharper (R#) to CR/R!... the end result will be a regular guy’s comparison of the 2.  DISCLAIMER: By no means is this meant to be a slight on R#, but more of me looking at CR/R! a little closer -- I think a number of us took a cursory look at CR/R! and while we found value a surface look doesn’t really give you the full picture... I’m going through the challenges of using CR/R! because it IS different from R# and hopefully I can help folks who are trying to compare between the two and decide which is best for their situation] &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Turning the corner (sort of)&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Tuesday I turned the corner I thought that there was no coming back (more on that in a second). The thing about CR/R! is that it’s truly a learning experience. CR takes over your environment in such a way that, while it still looks like Visual Studio, you need to re-educate yourself a little to all its nuances. It can actually get in your way (and there have been a couple times with Mark and Rory (and Koen HanHoefkens, the author of the excellent --and free-- CR_Resolve plugin) where I have asked "how do I turn xxx feature off." The most annoying one for me is that I tend to highlight code and start to overwrite with new code... for the most part there are no pains here, except when the character you type is a "(" which is often the character I am typing when changing an "if" statement. What happens is that this embeds your selection in a set of parenthesis.  This was actually easy to turn off... the feature is called "embeddings" which is found in the shortcuts section of the options (there are lots of options with CR/R!). Before I shut them all down I discovered some really rich stuff here... for instance you can highlight code, type "c" and your code is instantly surrounded by a try catch with your cursor setting in the catch block. I still turned off the parenthesis, but I left the rest of them on.&lt;/p&gt;  &lt;p&gt;I’ve also started figuring out some of the templates.&lt;/p&gt;  &lt;p&gt;I’m still learning here, but the topic is very deep!&lt;/p&gt;  &lt;p&gt;BTW, I’ve found that this product enhances your experience while working with ASP.NET HTML, JavaScript, VB, C#, and even Script# (C# variant that creates JS files).&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;My One hiccup&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;I have experienced one hiccup over the last several days: &lt;em&gt;PERFORMANCE/MEMORY FOOTPRINT&lt;/em&gt;. I’ve had VS crash a few times. I finally think I have the problem figured out (a not so well behaved plug-in I installed... I installed some really old plugins... well they didn’t seem that old).&lt;/p&gt;  &lt;p&gt;Currently the only DXCore plugins I have running (besides CR/R!) are CR_RESOLVE, and the "Highlight Current Line" both from the &lt;a href="http://code.google.com/p/dxcorecommunityplugins/"&gt;community plugins&lt;/a&gt; (&lt;a href="http://theruntime.com/blogs/jaykimble/archive/2008/07/28/core-addin-challenge-1-week-with-coderushrefactor-pro.aspx"&gt;mentioned in the last post&lt;/a&gt;). I also have turned off the Code Analysis (temporarily).&lt;/p&gt;  &lt;p&gt;I am still watching this closely (and am sure that Mark Miller will chime in either personally or publicly with a few more suggestions, but I don’t think he needs to... &lt;em&gt;&lt;strong&gt;this lesson should be heeded that you need to be careful which addins you install in VS... they can make things run less than smoothly, and adding a bunch of them all at once makes it even harder to determine where the problem really lies&lt;/strong&gt;&lt;/em&gt;).&lt;/p&gt;&lt;img src="http://theruntime.com/blogs/jaykimble/aggbug/2656.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Jay Kimble</dc:creator>
            <guid>http://theruntime.com/blogs/jaykimble/archive/2008/08/05/core-addin-challenge-2-weeks-with-coderushrefactor-pro-crr.aspx</guid>
            <pubDate>Tue, 05 Aug 2008 19:43:58 GMT</pubDate>
            <wfw:comment>http://theruntime.com/blogs/jaykimble/comments/2656.aspx</wfw:comment>
            <comments>http://theruntime.com/blogs/jaykimble/archive/2008/08/05/core-addin-challenge-2-weeks-with-coderushrefactor-pro-crr.aspx#feedback</comments>
            <wfw:commentRss>http://theruntime.com/blogs/jaykimble/comments/commentRss/2656.aspx</wfw:commentRss>
        </item>
        <item>
            <title>DLRScript 0.55 released for Silverlight2 Beta2</title>
            <link>http://theruntime.com/blogs/jaykimble/archive/2008/07/24/dlrscript-0.55-released-for-silverlight2-beta2.aspx</link>
            <description>&lt;p&gt;[UPDATE: I forgot to add the link to the project - &lt;a href="http://www.codeplex.com/dlrscript"&gt;http://www.codeplex.com/dlrscript/&lt;/a&gt;]&lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;It took a bit of time for this release. In the end I had to take everything a step back (as well as there are probably a few "mid thoughts" in here as the release of SL2 Beta 2 caught me a bit by surprise... actually the changes to the DLR caught me more by surprise).&lt;/p&gt;
&lt;p&gt;The step back is that we no longer get script code lines when there are issues. I’ll try to bring this feature back, but right now if it breaks, you’ll know it via an alert with a .NET error.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Future direction&lt;/strong&gt; &lt;br /&gt;
I need some feedback on this. I’ve been thinking about scrapping any attempt at jscript compatibility and am thinking more about ecma3 support (DLRJScript has an ecma3 mode). The benefit there is that I could start focusing on building a better set of client-side APIs instead of a more compatible one. That said, I’m not sure how qualified I am at coming up with a "better" set of client-side APIs.&lt;/p&gt;
&lt;p&gt;I do want some feedback though. Let me know what you think: jkimble-at-gmail.com.&lt;/p&gt;&lt;img src="http://theruntime.com/blogs/jaykimble/aggbug/2651.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Jay Kimble</dc:creator>
            <guid>http://theruntime.com/blogs/jaykimble/archive/2008/07/24/dlrscript-0.55-released-for-silverlight2-beta2.aspx</guid>
            <pubDate>Thu, 24 Jul 2008 20:12:15 GMT</pubDate>
            <wfw:comment>http://theruntime.com/blogs/jaykimble/comments/2651.aspx</wfw:comment>
            <comments>http://theruntime.com/blogs/jaykimble/archive/2008/07/24/dlrscript-0.55-released-for-silverlight2-beta2.aspx#feedback</comments>
            <wfw:commentRss>http://theruntime.com/blogs/jaykimble/comments/commentRss/2651.aspx</wfw:commentRss>
        </item>
        <item>
            <title>MS MVC Thoughts</title>
            <link>http://theruntime.com/blogs/jaykimble/archive/2008/07/24/ms-mvc-thoughts.aspx</link>
            <description>&lt;p&gt;[NOTE: I haven’t quite had much of a chance to look at the new Preview 4, so take this as someone nearly informed. I haven’t read about anything in the Preview 4 that changes what I’m going to say. Also, remember that I am the admin/editor of the blog site which is Alt Alt.NET... so testability/mockabilty doesn’t really resonate with me.]&lt;/p&gt;  &lt;p&gt;I know it’s shocking that I would have something to weigh in on MS MVC, but I do. For those who don’t know. I took some issue with Ayende’s "leaky abstraction" back in my CodeBetter days (they had to love having me around). BTW, I understood and agreed in some respects, but in others I was less than agreeable. I still think Web Forms are viable and usable, but in some cases the paradigm breaks down, so the need for another paradigm is both welcome and interesting (and before anyone brings up Castle, PixelDragon, or CodeStory MVC frameworks, I have looked at them as well and found them --in general--way too complex to get started with which is not to say that a couple templates could help you guys out...).&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Why I’m interested?&lt;/strong&gt;    &lt;br /&gt;Ok, the reason I’m interested is summed up in one word: RIAs. I could have summed that up in 2 words: Ajax, and Silverlight2. The other thing is that I have used the MVCContrib’s Restful feature to build REST services (way cool).&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;The Good&lt;/strong&gt;    &lt;br /&gt;I really like the simplicity. I mean MVC isn’t simple, but the MVC framework makes it easy to keep your layers separate... you still have to think about what you are doing, but on the whole it’s pretty easy to use. The MVC paradigm allows for a truer coding experience (the engine doesn’t pretend to be a Windows application in any way although you can still use things like session and the forms authentication engine in ASP.NET).&lt;/p&gt;  &lt;p&gt;The MVCContrib library is indispensable. It’s an open source library that is a community project that adds additional features to the MS MVC architecture. For instance there are a number of alternative view engines; I haven’t investigated all them yet (and for the most part I am sticking with the ASPX engine... although my later comments may lead you otherwise).&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;The Not So Good&lt;/strong&gt;    &lt;br /&gt;Before I say this I want you to realize I have written a grand total of 2 apps with this. App1 used the Restful plugin and really shouldn’t count, so I have written exactly 1 app (so definitely take this with a grain of salt).&lt;/p&gt;  &lt;p&gt;Complaint number 1 is that I felt like I was writing old ASP code. I used the inline code method for writing output into my HTML. I probably could have written in the codebehind and had a clean web template with code separation (something I’m a believer in, but it was my first app)... probably more my fault than the engines, but there is a lot of sample code out there already that lead you down this path.&lt;/p&gt;  &lt;p&gt;Complaint number 2 really is valid. The whole idea of MVC is that I should be able to swap out the view engine. Or better yet, be able to respond to a request and supply a view that is more suited for the client. Someone pointed out to me that one of the big features of ASP.NET 1.0 was that it would supposedly do this... I would really love for MVC to make it easy to determine that "this is a mobile browser" supply the mobile template (if one exists). Or better yet, this client is requesting that I send XML... evidently it’s some kind of Rich Client. Specific methods can be triggered to deliver a specific type, it would just be nice if the framework would detect that the client "accepts" (that’s a ServerVariable pushed in the header) only "Application/Json" so the MVC app should use a JSON result or convert the result I got to JSON and push it directly down to the client.&lt;/p&gt;  &lt;p&gt;This would make the MVC part of this more useful to me (remember all the stuff I said up front... and Yes, I know I can do this myself and have... it just would be nice if I could get the controller framework to make it easy for me to configure and then do this for me)&lt;/p&gt;&lt;img src="http://theruntime.com/blogs/jaykimble/aggbug/2650.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Jay Kimble</dc:creator>
            <guid>http://theruntime.com/blogs/jaykimble/archive/2008/07/24/ms-mvc-thoughts.aspx</guid>
            <pubDate>Thu, 24 Jul 2008 13:45:05 GMT</pubDate>
            <wfw:comment>http://theruntime.com/blogs/jaykimble/comments/2650.aspx</wfw:comment>
            <comments>http://theruntime.com/blogs/jaykimble/archive/2008/07/24/ms-mvc-thoughts.aspx#feedback</comments>
            <wfw:commentRss>http://theruntime.com/blogs/jaykimble/comments/commentRss/2650.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Tampa User eXperience (TUX) User Group is coming September 10th, 2008&amp;hellip;</title>
            <link>http://theruntime.com/blogs/jaykimble/archive/2008/07/17/tampa-user-experience-tux-user-group-is-coming-september-10th.aspx</link>
            <description>&lt;p&gt;I am proud to announce that I and a couple other guys are starting User Group that revolves around User Experience (or UX) in the MS tools eco-system. The other guys are Shawn Cady, Perry Panagopoulos, and Bill Reiss (MVP) [Bill always gets his MVP props].&lt;/p&gt;
&lt;p&gt;I could give you all their backgrounds, but I’ll make them do it at the first meeting. I’m sure Papa Fish (aka &lt;a href="http://www.devfish.net"&gt;www.devfish.net&lt;/a&gt;) the local MS Dev Evangelist (my Blog Father) Joe Healy will be around (at least for the first meeting).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;TUX' Focus &lt;br /&gt;
&lt;/strong&gt;Our focus will be on the "now" of Ajax and how it integrates with ASP.NET (in all its various forms), and the "future" of Silverlight2, and anything in between (like adding Silverlight2 controls to Ajax sites, etc); we’ll not be stuck in just Web either... we’ll probably do some WPF as well. We’ll also be  dealing with some of those more abstract things that you need to get better at (like how to be a better designer, creating good user experiences, etc.), and we will do our best to keep this group "devsigner-friendly" (devsigner is a developer who is also a designer).&lt;/p&gt;
&lt;p&gt;We have a lot of really creative ideas to make this fun and useful to you today as well as with an eye for the future (but I don’t want to blow them all)... We will definitely keep this interactive and will try to help you solve your problems as well (at least we’ll be around to chat with you before and afterward).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;First Talk: Intro To MS Ajax Scripting&lt;/strong&gt; &lt;br /&gt;
The first person to present will be me. I will be pulling a talk out of my paid pile which means that you have probably never seen me give this talk (unless you work at one of the companies I gave it at)... this is very special and will never be repeated (well, maybe). This talk is one that I have yet to see anyone give (for free). It’s an introduction to the MS Ajax scripting framework. Oftentimes you see a demo where someone shows you how to build an Ajax Extender control where a JavaScript is thrown in, but rarely (I’ve never seen it done) does someone talk to you about building the script behavior which is used to create the Server-Side Extender (I will in fact be doing just this). You will leave this talk with the knowledge of how to do it. As is often the case when I talk about JavaScript, I’ll end with a Script# demo which will make your life a lot easier (so we’ll build the last demo in C# which will be compiled to MS Ajax-style JavaScript); this big demo is a selection grid behavior that I built for my employer to replace a commercial grid component that we were using; you’ll definitely have a use for it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Bonus&lt;/strong&gt; &lt;br /&gt;
We’ll have Pizza provided by Answers Systems, so just get there after work... you don’t need to eat first.&lt;/p&gt;
&lt;p&gt;AND!!!! Bill Reiss (MVP) has graciously given us an &lt;strong&gt;&lt;em&gt;MSDN Premium Subscription&lt;/em&gt;&lt;/strong&gt; (used to be MSDN Universal) to &lt;strong&gt;&lt;em&gt;give away&lt;/em&gt;&lt;/strong&gt;, so don’t miss it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Where/When will it be?&lt;/strong&gt; &lt;br /&gt;
We will be holding these events at my workplace: Answers Systems in Oldsmar, FL. Better directions than this will follow in the near future (we will have a web site soon), but it’s right next to (West of) the Oldsmar Fleamarket on Tampa Rd (aka Hillsborough Ave). We plan to open the doors at 6:30pm with the activities starting at 7:00pm.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Can’t make it, but you really wanted to see my session?&lt;/strong&gt; &lt;br /&gt;
&amp;lt;sarcasm&amp;gt;So you are in my fan club (Eric Wise, I know that’s you since you maintain some of my stellar code), but you live in another state (like say the cold state of Ohio... where it’s 40 degrees Fahrenheit in August) so there is no way you could see this session by me, but you really, really want to see it, but the plane ticket is so expensive.&amp;lt;/sarcasm&amp;gt;&lt;/p&gt;
&lt;p&gt;Well, we plan on videoing our sessions and making them available online (as long as the speaker is OK with it, and I am... SO this is the LAST time I’ll be able to charge for this session... unless I revamp it which I will).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Afterwards...&lt;/strong&gt; &lt;br /&gt;
I’m not Joe Healy so I can’t pick up the tab, but there is a Starbucks down the street that many of my colleagues and I like to frequent (Stimulants... I need a good stimulant not a depressant... but we could be talked into depressants), so don’t be surprised if we all end up somewhere afterwards or maybe somewhere else... &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;RSVP&lt;/strong&gt; &lt;br /&gt;
If you plan on coming please drop me a line via the contact form on this site. We need this to help us figure out how much Pizza to buy. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;PS&lt;/strong&gt; &lt;br /&gt;
In October (the 2nd Wednesday), Bill will be doing a Silverlight2 talk (He’s a Silverlight MVP and a soon-to-be Silverlight book author). It will be more of an intro, but he plans on really giving a nice overview from both the diesgn standpoint and the development standpoint.&lt;/p&gt;
&lt;p&gt;And, yes, we actually have a a list of things we’re thinking about for November... nothing definitive (yet), but we plan on being way ahead of the game (as best as we can).&lt;/p&gt;&lt;img src="http://theruntime.com/blogs/jaykimble/aggbug/2645.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Jay Kimble</dc:creator>
            <guid>http://theruntime.com/blogs/jaykimble/archive/2008/07/17/tampa-user-experience-tux-user-group-is-coming-september-10th.aspx</guid>
            <pubDate>Fri, 18 Jul 2008 03:35:18 GMT</pubDate>
            <wfw:comment>http://theruntime.com/blogs/jaykimble/comments/2645.aspx</wfw:comment>
            <comments>http://theruntime.com/blogs/jaykimble/archive/2008/07/17/tampa-user-experience-tux-user-group-is-coming-september-10th.aspx#feedback</comments>
            <slash:comments>4</slash:comments>
            <wfw:commentRss>http://theruntime.com/blogs/jaykimble/comments/commentRss/2645.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Cool ScriptManager stuff I missed...</title>
            <link>http://theruntime.com/blogs/jaykimble/archive/2008/05/29/cool-scriptmanager-stuff-i-missed.aspx</link>
            <description>&lt;p&gt;So the last week or so I have been doing some heavy handed UpdatePanel development (stuff where I needed to fix an existing form that needs help to support an UpdatePanel or stuff where I needed to do something special while the page was posting back asyncronously).&lt;/p&gt;  &lt;p&gt;In the midst I discovered some cool mechanisms that I missed!&lt;/p&gt;  &lt;p&gt;For instance you can determine whether the current request is an async request by doing something like this:&lt;/p&gt;  &lt;div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4"&gt;   &lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;     &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   1:&lt;/span&gt; ScriptManager sm = ScriptManager.GetCurrent(Page); &lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   2:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (sm != &lt;span style="color: #0000ff"&gt;null&lt;/span&gt; &amp;amp;&amp;amp; sm.IsInAsyncPostBack)&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   3:&lt;/span&gt; {&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   4:&lt;/span&gt;     &lt;span style="color: #008000"&gt;// do something special here&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   5:&lt;/span&gt; }&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;The other problem I had was that I needed to emit a startup script that should execute after the async request finished rendering. It turns out that the ScriptManager control has some really nifty static methods. Here’s the example of what I was trying to do:&lt;/p&gt;

&lt;div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4"&gt;
  &lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;
    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   1:&lt;/span&gt; &lt;span style="color: #008000"&gt;//                                  (control, type,   ScriptID,ScriptToRun, AddScriptTags)  &lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   2:&lt;/span&gt; ScriptManager.RegisterStartupScript(&lt;span style="color: #0000ff"&gt;this&lt;/span&gt;, GetType(), &lt;span style="color: #006080"&gt;"someID"&lt;/span&gt;, &lt;span style="color: #006080"&gt;"SomeScript"&lt;/span&gt;, &lt;span style="color: #0000ff"&gt;true&lt;/span&gt;);&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;Investigate it for yourself... there’s a lot of handy stuff here that corresponds to the same stuff you can do with the Page’s ClientScript object (with the difference being that ScriptManager’s stuff works during a Async Postback)&lt;/p&gt;&lt;img src="http://theruntime.com/blogs/jaykimble/aggbug/2415.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Jay Kimble</dc:creator>
            <guid>http://theruntime.com/blogs/jaykimble/archive/2008/05/29/cool-scriptmanager-stuff-i-missed.aspx</guid>
            <pubDate>Thu, 29 May 2008 21:20:57 GMT</pubDate>
            <wfw:comment>http://theruntime.com/blogs/jaykimble/comments/2415.aspx</wfw:comment>
            <comments>http://theruntime.com/blogs/jaykimble/archive/2008/05/29/cool-scriptmanager-stuff-i-missed.aspx#feedback</comments>
            <wfw:commentRss>http://theruntime.com/blogs/jaykimble/comments/commentRss/2415.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Script#: Events/Delegates in an Atlas/MS Ajax style script</title>
            <link>http://theruntime.com/blogs/jaykimble/archive/2008/05/22/script-eventsdelegates-in-an-atlasms-ajax-style-script.aspx</link>
            <description>&lt;p&gt;&lt;/p&gt;  &lt;p&gt;First of all if you don’t know what &lt;a href="http://codeplex.com/scriptsharp"&gt;Script#&lt;/a&gt; is, it is a C# language variant available in VS2005/2008. The difference is that it can be used to create JavaScript. The compiler produces an assembly (usable in other Script# projects) and a set of JS files (a release and a debug version). Nikhil Kothari (the author) also has 2 script frameworks you can target: Nikhil’s framework, and the "Atlas"/MS Ajax (aka MS ASP.NET Ajax) framework. There are difference in what you can do when using the "Atlas" framework.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Event Limitations&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Let me start with a quote from the Script# Dox (regarding limitations in "Atlas" targeted scripts):&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;"No support for auto-generated event accessors. Auto-generated event accessors require the existence of a Delegate class with Delegate.Combine/Remove semantics, which are not provided      &lt;br /&gt;by ASP.NET AJAX. The workaround is to explicitly implement the 2add/remove accessors for events in your code, rather than have the compiler generate it. "&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Basically this is saying there are issues with building events in your classes with Script#. It’s not impossible, but it’s not automatic like it is in Nikhil’s Script# (client-side) framework.&lt;/p&gt;  &lt;p&gt;Since I recently had to do this and had to search the Internet for a solution (which there is no answer for), I thought it would be good to document how to do it (for both my reference and for others).&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;How To Add/Remove Events&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;That comment about needing to create your own add/remove logic is really simple to handle, but your class needs to derive from Sys.Component (or a class like behavior and control which derive from Sys.Component). The code looks like this (In Script#):&lt;/p&gt;  &lt;div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4"&gt;   &lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;     &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   1:&lt;/span&gt; &lt;span style="color: #008000"&gt;// add a handler to an event&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   2:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; add_MyEvent(EventHandler fn)&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   3:&lt;/span&gt; {&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   4:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.Events.AddHandler(&lt;span style="color: #006080"&gt;"MyEvent"&lt;/span&gt;, fn);&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   5:&lt;/span&gt; }&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   6:&lt;/span&gt; &lt;span style="color: #008000"&gt;// remove a handler from an event&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   7:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; remove_MyEvent(EventHandler fn)&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   8:&lt;/span&gt; {&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   9:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.Events.AddHandler(&lt;span style="color: #006080"&gt;"MyEvent"&lt;/span&gt;, fn);&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;  10:&lt;/span&gt; }&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;The reason we need to derive from Sys.Component is that Sys.Component gives us the Events property. Events is the container for all our events. New ones will be dynamically generated within that container. Let’s see a simple property we can build to easily get the event back when we want to invoke it.&lt;/p&gt;

&lt;div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4"&gt;
  &lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;
    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; EventHandler MyEvent&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   3:&lt;/span&gt;     get&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   4:&lt;/span&gt;     {&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   5:&lt;/span&gt;          &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; (EventHandler)&lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.Events.GetHandler(&lt;span style="color: #006080"&gt;"MyEvent"&lt;/span&gt;);&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   6:&lt;/span&gt;     }&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   7:&lt;/span&gt; }&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;All of this is well documented. The hard part is. Now I have the event how do I call it with Script#? You might start looking for invoke or apply syntax (which I did. But the answer is quite simple. The EventHandler is a function/method that you can call directly like this:&lt;/p&gt;

&lt;div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4"&gt;
  &lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;
    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   1:&lt;/span&gt; EventHandler evnt = &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.MyEvent;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   2:&lt;/span&gt; evnt(sender, &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; EventArgs());&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;BTW, you can do the same type of thing with delegates... they’re just simp0le functions.&lt;/p&gt;

&lt;p&gt;I hope that helps someone...&lt;/p&gt;

&lt;p&gt;[I really need to write a fuller post on building Behaviors with Script# (in case you don’t realize Behaviors are the foundation of ASP.NET Ajax Extender Controls).]&lt;/p&gt;&lt;img src="http://theruntime.com/blogs/jaykimble/aggbug/2412.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Jay Kimble</dc:creator>
            <guid>http://theruntime.com/blogs/jaykimble/archive/2008/05/22/script-eventsdelegates-in-an-atlasms-ajax-style-script.aspx</guid>
            <pubDate>Thu, 22 May 2008 13:30:48 GMT</pubDate>
            <wfw:comment>http://theruntime.com/blogs/jaykimble/comments/2412.aspx</wfw:comment>
            <comments>http://theruntime.com/blogs/jaykimble/archive/2008/05/22/script-eventsdelegates-in-an-atlasms-ajax-style-script.aspx#feedback</comments>
            <wfw:commentRss>http://theruntime.com/blogs/jaykimble/comments/commentRss/2412.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Composition vs. Inheritance...</title>
            <link>http://theruntime.com/blogs/jaykimble/archive/2008/05/02/composition-vs.-inheritance.aspx</link>
            <description>&lt;p&gt;[I really should stay out of these discussions... I really should, but I can’t resist.]&lt;/p&gt;  &lt;p&gt;The other day I saw an article on Composition over Inheritance (I forget where I saw it). The article did a good job of explaining what "composition" is. This is my simplistic understanding (which means that someone will probably come in and tell me I have it ALL wrong... what else is new?): "composition" means essentially wrapping objects instead of direct inheritance (so instead of inheriting from X you instead have a private instance of X in your class that you use, but you create your own interface possibly something that looks totally different from the "wrapped" class).&lt;/p&gt;  &lt;p&gt;I only really have one concern in all this; at least with what I have read (and not necessarily the last article I read on this subject). The advice almost comes across as "thou shalt avoid inheritance (if you can)." The implication is that inheritance is something bad. Now I understand that inheritance can complicate things in a unit testing scenario (be it TDD or POUT).&lt;/p&gt;  &lt;p&gt;The problem is that implication that inheritance is bad. I think it might be better to discuss some things I recently did in the DLRScript source code. I recently used composition to build a compatible XMLHttpRequest object in my DLRScript environment (no, it’s in the unreleased bits which will be released as soon as I can test it properly... I was hoping for a JQuery compatibility, but it looks like that ain’t happening this iteration). I wrapped the SilverLight HttpWebRequest object. This let me create a Mozilla/Safari-compatible XmlHttpRequest object that has no extra features other than what those objects contain.&lt;/p&gt;  &lt;p&gt;That said I also have some code I have had in place for some time that also works well. This code inherits from the SilverLight HtmlDocument, and creates a document object that is more in line with what we are used to seeing in client script in the browser. I also have a class that wraps HtmlElement to create an object that is also more familiar to JavaScript junkies. I recently added a style property to each of these elements, for instance. My style property simply utilizes the setStyle/getStyle methods (I forget the actual method names) which is already available in the HtmlElement (for instance) to get/set values of individual style properties. In this case having a few dangling methods doesn’t really hurt because I already need 90% of what is already there. I do have to override a few methods since I need to emit DomElements (my inherited form of the HtmlElement) from getElementById instead of an HtmlElement.&lt;/p&gt;  &lt;p&gt;My point is this. Think. Think! THINK!!! &lt;strong&gt;THINK!!&lt;/strong&gt; Don’t just blindly follow a rule. Look at your code. Take control of it. Make it do what you want it to do. Make sure that it makes sense. and if someone else is going to be using it, ask someone else if they think what you are doing makes sense. And then DOCUMENT IT!! At least provide an example of how to use it.&lt;/p&gt;&lt;img src="http://theruntime.com/blogs/jaykimble/aggbug/2402.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Jay Kimble</dc:creator>
            <guid>http://theruntime.com/blogs/jaykimble/archive/2008/05/02/composition-vs.-inheritance.aspx</guid>
            <pubDate>Fri, 02 May 2008 16:41:52 GMT</pubDate>
            <wfw:comment>http://theruntime.com/blogs/jaykimble/comments/2402.aspx</wfw:comment>
            <comments>http://theruntime.com/blogs/jaykimble/archive/2008/05/02/composition-vs.-inheritance.aspx#feedback</comments>
            <slash:comments>5</slash:comments>
            <wfw:commentRss>http://theruntime.com/blogs/jaykimble/comments/commentRss/2402.aspx</wfw:commentRss>
        </item>
        <item>
            <title>DLRScript update</title>
            <link>http://theruntime.com/blogs/jaykimble/archive/2008/04/24/dlrscript-update-again.aspx</link>
            <description>&lt;p&gt;I have begun working on DLRJScript-JavaScript compatibility. I was actually successful running my first externally created JavaScript -- EcmaUnit 0.4 (which is a small JS testing framework). I did have to make a couple modifications.&lt;/p&gt;
&lt;p&gt;I’m becoming aware of the size of this job though. I’m currently porting a Mozilla-compatible XmlHttpRequest object which I think will work with all the major Ajax frameworks. I’m not sure which Ajax Framework I’ll actually target as the first on to run. I could stick with the man and make it work with the MS Ajax client library, I could go with Prototype that so many people swear by or I could use something else (JQuery is looking rather interesting to me in this regard). The biggest thing I require though is either an extensive sample project or a test suite itself. This makes it easier to see if my JavaScript replacement is working OK or not. Once I have a reasonable compatibility (one or more frameworks working fairly good with minimal issues) then I’ll move over to making the various languages capable of communicating with one another (so I can loadup JQuery and then use it, clientside, from Iron Ruby).&lt;/p&gt;
&lt;p&gt;In case you forget why you might want to do this, it’s simple really; DLRJscript is faster (because it’s compiled) then traditional JavaScript (which is interpreted).&lt;/p&gt;&lt;img src="http://theruntime.com/blogs/jaykimble/aggbug/2398.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Jay Kimble</dc:creator>
            <guid>http://theruntime.com/blogs/jaykimble/archive/2008/04/24/dlrscript-update-again.aspx</guid>
            <pubDate>Thu, 24 Apr 2008 15:46:22 GMT</pubDate>
            <wfw:comment>http://theruntime.com/blogs/jaykimble/comments/2398.aspx</wfw:comment>
            <comments>http://theruntime.com/blogs/jaykimble/archive/2008/04/24/dlrscript-update-again.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://theruntime.com/blogs/jaykimble/comments/commentRss/2398.aspx</wfw:commentRss>
        </item>
        <item>
            <title>DLRScript 0.5 Notes...</title>
            <link>http://theruntime.com/blogs/jaykimble/archive/2008/04/14/dlrscript-0.5-notes.aspx</link>
            <description>&lt;p&gt;As you may or may not have seen, over the weekend I released a new version of my DLRScript project.  It’s coming along. It adds 3 things: File loading via the src attribute, better exception reporting for DLRJScript(it shows you what line of script code failed), and improved DLRJScript performance.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;File Loading     &lt;br /&gt;&lt;/strong&gt;I could probably write a bunch on this (and probably should in another article). Basically I am dynamically loading content (script files) from the server. I also extended HTML a bit in that you can now use the same script tag to load a script from the server and to write additional code that will load after the script has loaded. It looks like this:&lt;/p&gt;  &lt;div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4"&gt;   &lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;     &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;script&lt;/span&gt; &lt;span style="color: #ff0000"&gt;type&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="DLRJScript"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;src&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="/somefile-on-the-server.js"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   1:&lt;/span&gt;  &lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   2:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;function&lt;/span&gt; doSomething()&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   3:&lt;/span&gt;     {&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   4:&lt;/span&gt;         &lt;span style="color: #008000"&gt;// Code found here&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   5:&lt;/span&gt;     }&lt;/pre&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;script&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;
  &lt;br /&gt;&lt;strong&gt;JS Performance&lt;/strong&gt;

  &lt;br /&gt;Because of the new way I am creating the JScript engine, I get JScript code to compile, so the code that executes is faster than standard interpreted Client-Side JavaScript. I did a simple test which is within my &lt;a href="http://www.codeplex.com/dlrscript/"&gt;project&lt;/a&gt; over on CodePlex. The test simply adds 15 &amp;lt;hr /&amp;gt; elements to a hidden div. It records the time before and after the routine. First run in the DLRJScript results in about the same speed as standard client=side JavaScript. The second run results takes about 1/2 the time and the third trip is even faster (the 4th-6th attempt takes about the same amount of time as the 3rd run, so I figure that’s as fast as it gets). I’m not sure if this implies that the DLR optimizes code even more after subsequent runs of code or not (I know the .NET spec supposedly will optimize code after it has been run a few times).&lt;/p&gt;

&lt;p&gt;Anyway, my test is not scientific in case you are wonder. There could be additional processes on my box that may make the results vary. Everything is a very crude approximation. I did run the client-side version several times to see as well with about the same results.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Future&lt;/strong&gt;

  &lt;br /&gt;Ok, my plan is to get my DLRJScript to be more compatible with standard client-side JavaScript using DOM2. Right now I know I’m not even at DOM1 spec. I will be testing various libraries to see if I can get them to run with my implementation. It may result in a faster way to run JavaScript in the browser. Also, since the code is really running within the SilverLight plugin, the script code should be standardized and run the same in every browser (well, at least in theory).&lt;/p&gt;&lt;img src="http://theruntime.com/blogs/jaykimble/aggbug/2386.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Jay Kimble</dc:creator>
            <guid>http://theruntime.com/blogs/jaykimble/archive/2008/04/14/dlrscript-0.5-notes.aspx</guid>
            <pubDate>Mon, 14 Apr 2008 18:33:12 GMT</pubDate>
            <wfw:comment>http://theruntime.com/blogs/jaykimble/comments/2386.aspx</wfw:comment>
            <comments>http://theruntime.com/blogs/jaykimble/archive/2008/04/14/dlrscript-0.5-notes.aspx#feedback</comments>
            <wfw:commentRss>http://theruntime.com/blogs/jaykimble/comments/commentRss/2386.aspx</wfw:commentRss>
        </item>
    </channel>
</rss>