If you’ve ever used a tool like Yahoo!’s Yslow to analyze the performance of your web application, you’ve probably run into the recommendation that you should put your scripts at the bottom of the page, unless those scripts insert page content (a good example of this, which we’ll see later in this post, is modernizr.js, which dynamically adds support for semantic HTML5 elements to older browsers that do not natively support them).
Unfortunately, if you use the default MVC 3 templates in Visual Studio 2010, things like the script reference for jQuery are added in at the top of the page, in the <head> section of the document. This works fine, but may potentially delay the loading of the page while the external script is downloaded and loaded. You could, of course, manually move the script references each time you create a new project, but this would result in unnecessary duplication of effort. Continue reading Make Script Performance Automatic with Custom Templates in Visual Studio 2010
June is a big month for user group anniversaries, apparently. A couple of local groups are celebrating anniversaries this month, the first being the Rockville .NET User Group, which is kicking off its 5th year. As has become the tradition (I’ve only missed one year), I’m speaking for the 5.0 release, and I’ll be talking about Microsoft WebMatrix and the Razor view engine, and why they’re relevant to you, even if you’re a professional developer.
Continue reading User Group Anniversaries – DC .Net and RockNUG
UPDATE: I was informed by Sebastien Ros from the Orchard team that some of the code below exposed an Cross-site Scripting (XSS) vulnerability by writing out the raw value of t.TagName to the markup to be rendered by the alternate template. I’ve updated the listings (and my blog) with some code/markup suggested by Sebastien that both simplifies the code and takes advantage of Razor’s built-in HTML encoding when using the @ block syntax. While the risk of an XSS attack on the tags is relatively small, it’s always a good idea to apply HTML encoding to your strings before rendering them. My thanks to Sebastien for catching that.
One of the first things folks typically want to do after they install Orchard CMS is start customizing the look and feel of their site or blog. The easiest way to do this, of course, is to install one of the themes available from the Orchard Gallery. One theme in particular, The Theme Machine, is designed to facilitate customization, and in fact there’s a whole section of the Orchard documentation devoted to the subject of customization based on The Theme Machine. There are also customizable themes that you can purchase from the folks at http://bind.pt/ (my theme is a custom version of one of theirs).
Continue reading Customize Orchard CMS with the Designer Tools Module
When publishing a blog with Orchard CMS, the blog module includes default RSS feeds for the items as well as for comments. One limitation of the default implementation is that the feeds only show up when you navigate to the main blog page, or to a post within the blog. Other pages in your site will not make the feed url(s) available.
Continue reading Enabling RSS Site-wide in Orchard
I just finished watching the press conference announcing many of the new features that will be coming with the next release of Windows Phone, codenamed Mango, this fall. I have to say that even as a somewhat jaded insider, I am very excited about some of these features, and several of them were a complete surprise (which is a testament to the ability of the Windows Phone team to keep things under wraps). Among the new stuff announced today Continue reading New Features in Windows Phone “Mango” – with Video!
I had set this up before, but during the process of moving my blog to my devhammer.net domain, I wanted to enable the use of bit.ly-shortened links using my bit.ly API key with the excellent Twitter Notify plugin for Windows Live Writer on another machine. It was easy enough to find a couple of links to the process using Bing, but I also ran across this post from Scott Lovegrove (who is also the author of a nice backup utility for Windows Live Writer) Continue reading Using bit.ly with the Twitter Notify Plugin for Windows Live Writer
As many of you may be aware, you can only have one version of Internet Explorer installed at any given time (the exception being that the IE Platform Previews are able to install side-by-side with a released version of IE). Given this, Microsoft has for some time provided virtual machines for the purposes of testing applications against different versions of Internet Explorer.
Recently, the eXtreme. tech. blog on blogs.technet.com announced the availability of updated VMs for app compatibility testing. Here’s the announcement Continue reading New Internet Explorer VMs for App Compatibility
During the process of creating a new Orchard CMS-based blog, I wanted to future-proof my RSS feed. Most blogs have RSS feeds that are effectively hard-coded to the domain/url of the blog, meaning that if you ever need to move your blog to a different domain/url (which I’m now doing), you end up breaking your feed for current subscribers.
The only real solution for this today is to use Feedburner, which effectively abstracts the URL for your feed from the actual URL your blog uses to access the feed. Subscribers use the feedburner version of the URL (in my case, a custom domain version, http://feeds.devhammer.net/devhammer) instead of the direct URL, and feedburner provides the mapping to the actual location of the feed. This also enables feedburner to provide stats on subscribers, click-through, etc. (assuming you’re comfortable with providing that information to a third party, Google, that now owns feedburner…whether that trade-off is worth it is up to you). Continue reading Troubleshooting a Failed Orchard Module Install