德尔福.NET + C# [英] Delphi to .NET + C#

查看:216
本文介绍了德尔福.NET + C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在德尔福(D7)开发了许多已经一段时间,我一直想知道的.NET + C#的东西。我的意思是关于不是德尔福的.NET或OXYGENE高科技/插件,但很干净。NET / C#。

I've been a Delphi (D7) developer for many sometime already, I've always been wondering about the .NET + C# stuffs. What I mean are about not the "Delphi for .NET" or "Oxygene" tech/plugin, but clean .NET/C#.

多少不同,它从德尔福?还有一些其他问题...

How much different is it from Delphi? And some other questions...

  • 是单声道/ SharpDevelop的(任何其他人,我应该知道的?)小马哥非免费的Visual Studio?
  • 在部署方面,它是如何工作的?大会+框架+可执行文件?
  • 在该框架(3.5最新的?)工作原理类似的JVM Java世界中,是否正确?它采取的支撑/利用像多核或Windows特定的优化技术人员的照顾?
  • 在C#有一些相似之处Object Pascal中,应该不会太艰难的适应,对吧?

感谢。

推荐答案

回复第一点:你尝试过的(免费)的 Visual Studio的前preSS版?对于很多事情,这是完全有能力。你只是没有得到尽可能多的帮手/设计师,也没有插件支持(IDE扩展)。

Re the first point: have you tried the (free) VIsual Studio Express Edition? For a lot of things, this is perfectly capable. You just don't get as many helpers / designers, and no plug-in support (for IDE extensions).

回复二:不包括一些肮脏把戏,则可以'T创建.NET纯天然的可执行文件;它依靠的的在本地计算机上是可用的框架。的组件仅仅是一个包的IL,并且可以被包含(通常)在上述任何一个DLL,或自举到的加载组件入口点一个exe;但在这种情况下的exe文件只是一个简单的装载以及常规组件。

Re the second: excluding some nasty tricks, you can't create a pure native executable from .NET; it relies heavily on the framework being available on the local machine. An assembly is just a package of IL, and can be contained (typically) in either a dll, or bootstrapped into an exe that loads the assemblies entry-point; but in this scenario the exe is just a simple loader plus a regular assembly.

其实,CLR更像是JVM; 框架是一个真正的BCL刚刚equiavalent。主要MS架构+ CLR肯定有一些Windows特定的优化,​​但其他运行时/框架(紧凑,的 Silverlight的)会有不同的优化。

Actually, the CLR is more like the JVM; the "framework" is really just the equiavalent of a BCL. The main MS framework+CLR certainly has some Windows specific optimizations, but other runtimes/frameworks (compact, micro, Silverlight, Mono) will have different optimizations.

重新多核 - 你有充分的线程支持(自己动手做) - 但主要的自动的多核心支持,将(希望)是在.NET 4.0中的并行扩展的工作。

Re multi-core - you have full threading support (for doing it yourself) - but the main automated multi-core support will (hopefully) be in .NET 4.0 with the "parallel extensions" work.

再最后一点:应该是很熟悉的确实。其实,如果你想要做一些比较,反射(免费)可以采取编译的程序集,并告诉你的code在C#或德尔福(或其它一些)。

Re the last point: should be very familiar indeed. Actually, if you want to do some comparisons, "reflector" (free) can take a compiled assembly and show you the code in either C# or delphi (or a few others).

[更新重的问题]

IL =中间语言; .NET不会编译为本地CPU指令,而是在东西之间的成为在运行时CPU指令(编译准时(JIT)的方法,通过法的基础上)。这意味着,JIT编译器可以优化相同的IL为本地计算机。您可以使用 NGEN 提前做到这一点。

IL = Intermediate Language; .NET doesn't compile to native CPU instructions, but to something in-between that becomes CPU instruction at runtime (compiled "Just In Time" (JIT) on a method-by-method basis). This means that the JIT compiler can optimize the same IL for the local machine. You can do this in advance using NGen.

= CLR通用语言运行时;本质上是虚拟机

CLR = Common Language Runtime; essentially the VM

首创置业=基类库;该组类共享我的许多应用程序

BCL = Base Class Library; the set of classes shared my many apps

重新部署:首先,在客户端;-p安装.NET Framework

Re deployment: first, install the .NET framework on the client ;-p

之后 - 各种选项。最简单地说,你可以将EXE /等复制到本地计算机上并运行。比如,我用的Robocopy推code到网络服务器。

After that - various options. At the simplest level, you can just copy the exe/etc onto the local machine and run. For example, I use "robocopy" to push code to web-servers.

对于一个复杂的客户端应用程序的完整本地安装,微星是一个选项(和充分VS IDE将帮助您与此)。

For full local installs of a complex client app, msi is an option (and the full VS IDE will help you with this).

对于简单的客户端,您可以使用的ClickOnce - 它打包应用程序到签订捆绑提供自我更新等功能,并允许你做出什么样的安全需要(完全信任,等等)语句。防爆preSS版可以让你创作的ClickOnce包。 ClickOnce的,甚至可以用在锁定的客户端,用户无法安装应用程序,因为该应用程序是孤立的沙箱。

For simple clients, you can use ClickOnce - which packages the app into a signed bundle that provides self-updating etc capabilities and allows you to make statements about what security you need (full trust, etc). Express Edition allows you to author ClickOnce packages. ClickOnce can even be used on locked down clients where the user can't install apps, since the app is isolated and sand-boxed.

最后,你可以运行一个.net应用程序关闭网络共享,但也有一些安全隐患:层的C访问安全性$ C $不会给网络共享完全信任(虽然有一些最近更改这一点,以便映射(F:等)的股票是值得信赖)。所以,你需要使用CASPOL在每个客户信任code。 ClickOnce的会更容易;-p

Finally, you can run a .NET app off a network share, but there are some security implications: the "Code Access Security" layer won't give a network share "full trust" (although there were some recent changes to this so that mapped (F: etc) shares are trusted). So you'd need to use CASPOL at each client to trust the code. ClickOnce would be easier ;-p

这篇关于德尔福.NET + C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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