I'm an experienced software engineering professional and lifelong learner.

I'm have life goals to have fun in life and make a difference.

profile for Peter Mourfield on Stack Exchange, a network of free, community-driven Q&A sites

Resolving database issues with Nerd Dinner

September 7, 2011
Since releasing the latest version of Nerd Dinner into the wild, we’ve had some reports of people having a variety of issues either getting or working with the databases in the source branch. Hopefully, this post will help clear up some of those issues.

ASP.NET MVC Mobile Viewengines Available on NuGet

September 4, 2011
Lately, I’ve been spending my spare time helping with Nerd Dinner open source project. The other day Scott Hanselman annouced the latest release of Nerd Dinner, one of the fixes he mention was as fixing a release-mode caching bug that was introduced a few years back.

Adding HTML5 Geolocation to Nerd Dinner with yepnope.js, and Modernizr

August 26, 2011
One of the new features of the recently updated Nerd Dinner project is the support for HTML5 Geolocation. There are two JavaScript libraries that I used to accomplish this. The first is yepnope.js (http://yepnopejs.com/). Yepnope.js is an asynchronous resource loader. This means that you can load scripts based on the outcome of some condition. The second is Modernizr v1.7 (http://www.modernizr.com/). Modernizr detects a web browser’s ability to support various HTML5 and CSS3 features. Note: Modernizr v2 has yepnope.js built into the production version so you may want to consider using it in your project. It’s important to remember that yepnope.js is an asynchronous resource loader. This means that the script you’re loading WON’T be available on page load or $(document).ready. What I did was create a common JavaScript function called getCurrentLocation in both javascript files and call that when the script load is completed. The code in Nerd Dinner that kicks the Geolocation off is this:

Custom Configuration Sections in .NET

July 30, 2011
Most .NET developers will need to store some application configuration information at some point. Most times developers choose to use the appSettings section in the configuration file for this purpose. Here’s an example of an appSettings configuration section: