Author: Soul Solutions Created: Sunday, 6 August 2006
Tips and Tricks as we come across them

BronwenWeeGo.jpgToday i had to filter an xml document based on the start value of an attribute and it took me ages to work it out as before i'd always done exact matches.  Plus couldn't find any egs where they used anything bar =.  So if i have a xml schema like


<books>
	<book name="Bronwens adventure"></book>
	<book name="Bronwen vacations"></book>
</books>

and i have a XMLDocument with this in it.  If i want to find all the book's whose name starts with "Bronwen" I can do a xpath query as follows:


doc.SelectNodes("//book[starts-with(@name,'Bronwen');

1:30 youtube video showing how to find australian places and street at mygeoland.com. Shows off the 3D mode of Virtual Earth.

mygeoland.com, the new way to search for places in Australia. Powered by Virtual Earth 3D and customised by Soul Solutions for Australia we believe it is the simplest, fastest and coolest way to find a street, suburb or place in Australia.

Go check it out: mygeoland.com

Simply double click the state, and start typing the street name and extension e.g. ‘smith st’Because you centred the map on the state, the search box automatically populates the state and country. That’s right Virtual Earth has a powerful search engine for Australia but you need to know how to use it. Type in “Opera House” into local.live.com and you are taken to Boston, USA – you could say hello to Denny Crane but really it’s not that useful. Instead go to mygeoland.com, double click on NSW and type “Opera House”, that’s much better.

Ok so the site is quick, it’s easy to use, it works, but where is that cool part?

See that 3D button? Click on it to install Virtual Earth 3D into Internet Explorer. It’s still a beta but if you have XP SP2 (or better) and a 32MB video card you download 5.5mb and say goodbye to your afternoon. Its Google Earth in your browser and now with full search for Australia!

Click on the 3D, click on the map to give it focus and press Ctrl-Q. You have just entered first person mode! This is cool, mouse looks around and the WASD keys move you around like you’re in counter strike, c and space zoom, Esc to exit the mode.

So now we put this all together, in 3D mode we double click our state, click on the textbox (hope to remove this step ASAP), type in the street name and press enter – whoosh your zoomed in to the address. Now click on the map and press Ctrl-Q. Now you can explore the area! Is that cooler then the competition in Australia? At least they have NextG so we can have this on our phone!

...

Read More »

BronwenWeeGo.jpgGot asked to work out the number of lines of real code in our project today.  Came across a pretty cool tool called slick edit - Free gadgets that plug in to VS2005.  There's a few gadgets there but i used the SLOC report to generate a pretty graph that you can save as a jpg and email to your boss etc.  How easy is that

BronwenWeeGo.jpgWell i've been working from home for 2 weeks now.  I must say that overall I am enjoying it.

I thought that not being on a bus for 2 hours every day would be a good thing...but i've realised it was my zone-out time to let my head clear of all thing work-related.  So I guess i just have to find something else to do between "finishing work" and "getting home" to do the same thing.

I've been racking up 45 hours a week without really realizing it which isn't such a bad thing.  Means if i want a long lunch i got plenty of hours up my sleeve.

It's really quiet though...miss the simple office sounds e.g the sound of ppl typing on a keyboard, so I thought i could record some office background sounds or something.  Of course the biggest thing is there's not a physical person to turn around and chat to and you get sick of being at home...so after work you feel like going somewhere.

Obviously the great things are..you can sleep in and still start work by 8am, you can easily cook yourself anything you want for lunch, if you only want to work 40hrs a week...you have a lot more free time to do other stuff, makes it much easier to book things that need doing at the house where you need to be home to let them in.

So lately I've been converting some SOAP WebServices to Rest webservices.  There's lots of papers on REST but atm there's no real standards, just guidelines.  As far as i can tell, it's just passing data using HTTP.

So if i have an existing webservice here: www.SoulSolutions.com.au/MyService.asmx with a method called GetPoints i'd want to call a method "GetPoints" in rest as www.SoulSolutions.com.au/MyService/Rest/GetPointsand i can either pass the params in the query string or the request header/body.  I'll go with header just for the fun of it.

Cause i just want to use the existing names, I'll won't user GET, PUT, and DELETE to determine the action of my method..but that's just me being lazy

So these are the steps i took to build a restful web service...

1. Put all the common code into a class that both webservice and rest can call2. Write a http handler called SoulSolutions.RestHandler Using reflection... It'll load up the current assembly, and my common class. It grabs the name of the method from the request and validates it exists in the assembly Grab the parameter info and validate we have the right params and they're the correct type etc Call the method and return the result...either as a text value or xml.. 3. add the handler to my existing webservices project, and only pick up calls with a rest path

              Improvements to this I'd like to make later...Add some custom attributes to mark the logic classes as "Rest Classes" and mark the method within them as "Rest methods" for a couple of reasons...1. We may split up the classes later and this will make it easy to find the valid ones2. For the methods, we may only want to support a subset of methods for rest and we can add a methodname attribute if we want to rename what the user calls without changing the name of the underlying function.

Do some performance testing to see if i need to add some custom caching for the reflection

Later...

Read More »

johnWeeGo.jpgSome interesting videos from the developers of Virtual earth V4 (3D)

http://www.on10.net/Blogs/laura/virtual-earth-3d-the-next-dimension-in-search-well-at-least-the-third-dimension-/

http://channel9.msdn.com/ShowPost.aspx?PostID=254128

I need to get myself an xbox controller!

johnWeeGo.jpgWith the launch of V4 of Virtual Earth we have put together a simple wiki open to anyone over at ViaVE.

http://viavirtualearth.com/wiki/AllPages.aspx

The idea is that all those little cool snippets of code go some useful and the power of many can maintain them and make them better.

I will be using the wiki for every bit of cool code i find about VE. Why don't you give me a hand?

BronwenWeeGo.jpgWas having trouble opening some web apps today due to the fact that VS2005 has gone to web projects.  Kept getting "unable to open project" and "project of incorrect type" messages.

Ended up installing VS2005 Web application project patch which involves 2 downloads:

1. Pre-requisite patch

2. WAP install package

Now the error is gone and my project opens...yay.

johnWeeGo.jpgHead on over to local.live.com and see Virtual Earth in 3D!!

V4 of VE was just released and feature a 5.5mb plugin for full 3D rendering. I'll post more as it comes to hand. Very cool stuff.

vev4.jpg

Copyright © 2002-2013 Soul Solutions Pty Ltd. | Login