Archives
-
Resizing images from the server using WPF/WIC instead of GDI+
I and many others have written about resizing images using GDI+, or rather its .NET façade, System.Drawing. It works. But there is just this one sentence at the bottom of the documentation:
-
More on medium trust: what permission are you missing?
Yesterday, I asked some questions about your usage of medium trust. Thank you all for the great answers and comments (but don’t read too much into that, I’m just playing with stuff). If you haven’t answered yet, feel free to do so.
-
How important is medium trust to you?
I would be very grateful if you could drop me a note in comments answering the following questions:
-
Orchard team looking for a new developer
My team is looking for a new full-time developer. The project is to build a completely new open-source CMS based on ASP.NET MVC 2. It’s a lot of fun :)
-
Enabling the ASP.NET Ajax script loader for your own scripts
In previous posts, I’ve shown different ways to build a client-side class browser, using the ASP.NET Ajax Libary and jQuery.
-
PDC week! Panel on OSS + ASP.NET
I’ll be at PDC tomorrow, Wednesday and Thursday. If you are attending and want to say hi, you’re most likely to find me in the Web Pavilion (in the big room, next to the Surface lounge).
-
Metrics in software and physics
Every so often, somebody points out how bad of a metric code coverage is. And of course, on its own, it doesn’t tell you much: after all, it’s a single number. How could it possibly reflect all the subtlety (or lack thereof) of your designs and of your testing artillery? Of course, within all the various *DD approaches, some better than others enable you to know whether or not your code conforms to its requirements, but I thought I’d take a moment to reflect on the general idea of a software metric and how it relates to the mothers of all metrics: physical ones, cause you know, I used to be a scientist. Proof: the lab coat on the picture.
-
JavaScript class browser: once again with jQuery
I’ve already posted twice about that little class browser application. The first iteration was mostly declarative and can be found here:
http://weblogs.asp.net/bleroy/archive/2009/09/14/building-a-class-browser-with-microsoft-ajax-4-0-preview-5.aspx -
How to render the same template on the server and client with minimal redundancy
Last week, I wrote a post about how the new Microsoft Ajax Library Preview 6 made it a lot easier to write unobtrusive and imperative data-driven applications. Because for the previous preview, I had written a cool little class browser using a declarative style, I thought it would be nice to rewrite this in a completely imperative way. The mistake I made though was to call it unobtrusive. Never mind that ‘unobtrusive’ is a perfectly well-defined word that actually existed way before JavaScript. ‘Unobtrusive JavaScript’ has a very specific meaning that people feel strongly about. To be worthy of that label, an application must basically conform to (at least) those two requirements:
-
Entirely unobtrusive and imperative templates with Microsoft Ajax Library Preview 6
Today is the release of the sixth preview of Microsoft Ajax Library. Don’t get fooled by the somewhat silly and long name: this is a major release in many ways. The scripts have been majorly refactored since preview 5. Check out the other posts out there (links at the bottom of this post) to see just some of the many new features that are in there. Some of my favorite are all the small improvements that have been made to make imperative instantiation of components and templated contents easier than ever. Many of you have told us that you preferred to do things imperatively and this release makes it a lot better.
-
HTML now a data format
About a year ago, I asked the question on this blog whether HTML could and should be used as a data format:
-
Ajax Control Toolkit: new controls, bug fixes
And we have a new release of Ajax Control Toolkit. I didn’t work on this one but there are some nice things in there nonetheless :)
-
Fun with C# 4.0’s dynamic
There’s been some debate recently on the new “dynamic” keyword in C# 4.0. As has been the case with many features before it, some love it, some hate it, some say it bloats the language, yadda yadda yadda. People said that about lambdas. Me, I’ll just use it where I see a use case, thank you very much.
-
Why Guitar Hero is dead to me
I bought the new Guitar Hero 5 because I needed a new fake plastic guitar and Activision’s guitars are the best that are not outrageously expensive. The Rock Band guitars I just can’t stand. So as I was going to buy a guitar from them, I thought I might as well get a (couple of) cheap game(s) with it.
-
Building a class browser with Microsoft Ajax 4.0 Preview 5
The Microsoft Ajax Library 4.0 Preview 5 is the first release of Microsoft Ajax that I didn’t participate in: I left the team a few months ago. But that doesn’t mean I don’t love what’s in there, and I really do. And by the way I’ve also seen what’s in Preview 6 too and man that will seriously rock.
-
querySelectorAll on old IE versions: something that doesn’t work
In today’s post, I’m going to show an interesting technique to solve a problem and then I will tear it to pieces and explain why it is actually useless. I believe that negative results should also be published so that we can save other people from wasting time trying the same thing. So here goes…
-
How to install and configure Visual Studio Team Explorer
One of the challenging aspects of working with TFS as your source control system is very unfortunately the installation of the client software.
-
Walking the tight rope
I think today is an appropriate time to write this post, as Rob Conery is leaving Microsoft tomorrow. “Who?”, you might ask. Rob is the author of the excellent MVC Storefront and Kona series where he explored the challenges in building an MVC-bound storefront application. I’ve been working with Rob for a few months on the continuation of that, which will be the subject of this post.
-
A total n00b’s guide to migrating from a custom data layer to Nhibernate: so many choices
One of the great things about NHibernate is its vibrant community and ecosystem. So many people are using it or building other libraries on top of it that you can be pretty sure that there is always a reasonable solution to any problem you might face. Or several.
-
A total n00b’s guide to migrating from a custom data layer to Nhibernate: getting started
(Screencast can be found at the end of the post)
-
The symmetrical universe
-
Hiring for new super-secret project
Well, I guess it’s not so super-secret anymore now but these last few months, I’ve been transitioning from ASP.NET Ajax to a new project that aims at helping ASP.NET communities build Open Source applications on ASP.NET. It’s a lot of fun and the good news is that you can join in. We are hiring a senior developer:
-
Mocking indexer getters with Moq
This is a follow-up on that other post: Mocking indexer setters with Moq.
-
Tell me what smells in WebForms as a view engine
Don’t read too much into this, but I’d love to read your feedback on this. I’m compiling a list of stuff that smells in WebForms when used as a view engine in MVC.
-
Mandelbrot set in a twitcode
Kinik just published a pretty amazing #twitcode version of a Mandelbrot set visualization in JavaScript that Jacob Seidelin wrote.
-
A (less) simple include for ASP.NET
In yesterday’s post, I published the code for a simple include method for ASP.NET that I’ve been using in a couple of places, only to realize that it was fine for what I was doing but probably not very useful beyond that.
-
A simple include for ASP.NET
In yesterday’s post, I alluded to a simple include extension method that I like to use when I don’t care about designer support. In a comment, Andrew asked if I could share the code for it, so here it is.
-
Are Master Pages too complex?
Master Pages are a wonderful concept that as developers we highly value. It’s the sort of pattern that just looks like the right thing to do (to our twisted, concept hungry developer minds) and that even makes you wonder why we haven’t done it that way since the beginning of time (1990). For the record, master pages were invented by David Ebbo, who is behind a lot of the smartest things in ASP.NET.
-
You can do the TODOs today too!
If you’re anything like me, you probably litter your code with TODO comments, postponing random tasks for the sake of moving the project forward. And there is of course a non-zero probability that you are going to ship with those comments still in.
-
Mocking indexer setters with Moq
I quite like MoQ because it makes sense for me. Shamefully, I’ve always had some trouble understanding test code that was using mocks built with other frameworks. With MoQ, I can just grok it for some reason. It’s just super-clear to me. It doesn’t mean I have any idea how it really works but for now I’m just happy with the magic.
-
Why is ASP.NET encoding &’s in script URLs? A tale of looking at entirely the wrong place for a cause to a non-existing bug.
Several people have reported seeing errors in their logs that seem to be due to requests such as this:
-
Survey: Ajax usage among .NET developers
If you haven’t already and you are a .NET developer, please take a couple minutes and answer this survey, whether you use Ajax or not. There are a number of Ajax surveys around, but Simone’s is the only one that focuses on .NET developers.
-
Twitter contest: what can you code in 130 characters?
I just posted the following snippet on Twitter. The exercise is to write meaningful and preferably cool code that fits in a Twitter message along with the #twitcode keyword, which leaves 130 characters.
-
setInterval is (moderately) evil
JavaScript has two ways of delaying execution of code: setInterval and setTimeout. Both take a function or a string as the first parameter, and a number of milliseconds as the second parameter. The only difference is that the code provided to setInterval will run every n milliseconds whereas the code in setTimeout will run only once.
-
New release of the Ajax Control Toolkit
A new version of the AJAX Control Toolkit is now available for download from the CodePlex website. It contains three new controls:
-
Creating jQuery plug-ins from MicrosoftAjax components
We had an interesting discussion recently on the ASP Insiders mailing list and ended up talking about what cool stuff we could build on top of jQuery. Many interesting things were mentioned and it was a very useful discussion but one suggestion in particular struck my curiosity as it was something I had investigated before and that could be improved on with very little code.
-
Five gems of XBLA
What are your favorite XBLA games?
-
Glimmer: visually build jQuery animations and stuff
If you’re still intimidated by jQuery or DOM manipulation in general, if you need to quickly build web animations, if you’re more a designer guy, if you think tooling makes sense, or a combination of the above, you should probably check out Glimmer.
-
A blog on Microsoft Ajax client templates and data
Politian has a great blog series where he goes into the details of building a data-driven Ajax application using the new 4.0 client templates and data.
-
CSS isolation: there has got to be a better way
CSS can be a tricky thing. I’m trying to do something that I think should be pretty simple. Let’s say a page contains a section (e.g. an admin panel) that must be styled independently from the rest of the page, but consistently and predictably. The DOM and CSS for the main part of the page is undetermined (e.g. because it’s part of a user-defined theme). Of course, you could use iframes, which are about the only isolation mechanism in HTML but we can’t do this here because iframes are quite rigid in shape (they are rectangles), they make scripting the DOM more difficult and they pretty much require an additional round-trip to the server to serve their contents.
-
Quantum computing done right
I know as a good microsoftee I should be supportive of what my employer does no matter what it is, and I might get fired for this post, but Eilon’s latest article is wrong on so many levels I have to step up with whatever integrity I have left and fix this mess.
-
Some ASP.NET compiler black magic
In the work we’ve been doing with Rob on the Kona commerce app, our quest for extreme pluggability has led us to look at quite a few interesting features of ASP.NET compilation. Features I didn’t know about before Dmitry and David pointed them out for me. I thought I’d share…
-
asp:menu fix for IE8 problem available
Internet Explorer 8 is a unique release in the history of Internet Explorer in more than one way, but the decision to make standards mode the default means that authors of existing sites are impacted by it, if only to set the compatibility mode to IE7.
-
Some MIX talks
Stephen Walther just published links to the video, slides and sample code for his Ajax talk at MIX09:
-
Microsoft Ajax 4.0 Preview 4 now available
The Microsoft Ajax team made the fourth preview of the 4.0 version available on CodePlex. This is an important release because it enables the full client data story, complete with the ability to get changes back to the server automatically.
-
The PlayStation’s Flower power
Yesterday, I bought Flower for the PS3 and played it through in one sitting (the game is really short but still, couldn’t get my hands off the controller once I started).
-
VirtualAlbion using Deep Zoom and SeaDragon Ajax
-
VsDoc for jQuery 1.3.1 now available
John Resig tells us he just uploaded the VsDoc file for jQuery 1.3.1 to jquery.com. This enables IntelliSense for the latest available jQuery.
-
How to choose a client template engine
Disclaimer: I worked on the Microsoft Ajax 4.0 template engine, so my criteria are of course heavily influenced by our own design.
-
Alternating styles in DataView
A few months ago, I showed how you can alternate styles using CSS in a server-side ListView, by selecting the class depending on the remainder of the division of the data index by two.
-
How to reflect over a delegate’s signature
I’ve done some tricky work with delegates recently and I’ve had a hard time trying to reflect over the signature of a delegate type. I feel a little silly now that the solution to this has been provided to me by Eric Lippert. It’s actually quite simple, just reflect over the Invoke method:
-
Photosynth of the President Inauguration
Photosynth never fails to amaze me. Check this out!
http://www.cnn.com/SPECIALS/2009/44.president/inauguration/themoment/ -
JavaScript Behavior Sheets: an experiment
Here’s a little experiment. I’m really after feedback on this one as I’m trying to decide whether this is a good idea. It’s also entirely possible somebody else did this before. That would be good feedback too. Anyway, here it is.