Home

Last stop for my Silverlight roadtrip this year; IKT Grenland

On the 27th of November, IKT Grenland in Porsgrunn Norway is hosting their developer forum. They've invited me to hold a talk about Silverlight 2 and why one should use this technology.

If you're Porsgrunn and want to catch "the wind" of Silverlight, don't hesitate to register for the event here.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Post Information: Permalink | Comments (0) | Post RSSRSS comment feed

Silverlight evening at NNUG Kristiansand, 26th of November

I will be holding an all Silverlight evening at NNUG Kristiansands next user group meeting.

The meeting will be in two sections; basics of Silverlight and using expression blend together with Visual Studio to create your solutions. The second part will dwell into more advanced features and how it all fits in your enterprise development.

If you happen to be in the neighbourhood and feel like getting some Silverlight goodness, don't hesitate to sign up here.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Post Information: Permalink | Comments (0) | Post RSSRSS comment feed

NNUG Vestfold User Group Meeting, 19th of November

We're having a really exciting evening on wednesday the 19th of November at NNUG Vestfold.

Gøran Kvarv and Tore Vestues, both from Objectware, are coming to talk about WPF and Boo.

This is the first time we're holding the user group meeting out of the Notus / Visma location we've been till this point. We'll be having the meeting at this location.

To read more about the meeting and how to sign up for it, please have a look here.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Post Information: Permalink | Comments (0) | Post RSSRSS comment feed

Xna 3.0 is out

Finally the news of Xna 3.0 struck me as well. Its been some days since the release of Xna 3.0, but with a hectic schedule I am not always fitting in time to read my RSS feeds. Anywho, he Xna team delivers, again. Finally, the release of version 3.0 of Xna is out. A lot of new features is included in this release. To mention a few:

* Visual Studio Integration : Support for C# 3.0, LINQ
* Try before you buy: You can allow your customers to try your game before they buy it
* Invitations: You can programatically allow players to invite friends to join their game
* In addition Windows and Xbox 360, there is now Zune support (when will Europe get this?)
* OneClick deployment of Windows Games

If you want to get started with Xna 3.0, start at this location.

For more details on the release of Xna 3.0 go here.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Post Information: Permalink | Comments (0) | Post RSSRSS comment feed

Compiler extensions is just another framework

Over the years I've had several issues where I've longed for ways to better express my code that I felt that the language should have exposed grammar for me to make it more readable. Just like LINQ introduces an internal DSL, I've had quite a few cases were I also wanted to introduce my own internal DSL. Very often one ends up with working around it and do creative frameworks or libraries that helps doing the same thing without really solving the expressiveness.

I come to realize more and more that the programming language one chose is less important than the frameworks one use. As long as one can express the code the way one wants and perhaps even in a suitable manner for the domain you're working in, the choice of language is really not important.

Attributes
Attributes in C# are great for expressiveness, they are great at providing additional meta information for classes, fields and properties. Often I find myself using attributes for expressing business rules and having evaluation code for classes that recognise the attributes and then validates according by calling the different validation attributes applied. In my opinion, this is a bit unnatural. A lot of the attributes found in the .net framework acts as more than just meta information at compiletime. The compiler recognizes a whole bunch of the framework attributes and alters the behavior of the execution accordingly.
Ofcourse, everything that could be solved at compiletime could certainly also be solved at runtime, but it affects runtime speed and scalability.

Modifying IL code
PostSharp is a project that solves this; one can alter the IL code generated after compilation and then commit it to the assembly. Attributes is a part of the language and with PostSharp we could solve this problem and we don't need to extend the compiler.

Plumbing
Another good place were you'd might look at having compiler extensions are the places were you are basically just plumbing to make things work with how a framework wants it to work. A good candidate would be for instance the INotifyPropertyChanging and INotifyPropertyChanged interfaces were you basically are just doing the same code over and over again for all your properties. With a compiler extension you could plumb all this automatically.

Typically you would do the following:


public class MyNotifyingObject : INotifyPropertyChanging
{
    public event PropertyChangedEventHandler PropertyChanging;

    protected virtual void OnPropertyChanging(string propertyName)
    {
       if( null != this.PropertyChanging )
       {
          this.PropertyChanging(this,new PropertyChangedEventArgs(propertyName));
       }
    }

    public string Name
    {
       get
       {
          return this._name;
       }

       set
       {
          if ((this._name != value))
          {
             this.OnPropertyChanging("Name");
             this._name = value;
             this.OnPropertyChanged("Name");
          }
       }
    }
}



A more expressive way could be:

