C ++ / CLI或C#在Windows上建立快速,现代,反应灵敏的GUI
目前,我分成这两种语言之间。我几乎一半的编程我目前的应用程序,它需要非常快。它计算在多个负载条件下任何形式的中空玻璃结构。
Currently I am split between these two languages. I'm almost halfway through programming my current application which needs to be very fast. It calculates insulated glass structures of any kind in multiple load-conditions.
我只是不知道它是正确的选择在C ++ / CLI写。在互联网上,比如我从来没有看过的名字C ++ / CLI但每个人都建议学习C#。
I just do not know if its the right choice to write it in C++/CLI. On the internet for example I never even read the name "C++/CLI" but everyone advises to learn C#.
什么是C ++ / CLI真的在缺点?我从我的阅读,它注定是pcated在未来几年内德$ P $聚集。这是真的?如果有一些,他们是如此糟糕,这是真的需要切换到C#?
What are really the downsides of C++/CLI? I have gathered from my reading that it is doomed to be deprecated in the next few years. Is this true? And if there are some, are they so bad it is really necessary to switch to C#?
目前来说对C#的唯一的事情是,我的C code,我需要访问,我不能够创建.Dll中的因安全问题和黑客prevention。 (该计划将是非常昂贵的)
The only thing currently speaking against C# is that I have C-code which I need to access and I am not able to create .Dll's due to security issues and hack prevention. (The program will be very expensive)
还有什么其他的机会做我为了写一个快速的图形用户界面的Windows(也与3D动画和多核乃至图形核心处理)?
What other opportunities do I have in order to write a fast GUI running on windows (also with 3D Animation and Multi-Core and even Graphic-Core Processing)?
在搜索更高的性能,我已经移植了大量的C#/ WPF UI到C ++ / CLI(其中已发展到的 C ++ / CX 因为它涉及到的 WinRT的)。重要的是要记住,这不是C ++,但C ++语言来支持.NET一组托管扩展是很重要的。我喜欢低层次的UI编码,并经常写了大多数控件在WPF中,来自的 DrawingVisual 或的的UIElement ,根据用户输入的要求。
Searching for higher performance, I had ported a great deal of C#/WPF UI to C++/CLI (which has evolved to C++/CX as it relates to WinRT). It is important to remember that it isn't C++, but a set of managed extensions for the C++ language to support .NET. I love low level UI coding, and often wrote most controls in WPF, deriving from DrawingVisual or UIElement, depending on user input requirements.
我个人不喜欢的扩展(喜欢使用帽子^),并发现它非常不自然。我没有看到从C#(和新发布的4.6似乎已经取得了更多的改进)大幅上涨。我个人认为C ++ / CLI将很快成为过去的事情了。我绝对不是单独与我对C ++ / CLI的厌恶,而男人喜欢肯尼 - 科尔有过的大的影响对整个事情。事实上,我predict MS将采取他的图书馆和日落C ++ / CLI干脆。
I personally disliked the 'extensions' (like using hats ^) and found it very unnatural. I didn't see big gains from C# (and the newly released 4.6 looks to have made additional improvements). I personally think C++/CLI will soon be a thing of the past. I am definitely not alone with my dislike towards C++/CLI, and guys like Kenny Kerr have had a big impact on the entire matter. In fact, I predict MS will adopt his library and sunset C++/CLI altogether.
在倾倒了整个项目,并迁移到纯C ++ / Direct2D的。我严重低估了开发时间,但我发现巨大的收益。这不是一个容易的道路,因为你会写自己的控件(文本框和所有)。不过现在有 Win2D (Direct2D的包装器),它提供的控制,并且看起来是一个很好的解决方案(但它是不可用的时候我就开始了,我不打算现在改变)。
After dumping the whole project, and migrating to pure C++ / Direct2D. I grossly underestimated the development time, but I found HUGE gains. It is not an easy road, as you will be writing your own controls (textboxes and all). However now there is Win2D (wrapper of Direct2D) which provides those controls, and looks to be a great solution (however it wasn't available when I began, and I have no intention of changing now).
我不能快乐与现在我的决定,但我肯定有沿途的一些疑虑,而不一定会建议工作,除非你的心脏是真的在它的长运输。否则,坚持你所知道的。
I couldn't be happier with my decision now, but I certainly had some doubts along the way, and wouldn't necessarily recommend that effort, unless your heart is really in it for the long haul. Otherwise, stick with what you know.
编辑:并顺便说一句,任何那些谁说的C#/ WPF是一样快,因为C ++ / DirectX是无论是在否定或妄想。而随着一些包含在VS2015的优化改进,你会惊讶于小尺打印和性能,这将导致。和拆卸。NET的依赖是一个巨大的减肥效果,而这样就很难为那些谁打算反向工程的产品。
And by the way, any of those who say C#/WPF is just as fast as C++/DirectX is either in denial or delusional. And with some of the optimizer improvements included in VS2015, you will be amazed at the small foot-print, and performance that will result. And removing the .NET dependency is a huge weight loss, while making it very difficult for those who intend to reverse engineer your product.
编辑2:如果您目前不知道C#/ WPF,那么当然的避免它,特别是因为你已有C code(这就是为什么我upvoted Dave的答案)。如果性能是至关重要的,现在是一个完美的时间跳进的DirectX 12 (从MS技术最佳性能)。祝你好运,听起来像一个有趣的项目。
EDIT 2: If you do not currently know C#/WPF, then of course avoid it, especially since you have existing C code (which is why I upvoted Dave's answer). And if performance is critical, now is a perfect time to jump into DirectX 12 (best possible performance from MS tech). Good luck, sounds like a fun project.
修改3:如上所述(相对于肯尼克尔)的这里是最近宣布,将有可能开始新的时代,日落C ++ / CLI和C ++ / CX。
EDIT 3: As stated above (with respect to Kenny Kerr), here is a recent announcement which will likely begin the new era, and sunset C++/CLI and C++/CX.