Feeds

Virtual Earth puts human face on data

Lightweight programming, minus Google

SANS - Survey on application security programs

Project Watch: Microsoft 2008 Those who have been following Project Watch will know that I have been leading the development in a large database project using SQL Server 2008, Windows 2008 and Visual Studio 2008.

Relatively heavy stuff. Part of that project, though, involves the creation of a mashup that displays our spatial data on a map - yes, I know, all very Web 2.0, but something that improves the experience for the user. People look at a web page and enter some value (a time period, or a location and a radius), click a button and lo, the relevant spatial data is displayed with points on a map.

In practice the web page talks to a web service, which talks to the database. That returns a data set to the service, which punts it up to the web page and the data is displayed on a map retrieved from Virtual Earth. Easy.

Why did we pick Microsoft's Virtual Earth rather than rival Google's offerings, which have been getting most play when people talk of map-related mashups?

Well, let's reverse the questions. Why Google? Why not Virtual Earth? Both are excellent mapping services. You might imagine that Virtual Earth would integrate better with Visual Studio but it's Just Another Programming Interface, or JAPI, as far as the code is concerned.

So, we could have chosen either but, since everyone is talking about Google, just to buck the trend, we decided to try out the underdog for our initial testing. It seems to be working fine, so we'll probably stick with it.

How did we get to this point? Starting with the web page, it needs some sort of interactive component that allows the user to enter input. In this case we've used a text box and a button. The text box lets the user enter the year for which data should be displayed and when the button is clicked, the contents of the text box are whizzed off to the web service.

The code below describes the user interface bits:

   <tr>
        <td colspan=2 align=center>
            <b>Locations in Year</b>
        </td>
    </tr>
    <tr>
        <td>Year:</td>
        <td><input type="text" id="yearTextBox" size="10"
                   maxlength="4" value="2008" /></td>
    </tr>
    <tr>
        <td colspan="2" align="center"><button onclick="getbyyear()"
          title="Find locations for the specified year.">Find</td>
    </tr>

Once the button is clicked, it calls a function called getbyyear:

    function getbyyear()
    {
        // fetch value from webpage
        var year = document.getElementById('yearTextBox').value;
   
        // use standard web service call
        microsoft.samples.com.ILocationDataService.GetLocationsForYear(
            year, onSuccess, onFailure); // Pass to web service
        
        document.getElementById('SearchingText').innerHTML =
          '<b>Searching...</b>';  // feedback to screen

Once the button is clicked, it calls a function called "getbyyear":

microsoft.samples.com.ILocationDataService.GetLocationsForYear(
    year, onSuccess, onFailure);

The function declares a variable called "year" and goes to the web page where it fetches the value in the text box called "yearTextBox" (say, 2004). A call to the web service is initiated by the following line:

microsoft.samples.com.ILocationDataService.GetLocationsForYear(
    year, onSuccess, onFailure);

This calls "GetLocationsForYear" in the web service and passes to it the value from the text box (2004). The web service sends the value to a stored procedure that in turn launches a query to fetch the data from the database.

3 Big data security analytics techniques

More from The Register

next story
Ubuntu 14.04 LTS: Great changes, but sssh don't mention the...
Why HELLO Amazon! You weren't here last time
This time it's 'Personal': new Office 365 sub covers just two devices
Redmond also brings Office into Google's back yard
Got Windows 8.1 Update yet? Get ready for YET ANOTHER ONE – rumor
Leaker claims big release due this fall as Microsoft herds us into the CLOUD
Next Windows obsolescence panic is 450 days from … NOW!
The clock is ticking louder for Windows Server 2003 R2 users
OpenBSD founder wants to bin buggy OpenSSL library, launches fork
One Heartbleed vuln was too many for Theo de Raadt
Batten down the hatches, Ubuntu 14.04 LTS due in TWO DAYS
Admins dab straining server brows in advance of Trusty Tahr's long-term support landing
Red Hat to ship RHEL 7 release candidate with a taste of container tech
Grab 'near-final' version of next Enterprise Linux next week
Apple inaugurates free OS X beta program for world+dog
Prerelease software now open to anyone, not just developers – as long as you keep quiet
Windows 8.1, which you probably haven't upgraded to yet, ALREADY OBSOLETE
Pre-Update versions of new Windows version will no longer support patches
prev story

Whitepapers

Mobile application security study
Download this report to see the alarming realities regarding the sheer number of applications vulnerable to attack, as well as the most common and easily addressable vulnerability errors.
3 Big data security analytics techniques
Applying these Big Data security analytics techniques can help you make your business safer by detecting attacks early, before significant damage is done.
The benefits of software based PBX
Why you should break free from your proprietary PBX and how to leverage your existing server hardware.
Securing web applications made simple and scalable
In this whitepaper learn how automated security testing can provide a simple and scalable way to protect your web applications.
Combat fraud and increase customer satisfaction
Based on their experience using HP ArcSight Enterprise Security Manager for IT security operations, Finansbank moved to HP ArcSight ESM for fraud management.