开发应用程序-哪种语言? [英] Developing an Application -- Which language?

查看:58
本文介绍了开发应用程序-哪种语言?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

因此我正在开发一个应用程序,该程序将从晒黑床中获取信息并将其显示在网页上,以便客户可以看到等待的时间.床将连接到控制模块,该控制模块将通过RS-232和USB连接到计算机.我的问题是,我应该写的是C还是C#?优点/缺点是什么?

Hi guys,

so I''m developing an application that will take information from a tanning bed and display it on a webpage, so customers can see how long the wait is. The bed will be connected to a control module which will be connected to a computer via RS-232 and USB. My question is, should I be writing this is C or C#? What are the advantages/disadvantages?

推荐答案

我会使用C#,因为开发速度更快(C可能会为您提供最佳的应用程序速度,几乎
I would use C#, because of faster development (C would probably give you best application speed, that is almost irrelevant in such a case).


您提到了三种不同的语言,而不是两种:C ++,C和C#.

简短的答案是:取决于您.这也高度取决于您的知识和技能.

关于优缺点:首先,答案可能太长,无法符合快速问题与解答的格式.答案.而且,许多项目将是模棱两可的:从不同的角度来看,优势可能表现为劣势,反之亦然.不,这个问题并非完全有效.

您不能将C#与C/C ++进行比较,就像平台所使用的语言非常不同一样. .NET中无法解决的系统特定问题数量有限.在这种情况下,您可以使用本机解决方案或混合解决方案:一部分工作用C编写,一部分用.NET编写(C#或其他内容无关紧要). USB可能会出现这种情况,.NET捆绑的库不直接支持USB.完全支持RS-232,请参阅System.IO.Ports.SerialPort http://msdn .microsoft.com/en-us/library/system.io.ports.serialport.aspx [ http://www.codeproject .com/search.aspx?q = USB& doctypeid = 1 [
You mentioned three different languages, not two: C++, C and C#.

The short answer is: it''s up to you. It also highly depends on your knowledge and skills.

As to advantages and disadvantages: first, the answer could be too long to fit the format of Quick Questions & Answers. Also, many items would be ambiguous: and advantage could appear as a disadvantage from a different point of view and visa versa. No, this question is not perfectly valid.

You cannot compare C# with C/C++ just as languages as the platforms are very different. There is a limited number system-specific problems that could not be solved in .NET. In this case, you can use native solution or a mixed solution: part of the work is written in, say, C, a part of it in .NET (C# or something else, does not really matter). This can be a case with USB which is not directly supported by the libraries bundled with .NET. RS-232 is fully supported, please see System.IO.Ports.SerialPort, http://msdn.microsoft.com/en-us/library/system.io.ports.serialport.aspx[^].

I would personally try to do as much as possible using C#, as this language not so archaic as C++, provides much better support of the programmer''s work and invite less bugs; and interoperability with different platform is not a problem for me. Besides, CodeProject provides a number of ready-to-use USB solutions: http://www.codeproject.com/search.aspx?q=USB&doctypeid=1[^].

For someone else, the choice can different.

—SA


^ ]是我在CP上发布的第一件事-基本上是一个代码转储.它也与您的应用程序所需的内容有关,并且更好地在此处进行了说明. [ ^ ].

在他的回答中,SAKryukov提供了指向Microsoft文档的链接.

最好的问候
Espen Harlinn
This[^] was one of the first things I published here on CP - basically a code dump. It''s also just about what you need for your application, and it''s better explained here[^].

In his answer SAKryukov has provided the links to Microsofts documentation.

Best regards
Espen Harlinn


这篇关于开发应用程序-哪种语言?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