I’ve created an (arguably) bare-minimum Visual Studio 2010 Template for getting started with MVC 3 Preview 1 using the Razor view engine and some other web goodies. I got tired of the vanilla “Welcome to MVC” homepage and I’m not a fan of the MembershipProvider abstraction and all the Account junk included by default. This template is meant to provide a bare-bones setup of Html 5 and provide OpenId authentication for users (but not full-on user management)- it’s a simple cocktail of Html5 Boilerplate and DotNetOpenAuth. The rest is left up to you to build up! Read More
Archive for the 'Programming' Category
The New Web App Architecture: ASP.NET MVC 3, jQuery Templating with PURE and the Json Value Provider
Over the past couple of years there has been a slow progression in the .NET web app world to fully separate out client/server interaction. Long gone are the horrible days of ViewState and Events; MVC provided a nice step to better structure web applications for powerful Web 2.0 experiences. But the barrier between client and server interaction has never really been clean- MVC markup has always been littered with C# code and there hasn’t always been widespread tools available to easily build desktop class applications in the browser. Sure, spark and haml provide alternatives, but these are essentially make a core problem easier to bear.
Performance is one of the most important, yet often overlooked, aspects of programming. It’s usually not something you worry about until it gets really bad. And at that point, you have layers of code you need to sift through to figure out where you can remove bottlenecks. It’s also tricky, especially on complex, process orientated systems, to aggregate performance information for analysis. That’s where this gist for a utility performance tracer class comes into play. It’s meant to hook into Enterprise Library Logging Block by aggregating the elapsed time or information statements and pass them to the Event Log (or other listeners you’ve hooked up). Even though the gist is designed for the Enterprise Library, it can easily be modified for other utilities like Log4Net. Below is an example of how the entry looks in the EventLog. Read More
I was playing around with the Flickr API recently and got a little stuck: when using jQuery to call the Flickr public feed using jQuery’s $.getJSON method, I wasn’t getting any results. I thought maybe I was parsing the response incorrectly, but when I went to check out the data coming back in firebug, nothing was there. I couldn’t believe it- the response headers were present, but the body was blank. Calling the public feed url from the browser worked fine. What’s more interesting was everything worked in IE. So I did some experimenting and learned the issue: I wasn’t correctly using the endpoint to work with JSONP, which is required when using jQuery with Flickr. Then I thought I better learn more about JSONP.
I’m a big fan of Gmail’s archive feature- I can move items out of the inbox quickly and find them later with search. To mimic this behavior at work with outlook, I’ve created this quick and dirty macro which does the job. Simply create a folder named “archive” in your mailbox. When you run the macro, it will move the current item in your inbox to that folder. I’ve created a keystroke which lets me run the macro easily.