Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Understanding Windows Phone 7 Development. (.net, c#, silverlight, xna) how do they interact together?

I come from a web development background and am looking into writing applications for the Windows Phone 7 device and am trying to get a better understanding of how things work.

From my online research (and please correct me if i'm wrong in the questions i ask below), this is what I understand so far:

.NET Framework - is a controlled environment that allows you to write in many different types of programming languages like C#

  • C# is best for wp7 development?
  • Visual Studio 2010 is best for writing code for the .NET framework?
  • Are there other programs like Visual Studio 2010 that allow you to write for .NET framework?
  • C# is the pre-written code in Visual Studio 2010?

Silverlight and XNA - are "libraries" that are made to help you with the development of applications and games.

  • C# is used to manipulate these libraries into doing what you want them to?
  • IS Silverlight & XNA libraries embedded in C# similar to how jQuery is embedded in HTML? Do I have the right idea on this or am I completely wrong?
  • Silverlight is a library that needs to be included into your application in order to run (a file named silverlight.js perhaps?)
  • What is the programming language behind silverlight, java? I read somwhere that java is also used in wp7 development? how does java come into play with wp7?
  • Silverlight is best used for applications and XNA is best used for games.

And the best software write all of these apps in is Visual Studio 2010??? I downloaded the Windows Phone 7 Tools and it installed about 12 things on my computer... I've been watching a few beginner tutorial videos on developing for the wp7, but as you can see I still have some "core" things i need to understand before i proceed.

Any help you guys provide will be gladly appreciated!

like image 666
Oneezy Avatar asked Jan 22 '11 23:01

Oneezy


2 Answers

Q: C# is best for wp7 development?
A: It's not "best" unless that's the language you prefer and know. You can use C# or VB.NET and achieve the exact same results, so neither is better in that respect.

Q: Visual Studio 2010 is best for writing code for the .NET framework?
A: For Phone 7, Visual Studio 2010 is your only option for the development environment. For other, non-Phone 7 development you can use otehr tools. Again, "best" is subjective for those scenarios.

Q: Are there other programs like Visual Studio 2010 that allow you to write for .NET framework?
A: Yes, but not for Phone 7. Again, only Studio 2010 has Phone 7 integration and is therefore your only tool option.

Q: C# is the pre-written code in Visual Studio 2010?
A: C# is a language. Like VB, C, C++, Pascal, etc. You can write it in anything, including a text editor.

Q: C# is used to manipulate these libraries into doing what you want them to?
A: The Silverlight or XNA libraries, for the context of Phone 7, can be consumed by applications written in either C# or VB.NET.

Q: Is Silverlight & XNA libraries embedded in C# similar to how jQuery is embedded in HTML? Do I have the right idea on this or am I completely wrong?
A: No, you don't have the right idea. Silverlight and XNA are frameworks that you use for creating your application. The language is either C# or VB.NET. It's somewhat like jQuery is a framework that can be used to create applications written in Javascript. So, using your examples, Silverlight is more like jQuery and C# is like Javascript.

Q: Silverlight is a library that needs to be included into your application in order to run (a file named silverlight.js perhaps?)
A: Silverlight and XNA are sets of libraries that already exist on the phone. You don't build them into your app, nor do you deploy them. They are guaranteed to already be there.

Q: What is the programming language behind silverlight, java? I read somwhere that java is also used in wp7 development? how does java come into play with wp7?
A: The Silverlight engine on the phone is, at least in part, written in managed code. It was probably done in C#, but it's actually not relevent as it's compiled down to MSIL in the libraries you directly consume. They are not Java. Java is not supported at all on the phone (though one might argue that Javascript is through the browser and browser controls).

Q: Silverlight is best used for applications and XNA is best used for games.
A: That's the general idea and the likely thinking behind the design of both, but it's not always so clear-cut. You could write a non-game app with XNA, just as you could write a game in Silverlight.

like image 58
ctacke Avatar answered Oct 14 '22 09:10

ctacke


C# is the first language available for WP7 development. Being the first, the documentation and msot samples on the net are done with C#, so that can help. There is also VB now. This will likely be a matter of preference for people. There are a couple of limitations to VB's support at the moment (lacking Blend and XNA support).

You will be using VS2010 for WP7 development. It's the only tool supporting Windows Phone 7 development at present and the Express version comes free with the WP7 tools.

I'm not sure what you mean about pre-written code.

The Silverlight and XNA frameworks are effectively libraries that you can utilise with your chosen language. C# for example.

Java doesn't really come into play.

Here is a good post that covers Silverlight and XNA considerations including some discussion on when to use which. It is somewhat like you say, but it's not a firm rule.

XNA for Silverlight developers: Part 0 - Why should I care?

There are also some questions here where people have given their thoughts on this question.

I recommend also watching some of the introductory videos online from Mix 2010 or Tech Ed 2010 NA for getting some more of the fundamentals cleary understood.

like image 38
Mick N Avatar answered Oct 14 '22 09:10

Mick N