in

Platinum Bay

Peace, Love, and...

This Blog

Syndication


.NETicated

November 2008 - Posts

  • Visualizing Geography in SQL Server 2008

    This is just too cool not to post. Many of you know about the DevEvents project I'm working on. If not, feel free to ping me. Part of the web application involves geo-context. Basically events are displayed to users (by default) based on their proximity to the event locations. To accomplish this I have several tables in the database with various geography related data. One of these tables takes advantage of the new SQL Server 2008 data type: Geography. This field essentially stores latitude and longitude, and SQL Server 2008 is then able to provide geography-related queries against it, like distance between two point.

    But the really cool part for me so far is when you select data that contains the Geography data type. Along with the standard Results and Messages pane, there is a new 'Spatial results' pane. Clicking on this tab reveals a map-like visualization.

    For the visualization below, I selected all points in Maine, Washington, Arizona, and Florida, and chose the Bonne projection. While I'd love to see all the points mapped, the visualization is limited to 5,000 results.

    Anyway, just thought this was pretty cool!

  • Presentation: Beyond Hello World – jQuery In-Depth

    On Tuesday, I had the privilege of presenting a session on jQuery at the www.NotAtPDC.com extension to the Microsoft PDC conference. I had a blast presenting my new-found love of jQuery to an audience of 47 folks, and given the level of interest I am publishing the project source.

    There were a number of great questions that came up; here are the responses for a couple of them:

    • The jQuery scripts are included by default in the ASP.NET MVC Beta. When you create a new project based on the Beta, they are in the scripts directory and are automatically referenced in the Master page.
    • jQuery itself can be used in any web application, and is not dependant on ASP.NET MVC.

    Resources listed in the presentation:

    Thanks also to John Resig, who is the lead developer on the jQuery project, who attended my presentation and was able to handle some of the more intricate questions regarding jQuery.

    NOTE: There is no security validation in the sample code, such as ensuring only authorized users can delete speakers. Do not use this code in production.

    Project Source Download (266.2k)

    Posted Nov 01 2008, 06:51 AM by Steve with no comments
    Filed under:
  • Visual Studio 2008 JavaScript Debugging

    Tonight, or this morning as the case may be, I was running into an issue with jQuery and the getJSON method. Basically, I was calling the method, with the proper parameters, but nothing was happening. The server method wasn't being called, and JavaScript debugging alerts weren't being fired either. After fiddling with the JavaScript for awhile, I decided to check out the JavaScript debugging feature which was added to Visual Studio 2008.

    Since I'd never used it before, I did the most logical thing I could think of, I searched. It turns out that JavaScript debugging is very easy to setup.

    First, go into your browser and enable script debugging. For Internet Explorer 7, go to Tools | Options | Advanced, and uncheck 'Disable script debugging (Internet Explorer)' and 'Disable script debugging (Other)'. For Firefox, JavaScript debugging appears to be enabled by default.

    Next, in Visual Studio, type Ctrl+Alt+P to open the 'Attach to Process...' dialog, and select either firefox.exe or iexplore.exe depending on which browser you are using.

    Finally, set breakpoints in your JavaScript code, and perform the action in the browser to get to the breakpoints. After that, you can use the standard Step Into and Step Over to navigate through your JavaScript. Visual Studio also provides debugger tooltips to explore your JavaScript objects, which is what ultimately led me to the response of the XmlHttpRequest object, and the realization that I had mis-named a server method parameter.

    With the popularity of jQuery, and other JavaScript libraries, I foresee this feature being widely used among web developers.

Powered by Community Server (Commercial Edition), by Telligent Systems
© Platinum Bay | Some Rights Reserved Creative Commons License

Disclaimer: The information in this weblog is provided "AS IS" with no warranties, and confers no rights. This weblog does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion. Feel free to challenge me, disagree with me, or tell me I'm completely nuts in the comments section of each blog entry, but I reserve the right to delete any comment for any reason whatsoever (abusive, profane, rude, or annonymous comments) - so keep it polite, please.