Welcome to TheRunTime.com
We are a community of technical bloggers devoted to improving the business of development. This is a place where you will find expert advice on some of the advanced technical topics facing developers today. There will also be tutorials geared at novice developers, and content about the business aspects we must all deal with. Our number one commitment is to keep the content in our main feed relevant, reliable, and useful to you. I hope you enjoy our site and encourage you to subscribe to the main feed today.
Latest Posts
I did an episode of the .NET Rocks show last month which debuted today on the site. Now, instead of only reading my idiotic ramblings, you can actually listen to my idiotic ramblings. Lucky you!
Anyway, the show is a discussion on 64-bit development with .NET and all the fun that comes with it. Have a listen...
Cross Posted from
www.brianpeek.com.
I’m starting a new series on Silverlight2. I am currently building a little SL2 prototype, and as I am learning things I thought I would write them down here.
The first rule deals with working with Designers. It is stated as such.
"Prefer XAML code to CLR/DLR code when it comes building interfaces"
Note the word "prefer" here. That word means "usually", "normally", or "unless there is an exception."
This is best explained by some C# code I saw the other day. It looked something like this:
1: string ElementX = @"<div class='twocolumndiv'><span class='singlecolumn'>{0}</span><span class='singlecolumn'>{1}</span>";
The problem with the above code is that you’ve embedded it into your code. It’s effectively buried. If someone else needs to change this template to say add a field or to make changes in any manner, they are scanning the code looking for this (provided they know where to look); this will be the cause of much swearing and maligning of your name.
To make matters worse, if you have a web designer you have effectively removed their visibility to this code (maybe this point is made a little sharply; I know some web designers who would be scanning the code as well, but they wouldn’t be happy).
So how does this relate to SilverLight 2? Simple, you should try to avoid instantiate controls on your Silverlight views (pages??) that a designer has no visibility to (in other words, using a UserControl that has an associated XAML is fine, but instantiating a new UserControl and throwing a new layout and a bunch of text boxes should be done with great care... you should know why you did it that way).
The Nintendo Wiimote is getting some very mainstream attention lately. I was interviewed several weeks ago by Christopher Flavelle from Newsweek magazine for a story on developers using the Wiimote for uses other than playing games with their Wii console. The article should be in the May 19th issue of the International Edition of Newsweek and can also be read online at http://www.newsweek.com/id/136381. Have a read...
Cross Posted from
www.brianpeek.com.
I want to write today about the 300lb Gorilla that none of us really wants to talk about. I'm talking about the people we use to find new jobs. As you may be aware I closed down
IntraDynamics, LLC (well, I have greatly curtailed my company's offerings),and got a new job (at
Answers Systems, Inc.)
I was "exchanging notes" with my new boss regarding the process and discovered some things (none of this is surprising, but you may want to think about it next time you are pursuing a new job).
I had two recruiters that were aware of my interview process with Answers. One was the company who placed me and the other was a company I trusted (in the past) who appeared to be working hard to place me somewhere else (even asking about where I was in the process with Answers). In fact I was actually told that Answers (who offered me a job in less than a week) was slow in their hiring process. All this makes sense (the other recruiting company was trying to get the fees for me and wanted to do the placement with Answers, so they needed me out of the way). They inappropriately asked Answers about me.
There's that side of things. The other is that it took a long time to get my deal finalized (almost another week). Why? Recruiter placement fees. Now mind you there was a slight change in things with me (I went from "contract to hire" to just "hire"). The company wanted as much as 35% of my yearly salary for placing me (now mind you it wasn't because they did a great job finding me, etc.. they were in the right place at the right time).
To be honest all Answers needed was someone else to pre-screen candidate's technical abilities. All that the placement firm did was monitor Monster.com and send out an email. There were a few additional things they did (like call me everyday regardless of whether there was new info or not).
I don't mean to be trashing on someone (that's why I left the company names out), but I was in shock of the fees they wanted to collect. My boss, Perry, and I started talking about what would be better.
Eric Wise' idea of having a computer programmers trade association seems like a good idea. We would pay dues, but the organization would allow us to take tests and "prove" our abilities (or at least allow it to be easier to pre-screen applicants). Maybe there would also be a mechanism for referring.
I've been thinking about this. We could do it now you know. We could set up a site to create the organization. There would need to be a set of testing sub sites (maybe you would only be allowed to test every 6 months or every year). When the companies we work for are looking for people we could simply look in the organizations site to see who is currently available and match up test thresholds to what we are looking for. We could then refer these folks to our companies avoiding the whole recruiting industry.
Maybe I'm just dreaming...
Ever wanted to get a perfect score in Rock Band without really trying? Mark Single and the folks over at Pure Pwnage wanted to do the same for one of their episodes and wound up using my Light Sequencer from the Animated Holiday Lights Coding4Fun article I wrote to sequence the hardest song in Rock Band, Green Grass and High Tides. Using the sequencer, a Phidget Interface Kit and some specially modded guitars, they succeeded in getting a 5 star rating at 99% accuracy to achieve the payoff for the sketch.
Check out the original episode, and the "behind the scenes" documentary on how they did it. Great work, guys!
Cross Posted from
www.brianpeek.com.
When trying to run the Commerce Server Customer & Orders Manager, I was receiving an error stating that the orders webservice was unavailable. I looked at the connection settings for the orders webservice and realized that it was calling the webservice using https. For the purpose of testing on my development machine, I simply tried to change the url to use http instead. I then another error and found that you are required to use https for the webservice. I then downloaded the IIS 6.0 Resource Kit Tools (download here). You can use the SelfSSL 1.0 utility to generate a self-signed certificate to enable ssl for testing purposes. It’s a command line tool that takes a few parameters and automatically installs the generated cert for you.
Additionally, I had to disable anonymous access in IIS for the webservices and now everything works correctly.
[I really should stay out of these discussions... I really should, but I can’t resist.]
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).
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).
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.
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.
My point is this. Think. Think! THINK!!! THINK!! 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.
I've done the unthinkable and have decided to try out Twitter. You can "follow" me at http://www.twitter.com/BrianPeek . Let the grand experiment begin...
Cross Posted from
www.brianpeek.com.
I have posted the slide deck and sample code used during my Introduction to Microsoft Robotics Studio with Lego NXT session given at the Tech Valley Code Camp on April 19, 2008. Thanks to all who attended my session and the camp. Looking forward to the next one...
Cross Posted from
www.brianpeek.com.
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.
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).
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).
Aaron Lerch talks a bit about what it takes to be a technical manager. He enumerates five characteristics that he feels are essential for a technical manager (personally, I think that they are better classified as skills because they’re learnable and improvable). Here’s his five:
- Communication
- Technical Savvy
- Organizational Skills
- Priorities
- Humility
It’s a good list for the good times, I think. As long as things run more or less smoothly, a manager with those traits will be in good shape. As you can probably tell by my qualifiers, I think that he’s missing something.
Tough Choices
Unfortunately, managers (technical or not) often find themselves in a position where a decision has to be made and where the choices are all distasteful. What do you do when it turns out that someone doesn’t live up to your expectations or, more importantly, their job description? Or they simply don’t get along with the other developers on the team? Or, heaven forbid, the company has decided that less overhead in the development department is needed?
Firing someone is, by far, the hardest thing I’ve ever done as a manager. Firing someone is both an admission of failure and one of the harshest things a person can legally do to another. So a manager who fires somebody is pretty much a big, mean failure.
It’s a real shame that sometimes, people simply need firing. If you’ve ever been on a team with someone who couldn’t (or wouldn’t) pull their own weight, you’ll understand what I mean. Not firing someone who needs it can have a larger impact on team productivity than just about anything else I’ve encountered. I know because I’ve been a team member when someone needed to be let go and the manager couldn’t bring himself to pull the trigger. The hit to both productivity and morale is huge and grows geometrically over time.
Firing someone is the extreme case of an important skill. Management is all about the hard decisions. Yes, communication is important. And making irrevocable technical decisions without team input is suicide. But consensus is the one sure path to mediocrity and, frankly, mediocrity doesn’t do that well in the marketplace. It’d be nice if everything would shake out into rational lines with obvious choices, but real life (and real development) doesn’t work that way.
Decisive Humility
To make things harder, Aaron’s point about humility is still a good one. Technical managers should do their very best to surround themselves with people who are smarter than they are. Being surrounded by smart folks can be hard on you if you wear your ego on your sleeve, though. Also, smart people are incredibly difficult to control.
Being able to make compromises and solicit (and listen to) advice from your team is important for both you and them. But eventually, you will find yourself in a situation where the alternatives are as known as they are going to be and it is time to make that tough call. Making that call (and sticking to it) is your job. Managers who waffle or leave it up to a vote (whether formal or not) or who weasel out of responsibility later compromise the integrity of their team.
Balancing humility with the power and ability to decide is tough. It is, nonetheless, necessary.
Top Skills
So how would I re-order Aaron’s top five?
- Communication
- Technical Savvy
- Responsible Decision Making
- Humility
- Priorities
- Organizational Skills
While this is a general ranking, situations will arise where any one can become paramount—meaning that none are optional. All of them should be as strong as you can make them and the better you do, the better manager you will be.
Steve Hobley recently sent me a link to his amazingly awesome project, a "laser harp" implemented using a Wiimote and my Wiimote library. The video is below. Fantastic project!
Cross Posted from
www.brianpeek.com.
As promised I am going to begin blogging on my experiences with Commerce Server 2007. I started yesterday by getting the environment setup. I didn’t run through the step-by-step guides I just followed the prompts and a little advice from one of my co-workers who has been playing with CS for about a month now. Everything seemed to go as planned. I walked through the configuration wizard, unpacked the CSharpSite and compiled all the projects which got everything going. The part I missed from doing it this way was configuring security correctly. One thing I’ve noticed is that CS seems to be locked down very heavily out of the box.
I installed and launched the CS Catalog Manager. It would not connect and just gave me a generic error prompt that the webservice was not available. I poked around in IIS for a minute only to find that everything seemed to be good. I then tried to navigate to the webservice with IE which worked fine. I thought it was interesting that I could get there with IE but not the Catalog Manager. So I tried to invoke one of the methods in IE and I finally found the problem. I got the following error:
System.Web.Services.Protocols.SoapExceptions: The Catalog Web service does not have write access to the authorizationPolicyPath. Verify that the file exists and that it has the appropriate permissions.
I looked around for a solution and what I finally found by piecing together different sources was that essentially I needed to assign write permissions on CatalogAuthorizationStore.xml to the account running the AppPool in which it resides.
To do this you need to identify the account running your AppPool by going to IIS open up Application Pools and find the AppPool the CatalogWebService is running in. You then can right click on that AppPool and select Properities. Go to the Identity tab on the properties dialog and there you can see which account you are using. Once you have this information, then you can navigate to the CatalogAuthorizationStore.xml file which is in the same directory as CatalogWebService.asmx. In my case, it is set up at C:\Inetpub\wwwroot\CatalogWebService. You then right click on the xml file and select Properties >> Security. Here you add the account and be sure that it has write permissions. Once I completed this, I tried again to launch the Catalog Manager. This time it worked, or at least it seemed to. It was now able to load and talk to the webservice, but the task pane was empty. I couldn’t actually do anything with catalogs.
I did some more searching to try to resolve this issue and found that although I could now access the CatalogAuthoriztionStore, I had no accounts configured within it. So now I have to add my user account. To accomplish this you do the following:
Open the Authorization Manager (Start > Run > Azman.msc)
Right Click the Authorization Manager node
Click on Open Authorization Store
Browse to the CatalogAuthorizationStore.xml file where we found it earlier
Open the CatalogAuthorizationStore Node
Open the CatalogandInventorySystem Node
Open Role Assignments
Right Click on the roles you wish to manage and choose "Assign Windows Users or Groups"
You can then use the dialog to select your user account or other appropriate users and groups
Once again I tried to launch the Catalog Manager and this time was able to manage catalogs as expected.
Well, I’m no Wade Wegner, but I am going to get my shot at developing in Commerce Server and I intend to share my experiences here. I’m sure Wade will have ample opportunities to laugh at my foolish mistakes and offer a better approach, but I figure that is the way that I’m going to learn and hopefully provide all of you some useful information along the way. So Wade, I know you are looking to put all that knowledge you’ve compiled for your book to good use, are you up to the challenge of guiding a Commerce Server novice through some of the pitfalls?
Where have I been?
Sadly, nowhere good.
My father passed away extremely unexpectedly on March 4, 2008 and life has been hectic and chaotic ever since. I'm finally back into some sort of routine, so it's time to update here and explain what's going on outside of the unpleasantness.
First off, I've been contracted to co-author a book for O'Reilly (tentatively) titled Coding4Fun with Dan Fernandez from Microsoft. The book will be a compendium of 10 (give or take) projects that, as the title suggests, combine fun and coding. I'll update as we go through the process.
Secondly, I'll be presenting a session titled Introduction to Microsoft Robotics Studio with Lego NXT at the Tech Valley Code Camp this Saturday, April 19th. If you're in the area, as always, stop by. It should be a fun and informative day.
And finally, I will be back to work on some Wiimote goodness soon. I was right in the middle of Guitar Hero controller support when the above occurred. I have not made it back into the project since, but know that work will be continuing.
That's all for now...
Cross Posted from
www.brianpeek.com.
I have long been a proponent of working and developing in an environment that matches your production systems. I've found that developing on the same O/S takes away a lot of the unknowns and guess work that occurs when you deploy from a traditional workstation O/S (like XP or Vista) to a server O/S (like Windows Server 2003 or 2008). Don't get me wrong, Windows XP and Vista are fantastic O/S's and appropriate for all kinds of development; yet, when you're working with products like BizTalk, SharePoint, or Commerce Server, it make sense to use the same server O/S.
Windows Server 2003 has been one of my favorite O/S's. It's stable, fast, and powerful. I've built all kinds of custom .NET, SharePoint, BizTalk, and Commerce Server applications on Windows Server 2003 and I have never been unhappy or displeased with the O/S. So, if I've always been happy with Windows Server 2003, why am I talking about Windows Server 2008?
This little post is probably the wrong place to get into a full discussion regarding the features and benefits of Windows Server; however, let me mention a few things that convinced me:
- IIS 7. There have been some tremendous changes to IIS in this latest version. I'll post about this another time; there's too much for this post.
- Hyper-V. Hyper-V is a virtualization system for x64 versions of Windows Server 2008. It's cool stuff, and again too much to get into here. Never heard about this? Go read about it!
- x64. All I can say is that I was always unhappy with the x64 version of Windows Server 2003.
- Roles and Features. I'll talk more about these in another post; roles and features are similar to what we've used in previous versions, only better!
There are many more reasons; this published list of the Top 10 Reasons to upgrade to Windows Server 2008 is a great start.
Alright, convinced? Well, if for some reason you're still not convinced then I invite you to witness how slick and easy the installation process is with Windows Server 2008. Actually, I found that it's very much like the Windows Vista installation.
1. Insert your bootable DVD or map the ISO file to your virtual machine. Boot the machine.
2. Once the lightweight O/S has booted, click Install Now.
3. Depending on the flavor of your DVD / ISO, you will have various options to select from. Select the operating system you want to install, and click Next.
4. You are next presented with the license terms. Be sure and read these terms! Once you have finished, select I accept these terms, and click Next.
5. You must next select the type of installation. Again, depending on your flavor, you may have different options. I always prefer to perform a fresh installation. That's just how I role. Make your selection, and click Next.
6. Next, you have to select the disk partition to which the operating system is installed. Make your selection, and click Next.
7. Now comes the impressive part. The installation for Windows Server 2008 is very much like Windows Vista - fast! That's because the operating system is largely unpacked rather than installed. On the first screen you'll notice that the zip is copied over to the disk partition ...
8. ... and then it is expanded.
_thumb_1.jpg)
9. Oops. It went so fast I missed a screen shot. Honestly, Installing Updates is typically the slowest part of the installation, although this is more true for Vista than Server 2008 as Vista has more updates to install at this point in time. (No, this is not a reflection or comment on the quality of Vista!)
_thumb_1.jpg)
10. At this point I was asked to reboot. Just do what it tells you to do. It's smarter than we are.
11. And then the installation completes. Yippee!
_thumb_1.jpg)
12. Before you can log into your new fresh installation of Windows Server 2008, you are told to change the administrator password ...
_thumb.jpg)
13. ... and then you can set a new password. It struck me odd that this was considered "changing" the password, since there doesn't appear to have been one before. Oh well. Semantics. This installation still rocks. Click the little arrow, and then ...
_thumb_1.jpg)
14. ... your desktop is prepared!
Congratulations, you've just installed Windows Server 2008! Altogether, I was able to go through this process in about 30 minutes on my Dell D830. Not too shabby! In the effort of full disclosure, here are the specifications for my machine:
Processor: Intel Core 2 Duo, 2.40 GHz
Memory (RAM): 4.00 GB
System type: 64-bit Operating System
Really, when you sit back and reflect on what operating system installations were like back in the old days (the 90's were the old days, right?) it's amazing how much more sophisticated this process has become. It's elegant, intuitive, and fast.
While you may not be as impressed with this as I am (in which case you must try it on your own, as I know you'll become as fervent as I am) I promise you that some of my next posts will get your blood flowing. I plan to show how easy it is to add roles (e.g. a Web Server with IIS) and features (e.g. .NET Frameworks or PowerShell) to Windows Server 2008. Neat stuff, and again, very intuitive.
I hope this helps!
Today I decided to install the x64 version of Windows Server 2008 EE w/ Hyper-V on my Dell D830 laptop. I will post about the experience later (it was awesome!); for now, I want to specifically mention how I was able to get the wireless working.
I should have done my due diligence prior to installing Windows Server 2008, but I like to live dangerously! After the installation was complete (which was simple and fast), I noticed that the wireless adapter was not installed. I tried to update the driver manually, specifically telling it to check the web, but the search didn't find anything. I also checked both the Intel and Dell web sites to no available—I couldn't find anything for Windows Server 2008 and my wireless adapter on either web site (which is not all that surprising, since I doubt many people try to install a server O/S on their laptop).
Discouraged, I did a quick search and found a post from my colleague Keith Combs discussing his experience installing Windows Server 2008 EE on his Lenovo laptop. Amazingly, Lenovo laptops have the same Intel wireless adapter as the Dell; furthermore, Lenovo has also published the device drivers!
To make a long story short (too late, I know), I was able to download and install the Lenovo drivers on my Dell. Thus far (it's been about two hours) everything seems to be working perfectly!
Gotta love OEM!
Hopefully this saves a poor soul from a couple hours of digging. Good luck!
I have been meaning to post an update on the book, but with the new job and move to Illinois it's been difficult to find the time. Since Max mentioned on his blog that the Professional Commerce Server book to be published by Wiley (aka Wrox) has been canceled, I think it's appropriate for me to take the time and add a few details.
Fundamentally, the book was canceled because it was not completed in the allotted timeframe (nor the extended timeframe). Throughout the process we were extremely committed to producing a high quality programming reference. Writing a professional-level book of this kind—especially for a product as vast and powerful as Commerce Server—takes a significant amount of time and sacrifice. I personally spent most of my evenings and weekends over the last year holed up in my office, working on the book; I know that the other authors similarly sacrificed a lot of their time. Nevertheless, the book continued to fall behind schedule until it was canceled. Wiley was very understanding and supportive throughout the entire process, but in the end things ultimately did not work out. (I would personally like it to be noted that I do not begrudge Wiley at all. Everyone I worked with at Wiley was extremely committed to seeing this book published, and I know that they were all disappointed with its cancellation.)
A big apology to all of you that have been excited about the book and awaiting it's release. As I mentioned, a lot of time and effort has been put into this book, and that Wrox will not publish it is definitely a disappointment.
Having said all this, I have a question for you: what should I do with all the content written for this book?
As Max alluded to on his blog, I plan on making the content produced for this book available one way or another—right now I'm trying to figure out the best way to do this! Currently I have around 800 pages and 24 chapters of content in various stages of completion.
Given that I know that there's been considerable interest in the community to have this book (and that I don't want to see all the hard work put into it wasted) I can think of a lot of things I can do with the content. At the moment, though, I prefer the following two options:
- Find a new publisher to publish the book. This would give the community the traditional book, but it would also probably be at least another six or seven months before anything is available. The scope of the book would obviously have to change, given that we're sure to see a lot of updates regarding product roadmap.
- Self-publish the book. This would give me a lot of freedom with regards to the publishing of the book, and means I could probably start making content available very soon.
I'm leaning towards the latter of the two choices, although I know very little about self publishing books. If you have any comments or thoughts on this, please feel free to let me know either through comments on the blog or via e-mail (blog@wadewegner.com).
Rest assured that somehow I will make this content available! Stay tuned for further details, hopefully to come in the next week or so. Thanks for your support!
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.
File Loading
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:
1: <script type="DLRJScript" src="/somefile-on-the-server.js"> 1:
2: function doSomething()
3: { 4: // Code found here
5: }
</script>
JS Performance
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 project over on CodePlex. The test simply adds 15 <hr /> 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).
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.
The Future
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).
Step 1 - Make Assumptions
Result - No more pesky client!
For those of you who have known me for a while or have followed my blog for any length of time, you should know that I am rather adamant about customer service. I believe that it is the one aspect of our industry that is in desperate need of serious attention. There is one skill that all of us who ever have to deal with clients (or managers, or peers, or direct reports, or spouses, or friends, or - well you get the idea) need to master. It’s the art of listening. let me give you an example of how important it can be.
I was recently involved in helping a friend try to win a project for his struggling consulting business. He was one of two finalists for the contract and was asked to come in and present his solution for their application. The problem was that the RFP for the work was very vague. It gave a general idea of what the client was looking for but left out some critical pieces of information he needed to give a good presentation on the matter. Having lived the life of an independent contractor, he asked me if I had any advice for him. I told him the best presentation that he could give them was one that he didn’t prepare. As it turns out, I was right. My friend was up against a big company for the work and believed he had no chance of winning it, so, even though he thought I was crazy, he took my advice and went in without a prepared presentation but rather armed with a few simple questions about their business need and processes. This started a dialog and allowed them to see his problem solving skills in action. The other company took the RFP, made a list of assumptions and went in pitching a solution that in the end completely missed the mark of what the client was looking for. End result, my friend has a new contract that should keep him busy for the next year or two.
Chalk another one up to good customer service!
Over the past couple of days, one of the MVP lists has had some activity about LINQ (which is pretty common these days), and one of the threads meandered into using LINQ on DataReaders. The problem is that LINQ works on IEnumerable sources, but DataReaders don't implement that. Fortunately, it's easy to do, and several people out there have come up with various solutions, including Jim Wooley in this article of his. The basic gyst is that you can you create an extension method on IDataReader that serves as an Enumerator.
However, Jim encountered two problems. He is returning the data one row at a time (which is the point) but as an array of object. So first, he's worried about performance. This is a valid concern considering the boxing/unboxing implications for all value type columns as well as the fact that a LINQ statement might try to grab those values several times (for sorting, as an example). Secondly, because all you have is an array of object that represents a row, you reference each column of the source as "row[0]" and "row[1]", etc. - basically, you don't get to use nice column names in the SQL.
The way to fix both these problems is to have an object that represents the row, complete with specific and type-safe fields (properties if you want to get technical and PC). Then, you need a way to convert each DataReader row to an instance of the row class. Expanding on Jim's example, here's what I came up with:
C#
public interface IReaderRow
{
IDataReader Reader { get; set; }
object GetRowData();
}
public class TimeZoneRowReader : IReaderRow
{
public IDataReader Reader { get; set; }
public object GetRowData()
{
return new TimeZoneRow()
{
ID = Reader.GetByte(0),
Name = Reader.GetString(1),
Description = Reader.GetString(2)
};
}
}
public class TimeZoneRow
{
public int ID { get; set; }
public string Name { get; set; }
public string Description { get; set; }
}
public static class DataReaderExtension
{
public static IEnumerable<T> DataReaderEnumerator<T, TReader>(this IDataReader source) where TReader : IReaderRow, new()
{
if (source == null)
throw new ArgumentNullException("source");
IReaderRow rowReader = new TReader() { Reader = source };
while (source.Read())
{
yield return (T)rowReader.GetRowData();
}
}
}
As you can see, the LINQ statement is now typed and has intuitive and descriptive names for the columns. The downside, of course, is that you need a class representing each type of possible result, and a way to translate the DataReader data to that row instance. You can combine the row class with the specific row reader class, but I simply chose to keep them separate. Strangely enough, this starts to feel like LINQ to SQL or LINQ to Entities at this point, but it's a way to solve the two other problems I mentioned earlier. In the end, the LINQ will now look something like this:
C#
listBox1.Items.Clear();
using (SqlConnection cn = new SqlConnection(connectionString))
{
using (SqlCommand cmd = new SqlCommand("Select * from TimeZone"))
{
cmd.CommandType = CommandType.Text;
cmd.Connection = cn;
cn.Open();
using (SqlDataReader dr = cmd.ExecuteReader())
{
var queryResults = from timeZone
in dr.DataReaderEnumerator<TimeZoneRow, TimeZoneRowReader>)
where timeZone.ID > 0
orderby timeZone.Name descending
select timeZone;
listBox1.DisplayMember = "Description";
listBox1.DataSource = queryResults.ToList<TimeZoneRow>();
}
}
}
If you search around, you'll see quite a few other solutions (some of them in community projects) for using DataReaders as LINQ sources, although they all seem to have some of these aspects in common. The really interesting stuff is when you start to think along the lines of using combinations of IL Emit and anonymous classes to create all these row-related classes automatically (the schema is available on the data reader, after all). However, without getting too tricky, it's tough to find a way for C# or VB to interpret the results in design time so you can still maintain the intellisense and column names without resorting to something like code generation.
Ok, so you probably are reading this via RSS (most people do), so instead of forcing everyone to come to the site to see it; here’s a screen shot (IE7 although all other major browser see it just the same)
Anyway, we are now using SubText (the blog software I originally wanted to use). There’s a gory story for why we are here now which I’ll save for a rant later.
The only real thing you need to be aware of is that if you want your picture to appear in comments register your email address with Email2face.com.
An interesting side note is that I’m currently putting this on my dev site, so it will be available after we switchover later today. I’m pretty scared about this as I know I have at least one more thing to fix (Images -- which is the real reason why I have an image on this post). Hang in there it may be a bit of a bumpy ride.
Ok, so you are probably wondering what the heck is going on at TRT (TheRunTime). Well, we are changing blog software. I told the guys that I was doing it (and it's taking me longer than planned), and I'm guessing that everyone is either busy or is holding off on posting until I finish my conversion.
Should be a matter of using the BlogML stuff, right? Well, it would be if I could produce a BlogML file for my blog (which when I transferred from CodeBetter was over 10mb... I know that doesn't sound like much, but evidently there is a lot of processing going on there).
The other problem was that I pushed a couple blogs on our dev site and ran into another weird problem (probably with our new software's BlogML input routines). I moved Wade's blog over and then Rob's (and I should have gotten interspersed entries... I ended up with Rob's entries appearing more recent than Wade's).
So I'm writing SQL to do out conversion... too many issues with BlogML for me.
Anyway, please bear with us. I hope to have the new software up and running in the next few days.
We'll sport a new look as well, so if you hated the old look (and many of you hated what it did to your browser), be ready, you'll be able to use the new site again (that is if you read our site on anything but an RSS reader).
BTW, we are switching to SubText (since I now have Jacob to yell at if something doesn't work; he's on the SubText team)... there's a longer story behind why we are leaving Community Server which I'll blog about after I get the new site up.
I'm almost embarrassed to put this up because it's so small, but it's something I used to do all the time and had reason to have to re-learn it recently for something I was doing.
Sometimes -- at least until I find a better way -- I need to be able to get "editable" debugging text out of javascript. Using the "alert" box doesn't work for this because you can't do the ctrl-c trick to get its text. (For some message boxes, you can hit ctrl-c and it'll copy the contents such that you can put it into notepad.)
Anyway, the javascript below will cause a new window to open and will write whatever you want into it. Then you can do whatever you would normally do with what shows up in IE windows. FYI, the contents of the open() method is a double-apostrophe for a required parameter that nevertheless can be empty.
window.open('').document.write('your text here')
I want to ask you to stop trying to tempt me to come join your company unless you want to make some changes to your corporate policy. I love a number of your company's products and really would want to work for you except for 1 thing: Redmond, Washington (or anywhere that isn't my chosen location).
Don't get me wrong. I'm all about team dynamics and think that the team needs to get together (I had a recent contract where I spent a few days in the office, but I worked most of the time out of the office in my home office). I stayed connected via email, IM, and telephone (I do have Vonage, so calling the office is free). When I say I worked remotely, I mean I worked on my corporate machine which was located in the office. One week a month in the office is something I think should be a dynamic you guys need to figure out (and yes, I know it depends on what the person is doing, and, no, I have no idea what Scott Ha or Phil Haacked do on a day to day basis.. my vision is that they hack on code... which is probably wrong).
I keep seeing ads or PM's advertising that they are hiring, but when I inquire the answer is always "you'll have to move to Redmond" (or California, or North Carolina). I know you guys love Redmond and think Washington State is beautiful. I have been there and the environment is much like the state I grew up in (Ohio)... I moved away from there like 10+ years ago.
You may say California is great. The weather in Southern California is very similar to my current home state of Florida (except it's cheaper to live here), and much of my family is all settled in here; besides my wife loves it here.
I'm sure there are other techies/programmers out there like me. I know I'm not some hot-shot programmer (I bet some of them are), but I have done some interesting things with your software, and keep thinking I could contribute something, but I won't move... so quit tempting me! I want to say yes, but I can't until your policy changes.
Thank you!
Jay Kimble
In the next week or so I will be releasing a new version of my DLRScript. It will have external file sourcing/loading via the src attribute (I have that working right now). I would release it today except for 1 issue.
what is in the file is this
//JS:
jsapi.alert("Hi JScript here");
#Python
jsapi.alert("Hi Python here")
#Ruby
$jsapi.alert("Hi, I'm Ruby and YOU are NOT!")
Here's the issue. I think I discovered a bug (in my code). When you try to launch multiple alert boxes you get 1 of them and errors for the rest. Which makes sense to me (as you the user need to click the button on one of the Alerts. I will correct this.
I also discovered another subtle little issue that I want to account for. The problem is that since we are moving code Asynchronously there are multiple threads involved. My current development executes code as it gets code back, but it should execute this stuff in the order it appears on the page (I'll be correcting that one too)
Probably the next week or so, and then I'll be moving forward on my other ideas (most notably the Object Model).
Ruby DOM??
While I'm on the subject of Object Models, I had some discussions with some friends to see if I should duplicate client-JavaScript's DOM model or if I should create something else.
The wisdom from both seemed to be that duplicating client-JS' DOM for JScript and Python would be good, but you Ruby guys would something that is Rubyish (no, not rubish... I said Rubyish). I was wondering if I might get a Ruby programmer to help me understand what that means (cause neither of my friends can answer that question).
So here is the question. If you had the ability to write Ruby code as a client language (and you can with DLRScript) what would the framework look like?
One of the first things I really hammered with .NET 1.0 back in late 2000 was P/Invoke. I was used to Java, but IMO, Java always had a fatal flaw - language design hubris. Java is perfect, and C is garbage, therefore, everything should be converted to Java, or so it seemed anyway. That philosophy trickled down to how Java used existing C code - JNI (at the time) wasn't a way for Java to call C code as much as it was a way for *YOU* to write a "clean" and extensive wrapper worthy of being called by Java so that Java wouldn't have to dirty its hands with the "bad" C code. At the time, I was extremely skeptical about .NET, but one thing I did like is that it readily admitted that the enitre world was not in .NET and there was plenty of "legacy" code written in C that was.. *gasp* ... usable and useful! Furthermore, it cooperated with said C code and even had a very simple (relatively speaking) way of calling it. But a lot of people weren't used to P/Invoke, although it was similar in concept to using Declare statements in VB (just more powerful). I was really taken by how comprehensive P/Invoke was, but people who weren't used to looking at C code had a hard time translating calls. I remember writing a little tool called P/I-Spy that would take C function prototypes and convert them to P/Invoke, or do the same work via a step-by-step wizard that allowed you to describe the call. The problem is that I wanted to create a comprehensive database of calls for the Win API, and I just didn't have the time, so I was happy when someone else took up the mantle and created http://pinvoke.net. At that point, I let the tool slide completely and have never touched it since.
However, Microsoft just launched a tool of their own. You can find it here: http://blogs.msdn.com/vbteam/archive/2008/03/14/making-pinvoke-easy.aspx, and it has some really cool features, among them, the ability to convert volume code.
I was reading a very interesting post this morning: http://codebetter.com/blogs/james.kovacs/archive/2008/03/13/using-yagni-responsibly.aspx
and I want to start by saying that I whole-heartedly agree with James at the heart of the matter. YAGNI, when intelligently applied, is not just an excuse to do stupid simplistic things. But that got me thinking (again) that YAGNI itself is probably an inadequte piece-of-jargon-turned-tool that encourages some people to use it "unintelligently". My motto is that if something isn't providing consistently good results, then there's probably something wrong with it, so here's the gist of my thoughts:
I think the problem with YAGNI is that as a concept, it works more like a binary switch. It encourages people to think in Yes or No options and concentrate on a single vector of a multi-dimentional problem. By "intelligently" applying YAGNI, the focus should really be on providing the most effective and efficient (i.e. simplist) solution that can solve the problem given all the goals that must be met. This is not a "yes I need it", or "no I don't" question - it's a question that begs us to consider a range of alternatives and evaluate them based on (not just complexity) but R.O.I, maintainability, and likelyhood of change and stability, among other factors. At this point, some agilists might argue that we're trying to do too much design upfront by taking all this into account, but most of these factors can be very quickly assessed in a matter of minutes on a "good enough" basis, which is really in keeping with the spirit of Agile, IMO. YAGNI is just a simple(istic) way of terming it, but perhaps it's too simplistic and encourages us to evaluate only one vector (complexity) of the problem that really has other dimensions that need attention. I honestly think it hurts the process to give jargon undo weight. A person who uses YAGNI intelligently is actually taking those other factors into account, so perhaps YAGNI as a concept is just putting too much focus in one area for those who are more prone to simply use the jargon at face value as opposed to "intelligently" applying a tool, which is starting to make me wonder if it's actually a good tool to begin with.
Just a quick announcement. My DLRScript (use DLR Languages in Script Tags via Silverlight 2) project just released a new version with a new language: Ruby.
I'm really excited to have this working. As I get time watch for more improvements.
Bertrand Le Roy has an interesting post called "a case for partial rendering." I started to comment and realize that I quickly had a full post, so I thought I would comment here.
-------------------
When I do MS Ajax trainings (I am actually getting paid to do these by ASPSOFT who handles the actual trainings... we will be announcing one in the next month that will be open for the public to register), I like to do a best practices talk.
In that session, we really dig down into the UpdatePanel and what's really going on. I try to teach my students not to skip the UpdatePanel, but be targeted with it. So "don't wrap the entire page in an UpdatePanel, but use several if necessary and use filters, and most importantly if something else like a control from Ajax Control Toolbox fits what you are doing look at that closely. In the demos, I start with a fairly simple form with combo-boxes that auto-postback feeding data to the next combo (with a final message at the end). Next we move to an UpdatePanel and then to a combination UpdatePanel and Cascading Dropdown Extender (from the Ajax Control Toolbox and then ultimately because the demo is fairly simple, I drop them into an PageMethod for the last retrieval of data.
So in the demos, we analyze the amount of bits flying back and forth. When I get done with all this, I tell the class that I'm not saying avoid the UpdatePanel, but to recognize it as a tool. I teach them to be aware of other controls in their toolbox. Of course, there is always the situation where you are in a hurry because of a deadline, and you need to finish. In those situations, I tell them it's OK to use the UpdatePanel... just realize that it's not always the "best" solution.
I've had situations where I've been asked for advice on how to handle Ajaxifying a rather complex form. In the situation I'm remembering right now, the deadline was past and I told the person who was looking at it that just use the UpdatePanel... the amount of effort expended in to trying to be optimal was wasting precious time.
So when I used the phrase "best solution" above, I meant more of an optimized situation... the UpdatePanel does work and can be used really effectively.
I think what Bertrand is hearing is a situation that some authors are overreacting because they are afraid people won't think when approaching a problem (because they generally don't) and just use UpdatePanels everywhere (because it's easily used).
I ran into this because I wanted to do something funky. I wanted my Flex app window to change PageStates (and size) whenever the TabIndex changed. Whether doing this kind of thing is wise in a user interface is yet to be seen -- I did it and it even strikes ME as a bit off the wall -- but it did solve the immediate issue. The immediate issue was that some of my tabs required a lot of space and some did not. This left a lot of ugly whitespace.
So, I figured, Flex (Actually Flash under the covers) must have an event handler for changing tabs. And I was rewarded very quickly: There is a "TabIndexChange" inline event handler. For the uninitiated, such a thing looks something like this:
<mx:TabNavigator id="tabnavigator1" tabIndexChange="myHandlerFunction()">
With most other events, this works just fine: When the event fires, the handler is called. But it simply doesn't work in this case. The handler function is never called.
There's a couple of ways to handle this. One way is to use a TabBar control rather than a TabControl. The TabBar basically gives you the look and feel of a tabset but more control over what is tabbed. And the tabIndexChange even calls the handler as one might expect.
I didn't want to do it that way, however. For one thing, I'm stubborn. For another, I already had all my controls arranged on the TabNavigator and I didn't want to rip it half to pieces to get functionality that I should already be getting.
Fortunately, there's a solution: Explicitly declare an event listener. That looks something like this:
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="InitApp()">
<mx:Script>
<![CDATA[
import mx.events.IndexChangedEvent;
private function InitApp():void
{
tabnavigator1.addEventListener(IndexChangedEvent.CHANGE,indexChangeHandler);
}
function indexChangeHandler(event:IndexChangedEvent):void
{
this.currentState='HideReminderEntry';
mybutton.label=tabnavigator1.getTabAt(tabnavigator1.selectedIndex ).label
// if (event.triggerEvent is MouseEvent)
// recordAutomatableEvent(event, false);
// else
// recordAutomatableEvent(event.triggerEvent, false);
}
]]>
</mx:Script>
Important things to note:
- The handler must be declared in code, and it should run when the page load is complete. So, in the mx:Application tag, there is the inline event, creationComplete="InitApp()".
- Any function name can be used here, but InitApp() is by convention.
- You'll need the "import mx.events.IndexChangedEvent," or you'll get a class-not-defined error.
- Wire up the event listener with:
- tabnavigator1.addEventListener(IndexChangedEvent.CHANGE,indexChangeHandler);
- Finally, as a very small bonus (I'm learning all this too), there's the commented code talking about "if (event.triggerEvent is MouseEvent)". So it turns out you can distinguish between whether the event occurred as the result of a keyboard event (likely Tab), or as a mouseevent. I don't see a use for it here, but it's applicable to ALL events, including, say, Focus() events, where it might have some use. Flex -- actually, ActionScript, its programming language -- is really nifty.
FYI, as a parting note, as far as I can tell SilverLight is intended to be a direct competitor to Flex. Flex has somewhere around a seven-year head start. Don't count Microsoft out, of course -- how many people really use Netscape anymore? -- but on the other hand, you never hear about J++ anymore either. Bottom line: Those who are considering SilverLight should also consider Flex. It's incredibly robust, easy to use, has a full-featured IDE that includes powerful debugging capabilities, and there's lots of great resources on it to help people learn. I've been using the videos at Lynda.com. In fact, watching one of them got me over the hump on this issue. So, I recommend Lynda.com wholeheartedly.
In the process of updating my DLRScript project to Silverlight 2.0 beta 1, I discovered a few annoyances.
Missing HTML page
The first one is that when you create a Silverlight application, it prompts you to create an extra project (a web project) for hosting your Silverlight app, create an HTML page within the Silverlight application project for hosting the control, or manual/no test host page/project (aka I'll do it myself).
When you take option 2 (create an HTML page within the project), the page seems to be missing. This is especially difficult for a project like mine where Silverlight is being used to extend the HTML DOM model. The page is there... it's hiding in the client bin folder (or it will be once you build the project).
BTW, if you take the first option (which my DLRScript project takes), the HTML page will also be created in a more obvious location.
OnPluginLoaded -- and HTML pages
The second one is something that I know I'm not alone in (and I actually responded to someone in one of the forums once I had resolved the issue). You'll run into it (well, until they fix it).
Here's the issue. When you read the docs regarding setting up communication between your Silverlight app and JavaScript, you'll find references to the OnPluginLoaded event. You will even see example's using the ASPX server control. And, it works with the server control with no issues, but the moment you try to figure out where to hook it in a standard HTML app you will have issues. Here's why? The event doesn't really exist... well, that's not really true. The event's real name is onload, and it's attached to the object tag. You would think that you could hook it up via the onload attribute, but it doesn't work
In my code, I used a very "hacky" mechanism (but it works). Here it is:
1: var ctlID = "Xaml1";
2: var onLoadFunctionName = "someFunction"
3: var jsSupportControl =document.getElementById(ctlID);
4:
5: // very much a hack, but it's the best I can do to enable both ASPX, and regular HTML access
6: if(location.href.toString().substr(location.href.toString().length-4).toLowerCase() != "aspx") { 7: setTimeout("jsSupportControl.onload = " + onLoadFunctionName + ";", 1); 8: }
BTW, my script gets loaded at the bottom of the page --after the body tag.
I hope that helps
The full text of the error is:
Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.
I got this error when I built a gridview and did a databind for that control in the Page_Load event for the page. The databind() fired every time Page_load fired -- including on postbacks. I fixed the problem by making it so that I only do the databind on initial load of the page, e.g., when "IsPostBack" is false. The gridview's values are otherwise preserved in ViewState.
What's probably going on is this. The gridview's RowCommand event, which handles the postback event in this case, fires after the page's Page_Load event (naturally). So, in the error case, I was destroying and rebuilding the control on postback. So .net then compared the control that fired the postback to the "new" rebound control that was going to handle the postback event, and decided that they were different, and got haired up over a suspected cross-page scripting attack, hence the error message.
FYI, setting "enableEventValidation=false" as cautiously suggested by the error message doesn't work. The error goes away, but the postback event doesn't fire -- probably because this doesn't resolve the underlying issue, that .net is confused about what control is supposed to be handling the postback. In all likelihood, .net basically doesn't find any handler for the postback event, and it drops out.
So, the way I resolved this is, I no longer allow the control to be rebound on EVERY page_load. I only rebind it on the initial page_load, that is, "if not IsPostback." I don't have to rebind the control on every postback anyway, since its full state is maintained in viewstate.
[I know there are probably 1,000 blog posts about this stuff, but it was too impressive to me not to make any comment at all]
I watched about an hour of the Mix08 keynote today (I'm in Florida... not in Vegas)... I didn't see everything (yet)
There were a couple things that made me say, "Dang, this SilverLight 2.0 thing is going to be bigger than I thought!"
Let me put things in my own order of importance.
1) NBC is building what will be the largest Video On Demand/Live Video/Heck let's just the say the biggest video site ever for the Olympics. That sounds boring to me... But what they are doing is interactive video. If you watch live you get options to watch picture in picture (so 2 videos at once), or instant replay, or be your own director by picking which of the 3 live cameras feeds that you want. They actually have plans for a number of community features. Their whole site will also appears to add lot's of additional side features. I predict that most people will watch the Olympics this way, and the ability to pick video from any of each day's 22 hours of events. Way, cool.. They said it will happen in 130 days. I predict that this will cause Silverlight 2.0 to get installed everywhere!
2) The first two demos where the design guy/Double Click guys wired up ads to video offerings and they added ads with no programming. They also added little animated banners underneath video, etc. I thought this was the future of advertising to me. It scares me a little, BTW.
3) The AOL demo was what I already knew was coming, but it was cool to see someone do it. I knew that having form controls was going to be huge! This was also true of the Aston Martin guys, and the Hard Rock demos.
You can catch up on it (and other mix presentations) over at visitmix.com.
I skipped blogging about the last release mainly because I have been busy trying to find work (as well as preparing for a training I'm doing this month). Anyway, I thought I should put out a little update, so my readers know that I have made a new release.
New Language!
If you've seen the download page you will notice that I have a new language, and no, it's not the language I wanted to add. It's not Ruby. I figured out how to get DLR JScript (and I'm calling it that so as to not confuse it with JavaScript the client-side code -- which exposes some objects to DLRScript)
Object Cleanup
With the last release I cleaned up a little code, and renamed the DomHelper object to jsapi. I'm still not 100% thrilled with that name, but for now it works. Basically this object exposes certain DOM functionalities to DLRScript languages as well as exposes a couple JavaScript (client-side) functions/features like alert, confirm, prompt, and eval (although the latter still seems to be working a little strangely). I will be adding setTimeout/clearTimeout once I have the time. They are there, but not very usable (or useful). You can probably use setTimeout, but won't be able to stop it, and only against client-side (non-DLR) JavaScript functions. At some point I'll make it possible to hook up your DLRScript language's functions to setTimeout/clearTimeout
I also felt like I should respect the camel-case of aspect of JavaScript, so I switched the functions to camel-case (first character is lowercase then the first char of each "word" is uppercase).
Additional Object abstraction
I normally wouldn't do this, but I needed to do this so I could begin to introduce a few streamlined properties. Here's the objects:
You can probably guess that HtmlObject is a parent to the other two (and you would be correct). One of the things I introduced was a cross-browser "text" property for all objects returned from a getElementById (or the document object).
This also let me enable a number of pieces of functionality you would fully expect (stuff like attaching/detaching events, adding/removing new elements/attributes, reading/setting properties/tag attribute/styles, etc.
I will eventually start beefing this up so that you don't have to resort to using the function to read a property (or to read a style)
What's next?
Well, I really, really, really(!!) want to get IronRuby working. I'm hoping that after Mix08 that should be a little easier to do. Once I do that then I think I'll do a little bit of work on the object model, and will start looking at adding things like communications support. I also NEED to get the script tags to load DLR scripts from the web server (and more importantly cache them!)
I also want to test inter-language communication... maybe Python is better at a task then say Ruby (not sure, so don't be shooting me over the comment), but you want to create more of a DSL (which Ruby is stellar at)... You could potentially write some functions in Python and use them from Ruby.
So basically I have my work cut out for me... Oh yeah, the DLRScript Project is here. It comes with a couple sample files for you.