Dennis van der Stelt

The most votes generally drown out the best votes

Community

News

  • Meet me at PDC08

Email Notifications

I read...

I Use...

Tags

Recent Posts

Archives

May 2007 - Posts

Firefox its inline search for IE

Wow, I almost lost this little gem after formatting and installing my machine again. After some googling for "search" or "find", "internet explorer" and "firefox" I finally found a link to "inline search" plugin for Internet Explorer.

If you've ever worked with Firefox, you might know the inline search it has, at the bottom of the page after pressing CTRL+F. Instead of some irritating popup box you'll get a great searchbar at the bottom of IE that's very light and extremely useful.

Download here at iefore.com.

Paste XML as serializable type

I had the privilege to see Steve Maine do some coding in a Microsoft SDR session after MIX07. While coding, he showed this cool tool that's in the BizTalk Services SDK. He was showing something he had build and copied a bit of XML into the clipboard and used this tool inside Visual Studio 2005 to paste it as a serializable type, converted from the blob of XML.

The tool just used the XML to create the new class. Easy as that, but really useful! It's in the menu under "Edit", and then "Paste XML as Serializable Type". I haven't stress tested it yet, as it's late when I'm writing this and I'm still very tired from missing so many hours of sleep during MIX07. Don't ask what I've spend them on; What happens in Vegas, stays in Vegas! ;-)

<training>

  <name>WCF</name>

  <location>MIC</location>

</training>

 Take the XML above and have a look at the class below.

[System.Xml.Serialization.XmlRootAttribute(Namespace = "", ElementName = "training")]

public class TrainingClass

{

  private string nameField;

  private string locationField;

 

  [System.Xml.Serialization.XmlElementAttribute(Namespace = "", ElementName = "name")]

  public virtual string Name

  {

    get { return this.nameField; }

    set  {  this.nameField = value;  }

  }

 

  [System.Xml.Serialization.XmlElementAttribute(Namespace = "", ElementName = "location")]

  public virtual string Location

  {

    get { return this.locationField;}

    set { this.locationField = value;}

  } 

}

It's located in the BizTalk Services SDK. Once installed, it's under C:\Program Files\BizTalk Services SDK\Samples\Web\Tooling\. Usable in both Visual Studio 2005 and "Orcas". Everyone immediately responded that they wanted the tool in a PowerTools package or something. It might be released that way, but until then download the SDK. And don't let the BizTalk name fool you, this tool and the services in the SDK are really useful. I hope to write about it a bit more.

Technorati tags: ,
Astoria, data services for the web

At MIX07 I've seen a presentation by Pablo Castro from the ADO.NET team on a new project codenamed "Astoria". It's a new technology used for getting data over the web. It's very useful in Ajax scenarios where you'd like some XML or, maybe even better, JSON data into your JavaScript to present on the screen. I can see this being much more performant and easy to use than writing some (web)services or something.

Information can be found on Pablo's weblog (read the 'introduction' and the 'faq') and the website at mslivelabs. Those are quite large reads though and you might want to quickly know how this works. Think of it as a website that just presents data in the format you'd like it to be. Currently XML and JSON are supported. You retrieve the data by URLs that Astoria accepts. For example...

http://www.class-a.nl/trainings/
...would retrieve all Class-A trainings you could register for. You'd get some info with details for it.

http://www.class-a.nl/trainings[WCF]/
...would give you information about the WCF training we have.

http://www.class-a.nl/trainings[WCF]/modules/
...would then give you all modules that are within the WCF training.

http://www.class-a.nl/schedule/2007?month=06
...would give you all scheduled trainings for June 2007

http://www.class-a.nl/schedules[2007]/training[WCF]/
http://localhost/customers[class-a]/orders/
...might give you information about the WCF training that is scheduled for June 2007. And the second URL could've been used to first search for all customers and then all orders for customer class-a.

Entity Framework
It can present this data in XML, very usable for hierarchal data. But JSON is of course also very usable as it's immediately usable within JavaScript. Astoria runs right on top of Entity Framework, so it's not directly bound to the database. Instead, it's entirely based on Entity Data Models coming from the Entity Framework. It's also using the new web abilities in WCF I'll be writing about later.

Pablo also showed an example with binding his Astoria data against a datagrid that was developed by someone from the ASP.NET team. Although only used for the demo, I can already see the masses using this as an alternative to getting data the 'right' way. Because it's so easy to use Astoria, it's also very easy to use it the 'wrong way'. But Astoria definitely has its benefits! This is something we'll talk more about at the Class-A SummerClasses!

Technorati tags: , , ,
Programming Silverlight

