Silverlight with XNA vs purely HTML5 - c#

I recently decided to go into WP7 app development, but haven't actually started learning silverlight/xna; Only C#. I already know C++ quite well.
my Dad, who works for Microsoft, has recently told me that there's no point to learning Silverlight because it will become irrelevant in the long run; due to HTML5's superiority. However, Im not aware of any way to develop apps for WP7 using HTML5, and I barely know anything about markup languagez anyway.
I wanted to get some proffesional advice on this, so here's my question:
Taking my C++ backround into account, what would the pros/cons of the HTML5 path and the WP7/silverlight/xna path? In terms of financials (cost of WP7 app submition, website hosting, etc), familiorarity (C++), and flexability (abilities of language)?

Right now there is only one way to develop good apps in term of UX and OS services - Silverlight/XNA (not only first or second, but you can combine these two in a one app). Later MS will add support for C++, hence you are C++ dev the best option is to pick up C# and start making apps.
Regarding this "Silverlight is dead long live...eee HTML 5?". We all have heard that there is a new thing that solves all the problems and would be great - all of them failed, badly. Sure, it has it place, but mobile HTML5 apps suck in comparison with native apps. They're slow, use a lot of resources. Moore's law exponent is slowing down, size of a phone is limited and batteries capacity doubles every ...40 years. Cannot put a lot more silicon, make transistors many times smaller, this is not the best scenario for HTML where you have to download it, parse it and then download css, javascript, pictures etc. while users want their phones to be fast and fluid. One trick pony does one trick.
Maybe there will be some form of compilation to Binary HTML/bytecode, yet right now I don't believe ya.

The Silverlight/XNA route feels 100% natural for me as a Developer. I started building an WP7 app about 2 weeks ago and completely I'm blown away by how productive C# / Silverlight has allowed me to be. That is, with ZERO previous experience in Silverlight/WPF... Just my general .NET/C# knowledge.
Silverlight might be going away from the Browser, but I think it has a very bright future on Windows Phone and Windows 8.
I found this book extremely helpful: http://www.gottabemobile.com/2010/11/04/101-windows-phone-7-apps-the-book/
Good luck!

You could look in to PhoneGap for building native WP7 apps from HTML5.

Related

Multiplatform project (iOS/OSX, Windows and optionally Android) using C#

