kevinSharp | 18 May, 2011 22:46
Tero Paananen (tepaa to the Forum Nokia Community) is a full-time mobile developer and Mobile Qt team Team Manager at Digia in Finland, where he specializes in Symbian C++ and Qt development. In his spare time he recently began exploring mobile development for Windows Phone 7, and he launched the first two Forum Nokia Projects containing code for WP7 apps: XNASolitaire and Angry Monsters . Forum Nokia talked with Tero via e-mail about his experience as a skilled Symbian/Qt developer approaching Windows Phone 7 work. Here is an edited transcript of our conversation:
FN: Hi Tero. Thank you for taking the time to talk about your experience approaching Window Phone 7 work. Let’s start with tooling: What tool chains are you already using for your Qt and S60 C++ work?
Tepaa: I use Nokia Qt SDK 1.1 and Qt framework for my current projects, and I haven't done native Symbian C++ projects since 2009. The Qt framework has replaced my use of native Symbian C++ really well. Before the transition I used Carbide C++ & Symbian SDK for native Symbian work.
FN: What tool chain did you add to learn C# and create the XNA Solitaire project?
Tepaa: I installed Microsoft Visual Studio 2010 Express for Windows Phone, which covers development for web, windows, and Windows Phone platforms. One problem I had was that I had to install Windows 7 OS to run the emulator in Visual Studio. The emulator did not start on my Windows Vista machine because of some old display drivers in Vista. That apparently has been a problem for many developers.
FN: How long did it take you to install the tools and be able to compile code?
Tepaa: Not long, it’s hard to say but a half hour or less. That does not count the time required to upgrade an Vista machine to Windows 7 if you have to.
FN: Do your Qt tools run on the same machine as your Windows tools, or do you work them on separate hardware or VMware instances?
Tepaa: Yes, in the same machine. No problems.
FN: How many of your familiar design patterns from Qt and S60 C++ still work with C# on Visual Studio? What new design patterns did you have to learn?
Tepaa: Symbian C++ has an observer pattern that is familiar to me. I used that same pattern in Angry Monsters where my custom XNA Button sends information to the listener when a user presses the button. There is an interface that “button listener” has to implement to receive the messages.
Compare this to Qt and Qt Quick, both of which use signals and slots to allow classes to communicate with each other. I tried to find some kind of solution in XNA and noticed that Custom Event Handlers might be able to provide some kind of mechanism.
FN: Now that you have gone through the process, what one thing do you wish you had known before you started?
Tepaa: C#
FN: That’s interesting. Let’s dive a little into your experience learning the C# language. Did you find it a difficult language to learn?
Tepaa: Not really, it went with "my best guess". Based on my knowledge working with Java, Symbian and Qt, C# was quite familiar. Of course there are a lot of C# specialties.
FN: What were the most unusual aspects of working with C# that you had to learn?
Tepaa: Three things popped out:
FN: What were the most familiar?
Tepaa: C# in general is like Java and Qt, and that helps Qt developers a lot.
FN: How did you approach the learning -- were there videos, or examples in Visual Studio, or tutorials on MSDN that you found particularly useful?
Tepaa: Microsoft Visual Studio 2010 Express for Windows Phone SDK supports code IntelliSense that helps a lot. As an experiment, I approached the XNA Solitaire project without any C# or XNA experience, and I did not use any resources outside of Visual Studio. I just used my knowledge of other programming languages and the Visual Studio tools, and that was enough to get the job done.
For example, I needed to generate a random number in XNASolitaire. I just typed "random" in a Visual Studio code editing window and IntelliSense showed immediately that a Random class exists and showed me what parameters and methods are available for it. The same applies to the List class that I needed for managing my card deck. I typed “list” and Visual Studio showed me the class prototype.
While I did not study C# before this project, it’s time for me now and I think I found the tutorial I’ll take.
Here is another set of tutorials that look useful.
FN: If you have thoughts on how C# compares to other environments in which you have worked I think that would be helpful for developers making the transition. From your experience, does the language and environment more closely resemble your work with Qt, Symbian S60, Java, or was it a completely new experience for you?
Tepaa: I would say that working with C# and XNA Framework is a lot like working with Qt, and Silverlight (XAML) is a lot like working with Qt Quick. XAML and C# are integrated like Qt and QML, or even better. If you have Qt or Java experience, that helps.
Check out this short video of the XNA Solitaire game, then check out the full source code in forum Nokia Projects.
Comments