public class MyNotifyingObject
{
    public notify string Name { get; set; }
}





If you ever worked with WPF or Silverlight, you know the tedious parts where you want to have DependencyProperties on your controls. The syntax is like this:

public static readonly DepedencyProperty MyStringProperty =
                  DependencyProperty.Register("MyString", typeof(string), typeof(ParentType), null);

public string MyString
{
     get
     {
           return this.GetValue(MyStringProperty);
     }
     set
     {
           this.SetValue(MyStringProperty,value);
     }
}



Wouldn't it be a lot more expressive if we could just do:

public dependent string MyString { get; set; }



The way a compiler extension would handle this, is to fill in all the code found above to make it all work like if you were to write it all. We would get a more expressive code and actually get rid of potential problems with the literal declaring the name of the property as we do today.

C# 4.0

During PDC there's been a bit talk about C# 4.0 and further down the pipeline, Anders Hejlsberg talked about the new static type called dynamic, that will help us out getting more dynamic. I for one has been quite the skeptic over the years about dynamic languages, but I must admit that in many cases it is really convienient. My conclusion is that this is a really great step forward for the language.


Boo
The programming language Boo is a static language that can be dynamically altered by introducing new keywords into the language through compiler extensions. In addition to the compiler they've created a small framework that enables the developer to take part of the compilation and modify the AST. This feels very great and gives us developers the power we need to really express our code and give our programming model a domain specific feel. A colleague of mine; Tore Vestues blogs about Boo and all its glory. Have a look here.

Boo is great, but has a couple of obstacles before it will be embraced as a mainstream programming language by a lot of developers; syntax is one - even though I claim that the language shouldn't really matter, it sort of does. If you are familiar with the C syntax of C++,Java,C#, JavaScript, then the chances are that you'd feel that swithching to a new language is too big and you fall back. So, what about C# - if this is so great, why aren't we seeing this in C#? It is for sure, technically possible. At PDC there was a great panel on the future of programming languages where this among a ton of subjects was discussed. My impression was that Anders Hejlsberg was quite clear on this subject; they didn't want to open it all up because of the danger of devolving the language. I think this is really sad, I really hope they turn around on this. After all, as the title of this post claims; it is basically just another framework. By extending the language, and doing it like Boo has done it, wouldn't pose a threat to the language. The extensions one would build would in many cases be solving a domain specific problem and just act as just another framework one used to solve that problem.

Compiler Extensions - how
A compiler extension, would need access to the AST tree created during compile time and based upon the code and any extensions found extend the existing tree. Boo solves this in a very graceful manner, the extensions are just part of your code as you compile or you can put them in a component. It is really not that intrusive as it might sound. We're not talking about creating a whole new version of the language, rather than introducing domain specific problem-solvers or aiding in creating more expressiveness. In addition to compiler extensions, one need to hook into the IDE to get rid of all the errors one would get thrown in your face while writing code.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Post Information: Permalink | Comments (4) | Post RSSRSS comment feed

PDC 2008 - afterthoughts

So, here we are - PDC 2008 has just finished (yesterday, that is). Here is my take on what PDC 2008 was all about.

Surely, Azure - Windows in the cloud was the main attraction, and certainly interesting and a bit exciting. We will take a closer look at the technology and what this will mean for our customers when we get back home - but there is definitely something there. The ability to take an existing service or web application and scale into the cloud does sound intriguing. With the possibility to also have other services to rely on in the cloud, such as the SQL services or SharePoint services, Microsoft has a good offering and should be very competitive with their platform.

The second thing that got a lot of attention was the "Oslo" project. "Oslo" has been something I've been somewhat following a bit since the first time I heard about it, but have had trouble sort of grasping what it was all about. Every time someone talked about it, it sounded different than from the previous talk someone had. It seems that they've held the cards close to their chest on this one. What we got presented at PDC sounds very interesting; a language for creating DSLs. Sure, Microsoft has tried this before with Microsoft DSL - but this initiative seems more mature than their previous attempts.

One of the things that I was really keen to learn more about, was .net 4.0 and C# 4.0. With the introduction of the static type called dynamic, they are opening up a new ballgame to the world of static programming languages. I'm one of the guys who've always been very fond of static programming languages, but has started to see the true benefits of dynamic languages. With the introduction of dynamic in C#, there is a whole bunch of things one can do that you couldn't before - not only work with dynamic languages, but more common scenarios as well. For one, you could "consume" services at runtime, without the need for generating proxies that change over time and could potentially cause source control headaches. Also Anders Hejlsberg talked about the introduction of named parameters and default values, something that Visual Basic has had for years. Coming from a C++ world, I missed the possibility to have default values in C# for method parameters. The combination of default values and named parameters, the language will get really powerful. I'm embracing this completely.

