Archive for October, 2007

h1

Prototyping Microsoft Live Maps Finished!

October 14, 2007

So Tonight I finished my prototype for work. Our client had this flash app and it was a map of the earth with all their locations mapped on it and you could do some basic filtering on the view of the earth to see the different offices (visually just blue dots) the client had around the world.

wait… back track. For some background information, they have an existing classic asp website and my job is to recreate it, extend it and make it generally better in the latest technology .net 3.5. The requierment was just to build it bigger and better in .net but since 3.5 is going to be launching by the end of this year, we (the senior consultant) thought that since the project is going get delivered in february that it would make sense to start building it in 3.5. We probably wont build it with sql 2008 tho because that misses the launch date by 1 week, but this decision may change.

Incase you were too lazy to click on the ‘we’ link I, I’ll explain that I have been lucky enough to have the privlage of working with one of australia’s best .net guys Mitch Denny from Readify!

So anyway back to my prototype. I used microsft live maps as the technology for viewing the globe and was looking through the API to see how to do some basic things that the business would need like plotting thumbnails on the map to represent locations, limiting zoom for the interenet facing site (security reasons) and also obfuscating (did I spell it correctly?) the x,y points so that it’s not hackable by going view source or something like that .

That was all well and good and didn’t take much more than copy pasting some methods from the live maps API. Something any monkey could do, and is not what I wanted to blog about.

What I learnt today was that AJAX lets you create scriptable web methods. (Not new I know, but just not something I’ve had to do until today)

What I did was make a webservice that provides a GetAllPoints() method which returned a List. I had to create the CoOrdinates struct myself because the .net Point class only takes int, not doubles. Once I decorated my class with the clientscript decloration, I then used LINQ to easily pull the data from my locations table.

The linq looked something like this…

So There you have it, I have easily replaced the flash app (which cost them something like $15000) with one days worth of code. Obviously leveraging heavily off live maps, ajax and LINQ. Sometimes I feel that the learning curve for new technologies is very costly but it’s nights like these that I realise, it’s VERY well worht it in the end and that infact it’s much more expensive not to utilize the latest programming solutions and technologies.

I’m tired now and have a WCF Course to attend to tomorrow hosted by Juval Lowe! woooooooo lucky me =-] I’m not ready for it so I’ve gotta quickly brush up before bed.

Night all!

Advertisements
h1

My First Blog Post!

October 8, 2007

Aha! So this is what it’s all about eh?
Hi Folks, This is the start of my first and hopefully many to come posts about my everyday life thoughts, my working career (programming) and maybe some other weird random things as I see fit.

That’s all for my first post folks, it’s back to c# 3.0 specification specs for me now… (jsut some light bed time reading)