views:

478

answers:

10

I want my code to be as secure as possible.

+1  A: 

Deleting this because everyone is down arrowing my response simply because their opinion is different than mine. It was an answer to his question, but an unpopular one, so people decided to start taking points away from me.

That's not the purpose of the down arrow, to remove points from people who disagree with you. Your childish and ingnorant actions will subtract from the quality of this site.

Jeremy Morgan
Subjective points. Provide some evidence.
Gerard
No .NET framework is required when using Delphi > 8 either (well, it's required to run the IDE, but that's not your end-users problem). With the exception of Delphi 8 all delphi's come in a Win32 flavour (2005, 2006, 2007, 2009, 2010). As of 2009, Delphi.net is dropped (replaced with Delphi Prism), Delphi Win32 is still going strong.
Paul-Jan
I don't buy into faster development in C# as a _generalised_ fact. Actually, the only thing I completely agree with is that C# is more popular. Many of the perceived shortcomings (e.g. modern language constructs etc.) of Delphi have been addressed in the recent past, including the "lack of future" point. It's both very mature and modern and -- this is the important bit -- no longer Borland's but Embarcadero's, which means that confidence in the future of Delphi is returning.
PhiS
Delphi's future? It has been questioned for years since it was born, so I don't think we should evaluate its destiny once again. :)
Lex Li
I haven't used Delphi 8 or any Delphi.net applications so I didn't know that. And yes, I am a huge fan of Delphi but I can't recommend it as something someone should do when starting a new project. I feel that C# is a safer route, and I'm sure others will agree.
Jeremy Morgan
I don't agree with you. I'd go Delphi for sure. And I just learned Delphi 3 years ago (before that I was all about C#). I'm more productive in Delphi and I don't have to worry about my GUI framework being deprecated every 3 years (e.g. WinForms).
Mick
+1  A: 

Use C# just because it has more mainstream support. Plus it is sure to be backed by Microsoft. Which adds incremental features to the language from time to time.

Also, the main architect of C# in Microsoft is Anders Heilsberg which was the co-creator of Turbo Pascal and Delphi of Borland before he got pirated by Microsoft.

Nassign
If you think Microsoft is a garanty of stability in software development you are in a a serious mistake. :·)
Francis Lee
Microsoft backing means nothing. Just ask all those that banked on WinForms, VB6, J#, J++, etc. That's one thing about Delphi, the VCL and RTL have just gotten better over the years, and are still fully supported!
Mick
C# is a fine language, but new versions of Delphi also introduce new language, library and IDE improvements, too. More so since they've been backed by Embarcadero. http://delphi.wikia.com/wiki/Enhancements_since_Delphi_7#VCL_and_RTL_Features_Since_Delphi_7
Bruce McGee
+15  A: 

I do not think that the security of your source code is a good reason to choose between C # and Delphi. if you create an .Net executable you can protect it with a tool like .Net Reactor, on the othe hand the win32 executables are by definition very difficult to disassemble (get the original source code) unless you include debug information in them.

You should compare other features, in my opinion you should use the language with which you feel more comfortable and you have more skills.

In my case it always chooses delphi, because it has an excellent and fast compiler and thousands of third party components and in addition to generating executables without dependencies. ;)

You can check this question

What language or RAD IDE do you recommend for building shareware?

Also you can check this list of applications built with Delphi

Good Quality Applications Built With Delphi

Among them Skype, TOAD, FL Studio.

RRUZ
Good answer. +1 for the Delphi dependency note. Makes a huge difference to the ease of distribution.
Gerard
If you feel better with Delphi, you could go for Delphi Prism. It includes all the features of C# 3.5 and some more (e.g. Design by Contract). This way you'd have the best of both worlds - your delphi reading skills and the power of the .NET framework including memory management and library.
Tobias Langner
For security - reversing .NET is a lot easier than reversing machine code. But remember - if your shareware is successful, your protection scheme will be cracked and there will be a keygen for it. Just build a good application first - you can add protection later (in any case - .NET or win32).
Tobias Langner
+1  A: 

It doesn't really matter in which programming language you create your "secure" application as long as you know what you want keep working until you get the result. If you build an application in python or any other scripting language for instance you can still have good security. As a good friend of mine told me few times "it's all you! programming language is just an extension of your mind!"

delphigeist
+1  A: 

Both are good. Both are secure. Plenty of people are around who work with either of them.

The support for "enterprise" features like heavy Web services, distributed applications and componentized applications is better using the .NET Framework. Similarly there's no direct equivalent to the vector-based forms possible with WPF.

But if your application will never need them - then go with what you feel most comfortable.

Jeremy McGee
+8  A: 

It depends on your needs. But in the absence of additional information: If it's a shareware program, I'd go for Delphi, mainly because it compiles into relatively small and fast native code executables.

Should you be concerned about modern (Delphi 2010) apps being less secure than older ones because of the new, enhanced RTTI - that can be turned off with a compiler switch.

PhiS
A: 

As with most of the posts here, I would agree that security is in how you write the program. Not is what language you use.

I use several different languages, depending on the project.

On top of asking your self which you would be more comfortable with, you should ask your self if you want to support multiple platforms.

My company does a lot of cross-platform development, and as such, we don't use C# on those projects.

There is the mono project that aims to allow .net code to run on mac and Linux, but between the two, Delphi, being pascal is somewhat more portable.

( On our cross platform projects, we use either C or C++ )

The Big Spark
+2  A: 

In Delphi, you can use pointers (and sometimes they are necessary, for API calls for example) - so you are closer to C than with C#. There is a reason why Java and C# do not have pointers: security.

"Most studies agree that pointers are one of the primary features that enable programmers to inject bugs into their code."

http://java.sun.com/docs/white/langenv/Simple.doc2.html

In the C# programming language, pointers are supported only under certain conditions: any block of code including pointers must be marked with the unsafe keyword.

http://en.wikipedia.org/wiki/Pointer_%28computing%29#C.23

"Pointers are like jumps, leading wildly from one part of the data structure to another. Their introduction into high-level languages has been a step backwards from which we may never recover."

C.A.R.Hoare "Hints on Programming Language Design", 1973, Prentice-Hall collection of essays and papers by Tony Hoare

mjustin
So what are object references? An object ref can still be null!Highly subjective - and biased by been written by Sun
Gerry
You can not do pointer arithmetic with an object reference. A NullPointerException will not cause code to leave the virtual machine memory - it will be handled in the sandbox.
mjustin
A: 

Use the language you are most familiar with. That way you can hopefully avoid pitfalls and gotchas of using an unfamiliar language.

johnny
+5  A: 

Delphi is your best choice for shareware software : you can distribute your app in a single exe file , you can embed whatever resource you want to : html pages, images, even your dbserver (look for firebird embedded). Lots of shareware software was developed with delphi : EMS products (EMS SQL Manager for MySQL, IB, Oracle...), Skype, 7zip...

Have fun with DELPHI Best Regards

Michel