Monday, 23 March 2009

MIX 10k entry goes OutOfBrowser

I have updated my MIX 10k Challenge entry to Silverlight 3.0 so itcan run out-of-browser!

You can visit the Silverlight 3.0 version of exploDZ, and install it locally for yourself WARNING: will prompt to install Silverlight 3.0 which is in BETA

1. Right-click and choose to Install


2. Select "where" to install (this is really only where the shortcuts go)


3. Silverlight 3.0 having an out-of-browser experience


This is really only a test of Silverlight 3.0 - exploDZ was just a bit of fun, and there is already an ClickOnce/WPF version at DeepZoomPublisher.com/Viewer.

Code changes

Thanks to Chris' Silverlight 3.0 out-of-browser instructions the ONLY change from the 2.0 to the 3.0 (out-of-browser) version was the following element added to the AppManifest.xml file:

<Deployment.ApplicationIdentity>
<ApplicationIdentity
ShortName="exploDZ"
Title="Out of browser DeepZoom Viewer">
<ApplicationIdentity.Blurb>
exploDZ out-of-browser (Silverlight 3.0)
</ApplicationIdentity.Blurb>
</ApplicationIdentity>
</Deployment.ApplicationIdentity>


What it does

The shortcut created by the 'installer' has a target like this:
"C:\Program Files\Microsoft Silverlight\3.0.40307.0\sllauncher.exe" conceptdevelopment.net.0
I guess that parameter reflects the 'source site' and index of Silverlight OutOfBrowser apps -stored in a safe place somewhere :) stored in Apps\LocalLow\Microsoft\Silverlight\Offline\ (on Windows 7 at least).


The index.html ISN'T the hosting page from the internet - it's a custom Silverlight object tag:


The metadata file contains
LaunchPath=C:\Users\Craig\AppData\LocalLow\Microsoft\Silverlight\Offline\conceptdevelopment.net.0\index.html
SourceDomain=conceptdevelopment.net
OriginalUri=http://conceptdevelopment.net/silverlight3/outofbrowser01/exploDZ.zip
AppID=conceptdevelopment.net.0
Description=exploDZ out-of-browser (Silverlight 3.0)
Title=Out of browser DeepZoom Viewer
Name=exploDZ


How it works?

Who knows??? Tim's Silverlight 3 Out-of-browser Update Model overview is a worthwhile read.