Just attended a session about Silverlight development using managed code. I'm starting to love Silverlight the more I get to know about it. Some details about the current alpha version.

Silverlight is:

  • Silverlight 1.0
  • Managed Code (CLR)
  • XAML Extensibility
  • User Controls
  • Contains sample controls

Some other info

  • It has webservices support, so you can grab data from those.
    WCF support is on in the roadmap, so although currently unsure, they want it in.
  • Asynchronous support.
    I'm guessing they're simply using wsdl.exe to generate proxy classes. Generated proxy classes by wsdl.exe have this in them, but it immediately answered a question from the audience if Silverlight also supported multithreading.
  • Basic XML support.
    Currently they don't have XPath or XSD support, but it's also in the roadmap.
  • Linq support
  • ScriptableAttribute makes that your class and/or methods are accessible from javascript. Quite cool.
  • Someone from the audience asked if sessions could be accessed as well. Of course sessions are server-side and Silverlight runs completely client-side. The cool thing about this is that it's (sort of) statefull, which is probably one of the reasons I like it so much! ;-)

I'm now going to listen to the master; Nikhil Kothari.
More to come, stay tuned!

Technorati tags: ,
MIX07 announcements

So day one is behind us, but what are the big announcements that have been made?

  • Silverlight 1.0 Beta is released
  • Silverlight 1.1 Alpha with .NET support
  • Silverlight Streaming Alpha
  • Silverlight tools for Visual Studio "Orcas"
  • Silverlight for mobile
  • Expression Blend 2 was previewed
  • Expression Media Encoder
  • Dynamic Languages Codeplex project
  • Astoria & Jasper

Okay, so most is about Silverlight. Of course we've all downloaded and seen WPF/E, the codename for Silverlight. Microsoft doesn't see Silverlight as a Flash killer, or at least they won't admit that publicly. And I agree, because Silverlight goes way beyond what's possible in Flash. The good thing is of course that Silverlight is cross platform and that it already runs on Mac.

Some demos were presented at the keynote and they were just awesome. Netflix is a company that delivers streaming video, but enhanced their (not yet live) website with Silverlight. They are now offering exciting new features, one of them called 'sharing'. Friends can synchronize the movies they're watching and chat about it inside the Silverlight application, while watching it. Metaliq converted a video editing desktop application to Silverlight. Although the features could not match those of a lot of other packages, it's amazing what you can do now with a web application! The website for Major League Baseball also showed the history of their website. Where in the past they showed streaming in an embedded media player they can now offer many, many new features in their Silverlight application. For example chatting with friends or other baseball fans, picture-in-picture, sharing your favorite clips, etc, etc. NBC also showed the potential of Silverlight media sharing by giving the example of users uploading their video and NBC showing the most favorite video of the day live during their show on tv. With the question to upload more and vote for your favorite video.

These are all video streaming examples, but it's just great to see what's possible with Silverlight and the web.

.NET Cross Platform inside Silverlight
The best however is yet to come! In Silverlight 1.1 we'll get .NET support inside Silverlight! That means instead of javascript, you can develop in .NET and this will run inside your browser, on the local computer of the visitor. According to Scott Guthrie, this is 1000 times faster than javascript. The best part however is, that it's also cross platform and available already on the Mac! Scott showed a demo where he attached the debugger to a remote machine, a Mac, and upon refreshing the Safari browser, a breakpoint was hit on his Windows Vista Visual Studio "Orcas" machine! Now that was cool! Unfortunately not coming to you very soon, as Silverlight 1.1 will hopefully go beta Q3 this year.

Silverlight for mobile
Another cool thing was that the MLB.com presenters showed their site on a mobile (HTC Vox to be exact, for the geeks as well as Mike ;-) which had Silverlight loaded and they watched a streaming video from their mobile Silverlight site.

Silverlight services
Microsoft will provide free hosting capabilities of up to 4GB (and I believe 10 minutes length max per video) for your Silverlight videos. It'll be located at http://silverlight.live.com/

Also www.silverlight.net has been put online this morning.

The rest
Of course Silverlight tools for Visual Studio "Orcas" is project templates, intellisense, etc inside Visual Studio. Dynamic Media Encoder however was another cool application. It's a preparation tool, as Scott called it, for your videos you want to stream in Silverlight. You can take your regular video and decide what quality you need, for example. Wayne Smith from Microsoft came along and he presented a cool feature in which you could watch the video after encoding it for small-band internet connections. You could see the decrease in quality of the video, but the preview window had a slider that you could use to split the video. One side was the original, the other side the lesser quality version. It worked really well! Also available are some templates to add vcr like control buttons to your video, as Youtube and Google Video have.

Astoria and Jasper I will get back on.