I know this type of question has been asked a lot, but I really can't find something that nails what I'm looking for, so hopefully this is not considered an "asked without research"-question.
The backstory: I'm developing an app that initially was supposed to work on OSX/iOS, but having a Windows version is already a must. I'm trying to find out the easiest way for me to have to translate as little as possible between each version, and preferrably without having to learn too much new (I have a little time constraint).
I'm using C#, currently developing in Mono
I'm used to the Cocoa API on iPhone using MonoTouch
So, my options (as I see them now):
Go native on mac, meaning having to make a separate graphics routines for the other OSes - makes the mac version easy-peasy, and I could postpone any learning curve for the other ports, however I guess it requires a lot more meddling when porting
Use some kind of XML markup or HTML/JavaScript as a presentation layer, with hooks on links triggering backend events (I don't know how well that would work on different platforms) - would require me to learn a bit of JQuery, but it seems pretty straightforward
Make it an XNA project and use MonoXNA (or similar) to port - would require me to learn enough XNA to do it, don't know if it's a pain
Use some other multiplatform 2D kit I don't know of
Basically, I need animated 2D sprites, mouse and touch input, and it would really be nice to have movement keyframes and maybe rotation.
There's also sound, of course, but playing a sound file seems so simple on all platforms that writing platform-specific shouldn't be much hassle.
Have a look at MonoGame. It should suit your needs pretty well I think.

Best Windows language for multitouch and large bitmaps?

I will be developing an interactive application, involving multitouch, several layers of large bitmaps, and video playback. The screen resolution will be fairly large (1920x1280).
For several years, I have developed interactives in Flash, iOS, and OS X Cocoa. However, this project must run on a Windows box, so iOS & Cocoa are impossible. Also, I'm concerned about performance in Flash, since there may be 3 videos playing simultaneously, and large bitmaps moving around.
I know little about the technologies available on Windows. I'm investigating Silverlight, C#, Unity, Processing, and Java. If anyone can offer advice, it will be greatly appreciated.
You seem to be investigating several technologies on different levels:
C# and Java are programming languages. What you prefer may depend on your existing skills, but C# is from Microsoft so chances are that you will experience less friction using this language if you develop for Windows. Picking the right programming language is an important decision.
Silverlight is a "technology stack" from Microsoft. It enables you to develop XAML based applications that run in the browser. Compared to the native WPF stack it is less powerful. Choosing Silverlight, WPF or another technology stack like Processing.js is an important decision.
Unity is a dependency injection container from Microsoft. You can use this or any other suitable container if you like. Or none at all. You don't really have to think about this until you have made some of the more important decisions about your project.
Personally, I don't have experience with the type of application you describe, but I would go with C# and WPF. WPF has some support for multitouch on Windows, and only if it isn't adequate for your requirements you need to to go native and develop in say C++ which tends to require more work.
Multitouch in Windows 8 has been redesigned but unless you want to develop for a yet to be release operating system this is not an option.
Use Visual C++ if you like to create a LAN based Application, C++ is known for it's power and you could have many resources that could help you in developing this application. If you're going to create this application for web Use ASP.net(C#) C# is known for its flexibility and class libraries dedicated for web and client appilcation i also advice the use of WPF and Silverlight applications.
I suggest you have a look at Windows 8 and Metro Apps. Here is a link to start with this: The Microsoft BUILD conference, Windows 8, and the new UX Challenge. C# (.NET languages in fact), HTML5 and XAML are clearly the direction. Native C++ is back in town with WinRT. Silverlight is now in the gray area :-)
Even if you don't use Windows 8, it will give you a good overview of multitouch future in the Windows space.

What is better for developing app for windows phone 7

I am a Dot net C# developer web and desktop apps, recently I have decided to begin development for windows phone 7
from the initial searching on the internet I found that I could user silver-light or XNA Framework for developing on WP7
I do not know any thing about both of them, so do I have to learn both of them to be able to develop WP7 APPS or just one is enough
also Which is better for development if one is enough!
Thanks in advance.
There is no good answer for this question if you do not describe application you want to develop. Both technologies are useful for different purposes. I had the same problem with my applications and those my conclusions:
Silverlight: better for business applications when you have small amount of animations (GPU usage)
XNA: high quality games and rich animations
Of course you can use also Silverlight for games and XNA for business application but generally I spot that it will not work well in most cases.
I first start to implement my application in Silverligh (app with lots of animations) but performance was poor so I decided to switch to XNA. If you want to learn basics of both read Charles Petzold Programming Windows Phone 7
Welcome to WP7 community.
Basically if you want to make event-driven applications, Silverlight is the answer and if your code depends on continuously running loop(like in a game) XNA is the thing.
As u have said dat u develop apps, Silverlight is the light for your question.
You can get lots of samples on net. The official site is http://www.create.msdn.com.
I think Silverlight is easier to start with.
to simplify, Silverlight is intended to be for apps, while XNA is intended to be for games.

Comprehensive tutorial for beginners on how to write Windows GUI programs

I'm trying to learn how to write Windows GUI* programs in C++, using Visual Studio 2008, but I haven't found any more comprehensive tutorial for beginners.
The more comprehensive tutorials I have found are either only about how to make buttons, menus, etc. OR only about how to write basic C++ console programs.
What I haven't found is a more comprehensive tutorial for beginners on how to combine buttons, menus, etc. with C++ code.
In other words, I'm looking for answers to the question: How do I link menus, buttons etc. to C++ code?
If you know where I can find answers to that question, post them here, please!
Note: "Graphical User Interface (GUI): Includes such things as icons, panels, and interactive windows, to enable users to perform such actions as opening files and creating applications with the click of the mouse" (intoweb.co.za/et-linux-tips.html).
I'm currently reading a C# tutorial at techotopia.com, that seems to include not only C# basics but also useful information on how to use C# to get buttons, menus. etc. to actually do something. I only started reading the tutorial, though, so how useful it actually is I don't know yet.
I've now finished reading the C# tutorial at techotopia.com and learned some basic facts about how to actually make controls on a windows form do something. Had I known what I now know about C# earlier, I most likely would have chosen to learn that language before I started learning C++.
It's beyond me why each and every C++ GUI programs tutorial for beginners aren't written in the same style as the tutorials at techotopia.com. I see no reason why C++ GUI programs tutorials for beginners can't be both crammed with basic facts AND explain even the simplest things to people like me, that need such explanations to understand a new subject. Well, there probably are such tuturials, only I haven't found them.
Now is the time, I think, to make a short list of what steps I have taken to get where I am today when it comes to computer skills in general and ability to write computer programs in particular. I'm posting the list here for the benefit of people who wants to become good at writing computer programs but don't know how to reach that goal or have mislead themselves, as I have time and time again. It's not a final list in any way. It's just a short account of what have worked for me.
Step 1. Use lots of computer programs (word processors, image editors and what else you're interested in) to see what can be done with a computer.
Step 2. Write web pages with HTML and CSS. HTML, Hypertext Markupup Language, are used to tell browsers things like the beginning and end of paragraphs, the structure of tables and where to include images. CSS, Cascading Style Sheets, are used to add things like text-size and background-color to web pages.
Step 3. Improve your web pages with PHP. PHP, Hypertext Preprocessor, reminds of C# and C++ and is a server-side scripting language. Server-side means that something is done to a web page before it is sent to a visitor's browser, like adding code that makes it possible to send a message. PHP is easier for a beginner than C# and C++. Also, if you have written some HTML pages, you can gradually add PHP to these pages. In other words, you can learn how to use PHP in a familiar context.
Step 4. Learn C#. Reminds of PHP and C++. More difficult for a beginner than PHP but easier than C++. This is where I am right now. These links may be of at least some use:
Quick And Dirty Guide To Migrating PHP Code To C#
C# Station C# Tutorial on how to write console programs
dotnetperls.com
George Shepherd's Windows Forms FAQ
C# Corner
csharp-examples.net/examples (very short code snippets)
Visual C# at msdn.microsoft.com (probably more useful when you're no longer an absolute beginner; at least I think so)
Some basic C# tutorials (written by me and not amongst the best tutorials you can find; however, I would have found a page similar to this one useful when I first started learning C#)
Step 5. Learn C++. Reminds of PHP and C#. More difficult for a beginner than PHP and C#. Allows the programmer to control more than C#. Some people say it's faster than C#, while other people don't. This is where I hopefully will be within a year or so.
Since there are as many roads as there are budding programmers, these steps may not be right for you. Hopefully, though, the list above is of at least some assistence to you when you decide what steps to take to reach your goal.
If you know more about programming than I do and disagree with the list above, feel free to provide your own list. If you do, I think you should also explain why you think your list is better.
Charles Petzold wrote a book on that.
I haven't read it, but his Win32 UI book is widely known as hilarious, so it is expected to be good for beginners.
As you can probably already tell from other answers and comments, the term "Windows Forms" is the name for a specific .NET technology.
You seem to want to ask a question more along line of how to learn to write Windows programs that have a GUI (menus, buttons, windows, etc).
There is no single way to write a Windows program. C++ itself doesn't know anything about Windows. Instead you will end up using some API or framework. So what you need to do is choose which particular one you want to use and then learn that.
At the lowest level there is the raw
Windows API. However it is a very
C-like interface and few people would
recommend starting there.
Microsoft's C++ based framework for building Windows programs is MFC (Microsoft Foundation Classes). It was created long before .NET and C++/CLI and such. Being so old, there are aspects of it that haven't been able to change to keep with the times and so some people don't like it. But it's still supported and used. In fact, if you have a full version (not an express version) of Visual Studio then you already have MFC available.
There are various other C++ frameworks that have come along more recently. Qt and WxWidgets are a couple of the bigger names. Many of these not only give you a way to create Windows programs, but also try to abstract away all the OS-specific details so that your code can be compiled to work on other OS's (like Linux or Mac) too. In my opinion, these are often more pleasant to work with than MFC once you learn how.
Even though its not what you're asking for, many people would actually recommend using C# and .NET for making GUI programs in Windows. There are some nice aspects of that language and framework that make GUI programming easier.
So you probably need to do a little investigation to determine what technology you actually want to learn and use. Then you can go searching for appropriate tutorials.
A somewhat old thread but here's what could arguably be the updated Petzold replacement:
"Windows System Programming (4th Edition) (Addison-Wesley Microsoft Technology Series)"

C# GUI programming for beginners: Where to start? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I'm a C++/Java developer and have no idea about .Net or GUIs. I need to develop a windows app for 2000/XP/Vista/7.
I think I've come to conclusion that C# is the best and the fastest way to go (please correct me if I'm wrong). What do you recommend? Which GUI approach should I learn? (Forms? Any other stuff?)
Is it the best way to compile in .Net 2.0 mode? It's going to be an application for the public to download.
For desktop applications there are basically two options; WinForms and Windows Presentation Foundation (WPF).
WinForms is more traditionally built and hence easier to learn. WinForms might therefore be a simpler start, but if you plan on actually using your gained knowledge in GUI development for .NET I'd say you're better of diving into WPF from the start. It's a much richer framework, and where Microsoft is putting their effort for desktop applications. It is also similar to Silverlight, meaning you can easily get into Silverlight too when you know WPF.
This other question gives some useful resources when getting started with WPF.
Also check out this tutorial at MSDN.
WpfTutorial obviously has a few nice hints for you too!
Good luck!
In my personal development experience Windows Forms is just about as easy as it gets when it comes to rapidly deploying a GUI application on Windows. WPF is of course another option, but using it would likely require you spend some time familiarizing yourself with XAML. Windows Forms look and feel like a lot of the available GUI options for Java, it's just much better than the majority of them, in my opinion.
If you want the fastest possible GUI development time in .NET, Windows Forms is it.
Yes. C# is the language of choice when it comes to .NET development. Since you've programmed in Java, you'll find that the language looks very familiar (it looks a bit cleaner though and has some very nice features like delegates and you can even use pointers if you really want to, although you won't need to in most circumstances).
It's SWF (System Windows Forms) or MWF (Managed Windows Forms - a lightweight version of SWF written in managed Code using System.Drawing - it frees you from the WinAPI that's underlying classical SWF) all the way.
There's also GTK-Sharp, a GTK+ binding for C-Sharp, but since you're developing for Windows, users will find it strange to install a third-party GUI framework for your application.
I wouldn't recommend using WPF though. It makes direct calls to the underlying graphics hardware, which means it's quite fast, but not portable at all. It will only run on x86 systems (not SPARC, etc.) with DirectX compliant hardware rendering units (graphics cards) and it will not run on a system with strong hardware abstraction (like most Unices like BSD or Linux or Solaris).
Novell also stated that they will never implement WPF in the near future due to it's strong hardware dependencies (Novell wants Mono to be portable across many processor platforms). Don't use WPF. Software is no longer just a throw-away-product and when it comes to operating systems we're in the age of spin. The platform you're running today isn't necessarily the platform you're gonna run tomorrow. WPF is a proprietary and patent-encumbered technology developed by Microsoft and Intel. If you use it, you'll find yourself in a very nice Win32-on-x86 vendor lock in. And this means that you'll most definitely find yourself completely re-writing your application sooner or later. Just write portable software from the beginning, even if you don't need that portability today. I'm telling you from experience, you will need portability tomorrow. Definitely!
You could use Windows Forms or Windows Presentation Foundation to develop your GUI; although, Windows Forms might feel more familiar to you. If you search on Google for Windows Forms tutorial, you will get many options for getting started.
If you need to use .NET 2.0, you will be limited to Win Forms. WPF requires .NET 3.5.
I would suggest downloading Microsoft's free Visual Studio Express Edition to use for developemnt. it includes an excellent drag-and-drop GUI design tool.
I would recommend learning Winforms first, then move the WPF. Winforms is easier to learn and get something working quickly. The future however is WPF, so I wouldnt leave that in the dark. I posted some good books and links for GUI development work.
Books
Design of Everyday Things A really good book about design of interfaces. It's not software specific but a must read for GUI designers.
Coding Horror. He recommends a lot of development books on his book list, but these ones are specifically interface-related:
Don't Make Me Think
About Face 3.0
The Inmates Are Running the Asylum
GUI Bloopers
Web Links
Are Confirmation Dialogs Harmful? A blog entry by Guido van Rossum (creator of Python)
GUI Articles A few articles about GUIs by Joel Spolsky (joelonsoftware.com)
Interfaced Systems International Has a lot of resources, especially on their UI References page
User Experience Guidelines for Windows Vista
I disagree with all the WinForms advocates. It's not easier. It may be easier for someone who has traditional experience with GUI programming, but this poster doesn't have that.
WPF has a better design story and the databinding is much, much better than WinForms. You can get up and running on WPF at least as fast as WinForms, and then go much further without running into the limitations that WinForms has. Couple this with the design-time databinding in VS 2010, and I'd say that anyone starting out on GUI development should completely bypass Winforms.
C# WinForms will be the fastest in terms of getting a practical GUI working rapidly. Though if you think on making a complex GUI, with animations, 3D etc, WPF would be better.
You can use CodePlex to find some good working projects to learn from in terms of best practice, both for WinForms and WPF.
You can also look here for some good books on both WPF and WinForms.
C# for sure. Use Winforms for line of business app / classic GUI.
read petzold 'programming windows with c#'
Or just dive in with visual studio. Creating GUI with VS is really easy - you will like it
You will find the langauge transition from java to c# pretty simple (not the gui bit tho)
I think I've come to conclusion that C# is the best and the fastest way to go (please correct me if I'm wrong). What do you recommend?
Personally, I would stick with Java. We (meaning OffByZero, the company I co-founded) have released an encrypted text editor called OBZVault, which is written in Java.
We originally wrote it in Linux, and then ported to Mac OS X and Windows. We found that the Windows port provided a perfectly acceptable look & feel - almost (but not exactly) like a native Windows app.
We used InnoSetup to build a native Windows installer, and found that quite good as well.
Bottom line: unless you want to learn a new language & platform, or you have a specific need for functionality provided by a different platform like .NET, stick with Java for your Windows development too. You'll need to learn a Java GUI framework, but then you'd have to learn WPF or WinForms if you switched to .NET anyway.
It may be faster for an experienced .NET developer to build a Windows app in WinForms or WPF, but if you're already well versed in Java I say stick with the tools (language, libraries, IDE) that you know.

Categories