Adobe's AIR out-of-browser host for Html-Javascript and Flash/Flex sits atop WebKit, and from the index.html above it seems likely that OutOfBrowser-Silverlight is also sitting in a little web browser of some description. It's only 500Kb, so it's not IE :) - and there also has to be a Mac version... it doesn't appear to be managed code (or I'd guess Cassini), maybe the Mac one is related to Chiron? Speaking of Mac - this is how it looks in Safari 4 beta...


Sunday, 22 March 2009

Silverlight VirtualEarth Map Control - with DeepZoom Images

"TagUpdater" parses through your Deep Zoom metadata.xml, opens the images and reads EXIF title/description/tag data... so it was pretty simple to extend it to read latitude & longitude.

The location of each Deep Zoom sub-image is then available to display on a map, in the Tag Browser sample:


1. Metadata.xml entries now look like this
<Image>
<FileName>C:\Dev\Cities\bhutan_tigersnest.jpg</FileName>
<x>0</x>
<y>0.127264287334191</y>
<Width>0.199250151375691</Width>
<Height>0.203911475380207</Height>
<ZOrder>11</ZOrder>
<Tag>bhutan</Tag>
<Description>Amazing monastery perched on a cliff in Bhutan near Paro</Description>
<Rating>0</Rating>
<Title>Tiger's Nest</Title>
<LatLong>27.4266666666667,89.4033333333333</LatLong>
</Image>


2. We add a Silverlight VirtualEarth Map Control
xmlns:m="clr-namespace:Microsoft.VirtualEarth.MapControl;assembly=Microsoft.VirtualEarth.MapControl"
<m:Map x:Name="viewMap" Grid.Row="3" Height="220" Opacity="0.25" />


3. and in the code add a new MapLayer
MapLayer PinMapLayer = new MapLayer(); // Layer on map to 'add' stuff to [MAP]

viewMap.AddChild(PinMapLayer);


4. Then display the pins within the xmlClient_DownloadStringCompleted method (originally from Kirupa's sample)
//Now add to map [MAP]
if (latlongString != "")
{
var l = new Location(
Convert.ToDouble(latlongString.Split(',')[0])
, Convert.ToDouble(latlongString.Split(',')[1])
);
Image pin = new Image();
pin.Source = new BitmapImage(new Uri("blue_pushpin.png", UriKind.RelativeOrAbsolute));
pin.Stretch = Stretch.None;
var tooltipObject = new StackPanel();
var title = new TextBlock();
title.FontWeight = FontWeights.Bold;
title.Text = titleString;

tooltipObject.Children.Add(title);
var description = new TextBlock();
description.Text = descriptionString;
tooltipObject.Children.Add(description);

ToolTipService.SetToolTip(pin, tooltipObject);
// Adds the pushpin to the map layer.
PinMapLayer.AddChild(pin, l, PositionMethod.BottomCenter);
}


5. and in msi.MouseMove, move the map for the 'current' image
l = new Location(
Convert.ToDouble(imageMetadata[subImageIndex].LatLong.Split(',')[0])
, Convert.ToDouble(imageMetadata[subImageIndex].LatLong.Split(',')[1])
);
viewMap.Opacity = 1;
viewMap.SetView(l, 12);


If you play with it it will be obvious there are some useability issues with changing the map 'on hover' over the images (it's difficult to get the mouse over to the map if you want to navigate around), but the Silverlight VirtualEarth Map Control definitely makes it easy to build!

Saturday, 21 March 2009

Silverlight VirtualEarth Map Control - Search Results

Try out a basic search results view using the Silverlight VirtualEarth Map Control at searcharoo.net/SilverlightMap.html...

Searcharoo with Silverlight Map Control


Thanks to Chris Pietschmann's Tooltip example each pin shows what search result it refers too (although I still haven't figured out to make the pins 'click-able' to open the result link directly...).

The relevant code added to the search result JSON parsing:

1. Create a MapLayer
MapLayer PinMapLayer = new MapLayer();

2. Add it to the Map control first (ie. before adding Children)
ResultMap.AddChild(PinMapLayer);

3. Extract GPS location
var l = new Location(
Convert.ToDouble(result.gps.Split(',')[1])
, Convert.ToDouble(result.gps.Split(',')[0])
);


4. Create the pin (Image), add tooltip and add to MapLayer
Image pin = new Image();
pin.Source = new BitmapImage(new Uri("blue_pushpin.png", UriKind.RelativeOrAbsolute));
pin.Stretch = Stretch.None;

var tooltipObject = new StackPanel();
var title = new TextBlock();
title.FontWeight = FontWeights.Bold;
title.Text = result.name;
tooltipObject.Children.Add(title);
var description = new TextBlock();
description.Text = result.description;
tooltipObject.Children.Add(description);
ToolTipService.SetToolTip(pin, tooltipObject);

// Adds the pushpin to the map layer.
PinMapLayer.AddChild(pin, l, PositionMethod.BottomCenter);



The search box is pre-populated with manhattan which results in a set of photos.



Perform that search, then search for sydney to see how the VirtualEarth Silverlight Map Control animates between the two locations with nothing more than a simple call to SetView

ResultMap.SetView(GetMinMaxCenter(min, max), 12);

The complete code will be available on Searcharoo@Codeplex shortly.

p.s. another search to try is - pumpkin - geocoded photos are so cool!

Silverlight VirtualEarth Map Control - in "3D"

Further to my previous post on the Silverlight VirtualEarth Map Control - here it is in Silverlight 3.0 WARNING: will prompt to install Silverlight 3.0 - which is in BETA - do so at your own risk!


The animation and map styles (road|arial) work as you'd expect, but somehow it looks a lot cooler with this little bit of code added :-)

<Canvas.Projection>
<PlaneProjection RotationX="-60" />
</Canvas.Projection>


BTW, it seems to me like addition of 3D Projection (rather than a complete 3D environment, ala Kit3D and WPF) is the minimum they needed to add to get Photosynth working "natively" in Silverlight (instead of the current Silverlight-Photosynth beta which does use Kit3D)? ... hmmm ...

Friday, 20 March 2009

Silverlight VirtualEarth Map Control - initial impressions

Microsoft was bound to deprecate all the work on silverlightearth.com (and others on DeepEarth) at some point :D - and they've finally released a CTP of their efforts.

The control can be downloaded from Microsoft Connect: Silverlight Map Control - you have to register and fill in a survey first but then you're good to go. There is also a Getting Started guide to help, you know, get started.

It's actually pretty simple:
  • Add Reference to Microsoft.VirtualEarth.MapControl

  • Add namespace xmlns:m="clr-namespace:Microsoft.VirtualEarth.MapControl;assembly=Microsoft.VirtualEarth.MapControl"

  • and Xaml <m:Map x:Name="viewMap"/>

  • sprinkle a bit of C# (unnecessary, but why not)
    viewMap.View = new Microsoft.VirtualEarth.MapControl.MapViewSpecification(new Location(40.7199, -74.0030), 12.0000); //New York

and you've got a map!


Details

The control doesn't like being hosted on the filesystem (good old WebClient and ClientAccessPolicy restrictions I suppose) so when creating your first test project, remember to hook up a WebApplication as well...



otherwise you'll get the same error as the design surface does
Map loaded in unsupported URI scheme. Please reload page in http scheme.

but a WebApplication with an automatically created TestPage works just fine



Naturally I then wanted to apply it to something useful, so you can give this New York Marathon (2006) visualizer a go... in case it isn't obvious, it's showing how far behind the winner I was (and how far behind me Lance was :)
New York Marathon with Microsoft Virtual Earth Silverlight Control
I've blocked panning/zooming on it for now (until I figure out how to keep the animations and course in sync), but that is a bona-fide Microsoft Virtual Earth Silverlight Control (CTP) in there!
UPDATE [22-Mar]: I've updated the example so that dragging/panning works BUT zooming is still broken. I think I've copied the iSDK Add scalable element example exactly (but their Rectangle scales and my content doesn't). Weird...

The change was to move the 'animation canvas' inside the Map, like this:
<m:Map.Children>
<m:MapLayer>
<Canvas
m:MapLayer.MapRectangle="40.8325608405556,-74.1015908473376,40.5722860972124,-73.843755459154"
m:MapLayer.MapPositionMethod="Rectangle"
HorizontalAlignment="Stretch" VerticalAlignment="Stretch">


That didn't take long at all - so initial impressions are good. The map controls are very smooth and the basic stuff is intuitive to program around. In addition to the links above, you will want to play with the Interactive SDK and keep the SDK CHM handy until sample code starts appearing in the wild...

I wonder what the release date and go-live licensing details are???

Saturday, 14 March 2009

Adding Searcharoo to CodePlex

Decided to add the Searcharoo version 7 code to CodePlex so that it's easier to release bugfixes between 'versions', and possibly invite other developers to participate (although not sure if that will make it less 'fun' to play around with).

Anyway, the process (while simple) didn't really have a great set of instructions to guide me through it (or else I just couldn't find them). Either way, I decided to document my experience for others → Adding Searcharoo to CodePlex (open to the public soon).

Friday, 13 March 2009

Photosynth for iPhone : iSynth

I recently blogged about Photosynth being available on Macs and Linux via Moonlight, but having real Photosynth on the iPhone is pretty darn cool! You might as well just download it now (if you have an iDevice) and read the instructions.

Here's a quick preview of how it looks (read to the end for my favourite feature). The navigation has an 'iPhone-y' feel to it:
isynth isynth
and it was easy to find my own previously uploaded synths:
sydney harbour synth
navigation is similar to the desktop version (and ever so slightly unintuitive on the iPhone occasionally, when you seem to have to 'drag' the opposite way to what you expect)
sydney harbour photosynth
but my FAVOURITE features are the point cloud and camera positions... you can clearly see (below) that my entire 'Sydney Harbour Synth' was formed from photos taken off a ferry travelling across the harbour (away from the CBD)!
sydney harbour photosynth point cloud

I'm impressed! Even moreso since it wasn't even written by Microsoft, but an intern who worked in the Photosynth team last year. Great job Greg Pascale!

Saturday, 7 March 2009

Xap != Zip (Silverlight gets confused)

After I had tested (or thought I'd tested) and uploaded the Searcharoo version 7 CodeProject article, I deployed 'example code' to searcharoo.net, including the Silverlight UI. I was shocked and annoyed when it failed to run!

It's worth noting that my hosting provider doesn't server .XAP files by default, so of course I had just renamed the Silverlightaroo.XAP to Silverlightaroo.ZIP, updated the reference in the HTML and expected it would work (like Tim says it should).

BUT all I got was
Microsoft JScript runtime error: Unhandled Error in Silverlight 2 Application This operation is not supported for a relative URI. at System.Uri.get_Host()
string host = Application.Current.Host.Source.Host;
I was confused why this would work fine with .XAP but not with .ZIP... these are the three scenarios I tried to get it working:

1. <param name="source" value="Silverlightaroo.xap" />

This works fine on my local PC, but breaks on my hosting provider because the XAP file returns a 404 so the Silverlight application never loads.

When it works locally, you can see that the Application.Current.Host.Source properties are all populated correctly:



2. <param name="source" value="Silverlightaroo.zip" />

Because option #1 doesn't work on my server, I simply renamed .XAP→.ZIP and updated the HTML - but this causes the error shown above. When I debug the Silverlight, the Application.Current.Host.Source properties all throw exceptions:



3. <param name="source" value="http://localhost:3359/Silverlightaroo.zip" />

The solution was to use the FULL path to the Silverlight .ZIP file, and once again the Application.Current.Host.Source properties are populated:


This is not ideal, because now I have to remember to change the HTML OBJECT tag "source" PARAM between development/test and production servers - but at least it works! You can see the page in action.

Is it just me - or is this a bug?

Thursday, 5 March 2009

Searcharoo 7.0

The latest incarnation of my open-source ASP.NET no-database-required C# search engine has been updated: Searcharoo version 7 (and on CodeProject)!

It's not a significant release in terms of functionality (just adds proper document excerpt/term highlighting to the results), but it was quite a bit of work to make that happen.

Plus I added some new 'toys': a JSON-formatted result page and two rich-clients that use it (jQuery/AJAX and Silverlight 2.0).



You can play with the jQuery and Silverlight examples online (try searching for parse, search, row, sydney, manhattan or pumpkin)
http://searcharoo.net/jSearcharoo.html
and
http://searcharoo.net/Silverlight.html

This will be the last .NET 2.0 version of Searcharoo - future versions will be in .NET 3.5, looking to take advantage of Linq and maybe even Azure...

p.s. You can read about all the previous versions (since 2004) on CodeProject: versions 1 2 3 4 5 and 6.

Friday, 27 February 2009

System.Shell.CommandLine (storm in a teacup)

Miguel's post caught my eye because it seemed to contain thoughtful analysis of a .NET 4.0 'feature' that had appeared in the latest beta (Miguel later added the pre-script to his post - which sorta spoils the end of the story). I like Miguel's perspective on the framework (particularly the core) given his work on Mono and Moonlight.

I was a big fan of Mono.GetOptions when I first saw it, having included in in Searcharoo.net back in 2007. Now I discover that Miguel is
not a fan of using attributes for command line options. Attributes are just a poor language for expressing complicated semantics, they can only do well for setting simple flags, but once that is over, they become just as bad as the System.Shell.CommandLine interface...We tried that before, that was called "Mono.GetOptions" and we obsoleted it a few years ago, it was a cute idea, but did not map well for real world use.
I guess I better check out Mono.Options. Here's my GetOptions implementation for posterity (I thought the attributes were kinda cool, and more readable/maintainable than any other alternative at the time...)


Elsewhere on my reading list, Bart simultaneously posted an alternative opinion - some detailed examples of the .NET 4.0 code to help people understand it (not sure if he was aware it might not make RTM).

I enjoyed both perspectives, although tended to agree with Miguel's position - that it belonged on CodePlex rather than in the Framework. Was interesting to see his later update indicating that is exactly what would actually happen.

Bit OT for a blog post... but interesting to see the next release growing & changing

Monday, 23 February 2009

Photosynth point cloud in c# (beta...)

Further to this post, I've done a bit more work on the C# version of this Python script to process multiple bin files, format the result for MeshLab and save it as a file with .ply extension (thanks to comments on this post).
View the code Program.cs
and the sample output points_0_0.bin.ply

Here's how the example Sydney Harbour synth looks on Photosynth.net


And this is the Meshlab .ply



Obviously I still haven't got the color parsing quite right (and I'm not 100% sure the point-count is correct...) but it's clearly the same set of points, so the C# code must be doing something right :)

Thursday, 19 February 2009

Photosynth point cloud in c# (alpha...)

Recent posts concerned with Photosynth and its availability on Silverlight 2.0 (and Moonlight) lead me to thinking about how to utilize the data generated by Photosynth (in Deep Zoom Viewer for example).

The first post - Exporting point clouds from Photosynth - was linked directly from Blaise Aguera y Arcas himself; it linked to another with some more detailed instructions - Photosynth Export Tutorial. Unfortunately all the code is in Python.

It seemed obvious to try and convert the Python script bin_to_csv.py to C#. At the risk of embarrassing myself with a poor translation, I'm posting the "work in progress" here in case it's of interest.

You can view the code for the .NET Console application (excerpt below) or download the Visual Studio project and test data ZIPped (238Kb)
code excerpt
NOTE: that I couldn't get the offset calculation to work - I ended up manually cycling through even numbers to get decent output for each .bin file - obviously this suggests perhaps I've screwed something up; but until I get time to test/work on it further, I'm not sure what...

I was testing data from this synth of Sydney



which seems to be just two files: points_0_0.bin and points_0_1.bin.
The output from the C# is points_0_0.txt (216Kb) and points_0_1.txt (109Kb).

Here's the first few lines
-6.723576, -1.410307 ,0.5756224, 4, 60, 8
-4.927393, -0.02451534 ,0.8836676, 21, 41, 21
-1.982108, 3.687859 ,0.03735788, 22, 45, 22
-1.845265, 3.327285 ,0.2232598, 6, 13, 6
-1.977082, 3.292458 ,0.3644025, 2, 8, 6
-1.478826, 3.45144 ,0.3358887, 9, 17, 9


I'm pretty sure at least some of the data is good - I could plot the first 56 points on Vladimir Bodurov's Silverlight 3D project, but I haven't had a chance to validate them any further.

Wednesday, 18 February 2009

EvoLisa "Animated Viewer" (in Silverlight)

In a previous post I added SVG output to the EvoLisa viewer. There is a 'cool' effect when loading the SVG in Firefox - it renders the polygons progressively which looks like it's animated (although unintentionally, when your connection is slow).

I decided to create the same effect with the Xaml output using Silverlight with Javascript.

Watch the "EvoLisa" Opera House images reveal by day and by night (using silverlight html host page).



NOTE: this animation is NOT the same thing as the image evolving as part of the EvoLisa program - it is merely gradually revealing a particular set of polygons that have been saved by the program.

NOTE2: it uses Silverlight 1.0, so it should be fine under the recently released Moonlight 1.0.

Monday, 16 February 2009

EvoLisa "Viewer"

This post is related to Roger Alsing's EvoLisa (or GenArt, if you prefer) genetic algorithm. If you aren't familiar with it, read the FAQ and check out the Image Gallery.

Here's how it looks "in action": the image on the left is the 'source', on the right is the evolving polygon 'dna' (it gets gradually better as the dna evolves):

Actually that image is probably too complex to be a great example, sorry.

Anyway, that's old news. This post is because I've added a little piece of code to the 'ecosystem': a viewer for the .DNA files that also lets you save a high-resolution JPG copy. It was inspired by a couple of comments asking about exporting the images.

This is what the DNA Viewer looks like - on the left is a Xaml rendering, on the right is an Image. They both look the same - the interesting bit is comparing the code that generates each of them

The Image is generated by the existing Renderer class in Roger's source (which is also the logic used to save the JPG); the Canvas version uses a new (although very similar) WpfRenderer class. From that it was trivial to create the XamlRenderer which outputs a .xaml file which can be used to view the GenArt creation in Silverlight!


You can download a GeneticDNAViewer_1.0.zip (16Kb) ZIPped exe to play with, or the WpfApplication itself can be reconstructed with the original source and these c# files:
Window1.xaml, Window1.xaml.cs, WpfRenderer.cs and XamlRenderer.

You can test it by unZIPping operahouse6.dna.zip and opening the .dna file inside. I've uploaded a 3200x2032 copy of the image on Flickr to demonstrate the high-resolution output.

FYI, the relative file sizes are:
- operahouse6.dna 51.4Kb
- scene.xaml 17Kb
- operahouse6.jpg 371Kb

p.s. Roger has posted subsequent performance-related posts on EvoLisa, but I'm not sure he's released the source for them yet.

UPDATE [17-Feb-09] another example:
Opera House by day .DNA 49Kb (ZIPped 17Kb)
Opera House by day (Silverlight 17Kb)
Opera House by day (Flickr 1920x1440 162Kb)



While I was testing the new 'DNA', I added SvgRenderer as well (needs updated Window1.xaml.cs). At first it didn't seem to work (left image) because I couldn't figure out how to make the background black. Decided to draw a big black rectangle behind the rest (bit of a hack, but it works). You can view operahouse_day.svg.xml (21Kb) in Firefox.

Friday, 13 February 2009

Photosynth for Mac (as well as Linux)

Yesterday's post talked about Photosynth becoming available on Moonlight, via a new Silverlight-based Photosynth viewer.

Since Silverlight 2.0 is already available for Mac, it makes sense that the 'test' Sydney synth also works on the Mac - which it does (in Safari, even!):


However, while it isn't very obvious, Microsoft has already started enabling the Photosynth website itself for Mac users! The javascript-driven homepage always worked...


But now if you attempt to access a synth you should see this message (since, like, mid-December)


and assuming you have Silverlight 2.0 installed, away you go!




Unfortunately you still need a Windows PC to create synths, but there are quite a few available to browse, including Barack Obama's inauguration.

Thursday, 12 February 2009

Photosynth in (Moon|Silver)light

Scott, Scott and Tim were among the first to blog about today's big news - Miguel de Icaza's announcement that Moonlight 1.0 is live! It's a pretty impressive achievement, which I hope to write more about once I have installed and played with it myself.

However, hidden in Miguel's post was something else I thought was just as cool -- Barack Obama's inauguration Photosynth The Moment was shown in Moonlight (not just on Photosynth)... wha!?

I thought this was a massive 'discovery'. Photosynth previously had a custom viewer install that only ran on Windows... and now it's on Linux?!

Turns out ScottGu did 'announce' this, back in January (don't know how I missed it)
CNN and MSNBC are both launching Photosynth viewers that will ... combine pictures ... to create an interactive Photosynth experience of the event using Silverlight’s built-in DeepZoom feature to deliver an amazing 3D viewing of it.
Check out the difference between the plug-in version (view synth):


and the Silverlight version (view synth and object tag):

Very similar - all the Silverlight version is missing is the 'control point cloud' that you see holding down Ctrl in the embedded viewer.

Turns out the CNN version hosts Photosynth.xap with the following assemblies -- including Kit3D!

Here's how the HTML looks to host it. It's fairly trivial to extract the .DZC filename from a Photosynth.net page and embed it in Silverlight.

In Photosynth.net HTML source
Find the var _collectionInfo JSON object and extract the
"Url":"http://mslabs-328.vo.llnwd.net/d6/photosynth/M6/collections/89/49/43/894943c7-0a67-477f-9607-1eb1ee62eab1.dzc"

In a new Silverlight host page paste the DZC in the initParams
<param name="initParams" value="autoplay=true,dzcPath=http://mslabs-328.vo.llnwd.net/d6/photosynth/M6/collections/89/49/43/894943c7-0a67-477f-9607-1eb1ee62eab1.dzc"/>

So if you are playing around with Moonlight 1.0 it's fairly trivial to access the thousands of existing Photosynths (unfortunately I think you'll still need Windows to create one).


Finally, unless Microsoft releases something 'official' I doubt it's allowed to redistribute Photosynth.xap to display your own synths (especially for commercial purposes). Interestingly, the Photosynth site still says Like the viewing experience, the "synther" only runs on PCs (XP and Vista) :-).


P.S. I expected a Silverlight synth viewer sooner; writing back in August 2008
given the shared heritage with the Silverlight 2.0 MultiScaleImage control I wouldn't be surprised to see a Photosynth 'viewer' in RTM version of Silverlight 2.0 (or certainly a future version after that).

EDIT: I had previously wondered how the Photosynth data was stored, since each Photosynth is opened via a .DZC file (see above). I guess Fiddler would have answered the question - a JSON file is downloaded based on the DZC location: dzcUrl.Replace(".dzc", ".synth_files/0.json"). A summary of the JSON for that synth is shown here (thanks to JSON Viewer).

I guess it's all this data that was harvested for the pointcloud explorer built by these guys, in Python!

Silverlight + Model-View-ViewModel (MVVM)

I've been collecting links & info about Model-View-ViewModel in Silverlight (and WPF) for a while - these are my favourites:
StackOverflow question Should I use the Model-View-ViewModel (MVVM) pattern in Silverlight projects? Links to a couple of good posts including
MSDN Magazine's WPF Apps With The Model-View-ViewModel Design Pattern
Why WPF Developers Love MVVM

Once a developer becomes comfortable with WPF and MVVM, it can be difficult to differentiate the two. MVVM is the lingua franca of WPF developers because it is well suited to the WPF platform, and WPF was designed to make it easy to build applications using the MVVM pattern (amongst others). In fact, Microsoft was using MVVM internally to develop WPF applications, such as Microsoft Expression Blend, while the core WPF platform was under construction. Many aspects of WPF, such as the look-less control model and data templates, utilize the strong separation of display from state and behavior promoted by MVVM.
Dan Crevier's DataModel-View-ViewModel pattern series 8-part series including sample DataModel and ViewModel (WPF-focused).
David Wynn's Silverlight and the View-ViewModel Pattern Example using NInject, Silverlight Extensions (Command) and Unit Testing.
Josh Smith discusses MVVM eliminates 99% of the need for ValueConverters Paul Stovell, Laurent Bugnion, Jaime Rodriguez (among others) weigh in on the proposition that:
The only place I can see a use for value converters in an MVVM architecture is cross-element bindings. If I'm binding the Visibility of a panel to the IsChecked of a CheckBox, then I will need to use the BooleanToVisibilityConverter.
Mark Heath's Model View View-Model (MVVM) in Silverlight Basic 'scoreboard' example demonstrating MVVM in Silverlight 2.0
John Gossman's Introduction to Model/View/ViewModel pattern for building WPF apps Whoa - John talks about MVVM back in October 2005, talking about the "Sparkle UI". The MSDN article (above) quote "In fact, Microsoft was using MVVM internally to develop WPF applications, such as Microsoft Expression Blend, while the core WPF platform was under construction" must be true!

I've kept a copy on conceptdevelopment.net too.

Wednesday, 11 February 2009

Cooliris on iPhone

It wasn't that long ago I was impressed by Microsoft's SeaDragon (DeepZoom) on iPhone... but I just discovered that Cooliris has also released an iPhone viewer and it's just as cool!



Although you can't see it in a static screenshot, it also includes the same '3D floating wall effect' as the Windows version. Download from iTunes or just search in the AppStore.