I'd like to go down the route of porting a WPF/Silverlight component to Windows 8. For a bit of context, the component is a real-time WPF Chart, which uses a mixture of WPF/XAML and bitmap rendering to achieve high performance.
I'd like the component to be Metro compatible, e.g. used in metro mode as well as desktop mode. I read a lot about creating C++/WinRT applications in Windows 8 as well as C#/XAML applications, but what are the differences between the two frameworks?
Are there limitations if you choose C#/XAML over C++/XAML? Also consider the porting from C#/Xaml in .NET4.0 to Windows8 would be far easier if I could stick to C#/XAML, however will I be able to create a fully featured Metro component using this method?
Your comments/suggestions appreciated.
Edit:
If you're voting to close this thread, please post a comment why. Its a valid question, has +6 votes, four answers and one favourite. Seems reasonable to keep it to me!
As a middle-level language, C combines the features of both high-level and low-level languages. It can be used for low-level programming, such as scripting for drivers and kernels and it also supports functions of high-level programming languages, such as scripting for software applications etc.
C programming has an insufficient level for data abstraction, i.e., does not have very large data handling capacity. C Language does not allow the user to detect the errors with the help of exception handling features. The constructor and destructors concept is not supported by the C language.
C is still in use because it is slightly faster and smaller than C++. For most people, C++ is the better choice. It has more features and more applications, which allow you to explore various roles. For most people, learning C++ is also easier especially if you are familiar with object-oriented programming.
The idea that C is the best answer to choose when guess-answering a question on a multiple choice test rests on the premise that ACT answer choices are not truly randomized. In other words, the implication is that answer choice C is correct more often than any other answer choice.
However, recently, many more languages have popped up that can be compiled, but are simpler to write. With this in mind, programmers have to weigh many pros and cons when deciding whether or not to use this language. Wide support: C++ is a very popular language, and as such, many compilers and libraries already exist that are compatible with it.
C language has variety of data types and powerful operators. Due to this, programs written in C language are efficient, fast and easy to understand. 2. C is highly portable language. This means that C programs written for one computer can easily run on another computer without any change or by doing a little change. 3.
C is a very vast language, but it does not support the concept of OOPs (Inheritance, Polymorphism, Encapsulation, Abstraction, Data Hiding). C simply follows the procedural programming approach.
If you're not familiar with coding, then using structured language C will help you develop better skills. With C, you'll find yourself creating more efficient and effective solutions compared to those created by other programming languages. 4. Low cost If you want to build something from scratch, then C is definitely worth considering.
I see the difference as a design choice, than a personal preference of language. Preference would be more related to VB vs C#. And generally it's the same differences you get in any application where you choose C++ or .NET.
C++ will give you faster startup times. IIRC, .NET 4.5 has auto NGENing abilities (not sure how it related to metro apps), so this may help mitigate typical slow startup times of .NET applications.
C++ will give you lower general memory usage as it does not use a garbage collector. This becomes increasingly more important on resource constrained devices such as tablets. IIRC, .NET 4.5 has more mitigations into GC pauses (which can cause the UI to studder), they are still a reality with managed code.
Since .NET and C++ use the same WinRT framework, there probably won't be too much difference in interacting with the XAML/WinRT platform (technically faster interacting with WinRT objects via C++ but the hit is really small), but of course your user code will generally be faster with C++ than .NET.
C++ is generally more difficult to reverse engineer, even when compared with obfuscated .NET code. Though sly thieves can steal your IP regardless.
Since .NET was created first for the convenience of the developer and developer productivity, you will have more convenience options in architecting your applications (eg, reflection based tools such as DI/IoC).
Iterating application code may be easier via .NET as .NET compiles quicker than C++, but correctly created C++ projects this can be mitigated substantially.
Pure .NET projects can support "Any CPU", which means your application can run on all supported WinRT platforms. C++ projects you will simply have to recompile to support ARM, x86/64. If you .NET application depends on a custom C++ component, you will have to compile for each architecture.
Because WinRT was created from the ground up to support many languages, my suggestion to devs that arent comfortable with C++ is to stick with .NET but explore areas that benefit from C++. Microsoft has done a great job with the /CX projections and most C# devs should be able to find their way around. My suggestion to C++ devs is to stick with C++ and get all the benefits of C++.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With