Another subject that got a lot of attention at PDC, was not surprisingly; Silverlight 2. Microsoft released during PDC the Silverlight Control Toolkit with the full source code and test harness. There were quite a few really good talks on Silverlight 2 and I found this content to be very satisfying.

Last but not least; Windows 7. This subject needs no introduction nor explanation. :)


My take on PDC was that there was a lot of good sessions, and I attended some bad ones (without going into details here; my survey responses will reflect this). One thing I felt was a bit of a target miss, was some of the keynotes. They felt like marketing rather than targeting developers. I walked out on most of them, actually. My whole reason for being at PDC was to get good developer content, so this was a bit of a miss for me, I think.

All in all Microsoft delivered quite a bit of goods, some relevant for myself and my work and some not - but you can't please everyone. They showed off what their focus is the next years.  

Its been a really busy week, my initial plan was to blog and twit about PDC all week - but got caught up with reality of focusing in on sessions and social activity during the nights. Seeing that Microsoft has all the material up on their site, you should just jump over there and start consuming all the video feeds.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Post Information: Permalink | Comments (0) | Post RSSRSS comment feed

Getting ready and excited for PDC tomorrow

Finally, the day is almost here; PreConference PDC. Landed approximately at 3PM local Los Angeles time and picked up my rental and headed down to Huntington Beach, were I am staying at a friends house.

Tomorrow there will be all kinda cool material at the PreConference, but my eye is on (not very surprising) the Silverlight part held by Jeff Prosise (read more here). Looking forward to this and 4 more days of endless coolnes. Hope to meet up with a lot of people.

And now, on to consuming a couple of beers and enjoying life as a whole. :)

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Post Information: Permalink | Comments (0) | Post RSSRSS comment feed

Silverlight Unit Test Runners on CodePlex

The Silverlight unit test runners project started off as an internal project at work (Objectware) more or less a a proof of concept to prove that it was possible to run Silverlight unit tests based upon Jeff Wilcox' test framework. We decided early on to release the binaries of it as soon as we had it up and running.

Now we've decided to release the source code as well and we're encouraging people to join in on the development.

If you'd like to join in on the project, drop me a comment here, send a message on the leftside or a message on CodePlex. Remember to include your CodePlex username and I'll add you to the project.

Anywho, the project can be found here.


The plan
If there is such a thing as plan, I am not aware of it. :)  There are a couple of ideas, most of them are found in the project description on CodePlex. The basic idea is to be able to work with Silverlight unit tests like one is used to work with unit tests on any other project. We want to be able to use familiar tools and be able to run unit tests during continous integration.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Categories: Silverlight
Post Information: Permalink | Comments (0) | Post RSSRSS comment feed

Silverlight 2 released and available: New controls, tools

Microsoft follows up on their announcement yesterday and releases Silverlight 2 today.

You'll find everything on the official Silverlight site, but I'll post all the links for your convience here:

Silverlight tools for Visual Studio 2008
Silverlight 2 Developer Runtime (Windows)
Silverlight 2 Developer Runtime (Mac)
Silverlight 2 SDK - Offline documentation (CHM)
Blend 2 SP1

If you are using the Visual Web Developer Express 2008 edition, the Silverlight tools works fine with these as well. That is really neat, you can do Silverlight development without having to fork out any money!

Did you know that you can do Silverlight development in Eclipse?  Microsoft is funding a project to provide this. They've partnered up with Soyatec to provide the Eclipse Tools for Microsoft Silverlight.

---

There are some breaking changes between the beta versions and the release, have a look at the following document for these changes here.

Tim Heuer also have a great post with all the changes and how to get started with development and a quick overview of the breaking changes in Silverlight and in Blend2 SP1, here.


 

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Categories: Silverlight
Post Information: Permalink | Comments (0) | Post RSSRSS comment feed

Steve Ballmer + NNUG = a bunch of happy guys

Two weeks ago, the day before I got awarded the MVP title - another big thing happened. The guys at NNUG (Norwegian .Net User Group), including myself had the chance to meet with Steve Ballmer and got our picture taken with him. How cool was that. I'll tell ya..  Reallllly cool..  Thanks to Rune Grothaug with the Norwegian DPE team at Microsoft for making this happen.

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Post Information: Permalink | Comments (0) | Post RSSRSS comment feed