views:

468

answers:

15

I am currently in charge of the development of the second version of program that was created in Microsoft .NET C#. I'm not doing any actual programming, but I am writing the specification for the programmer. I'd like to take it off the .NET codebase, but since Joel said on his blog never to rewrite code, and he does provide good reasoning, I'm inclined to think carefully.

So my question is,

(1) Are there any easy ways to transition? (Languages like .NET C#)
(2) Would you take it off .NET?
(3) If so, what language would you use?

The reason I want to take it off of .NET is as far as my understanding of .NET, it has to be installed on the client. I'd prefer not to inconvenience my customers when there's a better way.

+2  A: 

There will be no automatic translation from C# to something off .NET.

You could easily translate it to Boo or VB.NET or some other .NET language, but the libraries (the .NET framework) will not be available if you were to translate to C++ (non-CLI), for example.

This would cause the biggest headache.

Reed Copsey
+2  A: 

The only easy transition from C# would be to translate it to another .NET language. Other than that you are looking at rewriting the application anyways as all the syntax and libraries will change.

May I ask why you want to move away from C#? In the spirit of the Joel on Software link you provided I would hope that you would see the benefit of sticking with the codebase that is currently working (for what it's worth). Is there a terribly compelling reason to move off of .NET for this project?

Andrew Hare
+1  A: 

Moving from C# to Java would probably be easiest as they are quite similar languages. However, you'll still have to go through all the code and modify a lot of stuff to make it valid code. It will be more difficult if you're using some of the latest features of C#, like LINQ, as Java has no similar functionality.

Do you have any good reason for taking it off .NET? If not, don't. But if you do want to take it off .NET sometime, sooner is better (before the code grows too much).

David Johnstone
He's stated that the reason for moving is that he doesn't want unnecessary client-side dependencies - how would Java help you here?
Eric Smith
It doesn't. In my defence, that statement about client-side dependencies was added after I posted this answer.
David Johnstone
+7  A: 

What are the reasons you think something else would be better than C#? What's wrong with .NET? If you have valid reasons that are obstructing your companies mission, then you should consider re-writing it.

However, I do see any point in doing it just to do it. C# is pretty simple and straightforward, and recent versions of the runtime see fairly stable. I still wouldn't build an OS in it, but for end-user applications it's my go-to language.

Rewriting it in C++ is just going to be a memory/resource management nightmare, and transitioning to Java is a sideways move that doesn't make a whole lot of sense.

If you give details of what the app is, client, server, etc, what it does, etc, we may be able to be more specific.

But remember, TANSTAAFL.

Edit:

I wouldn't worry too much about requiring the runtime to be installed on the client. Assuming all your users are Windows users, both Vista and Win7 both have very recent versions of the runtime already installed by default. As more and more apps are built on the runtime, more and more users will already have it for some other app, and you can always just redist the runtime with your app.

jeffamaphone
+1 Good answer.
Joe Doyle
+18  A: 

Unless you are moving away from C# as part of some sort of enterprise-wide shift from C# to another language, or unless there is some sort of valid technical requirement that C#/.NET can't satisfy, I would not move from the existing code base.

You state your reason as that the client needs .NET. Is your program client/server, or is it a web application? If it's web based, then you are incorrect, the client does not need .NET, only a browser.

If the program is client/server and is already written in C#, then any language you move to is also likely to require some form of runtime installation. .NET comes with every new install and service pack of Windows from XP on.

Unless of course you're trying to target OSX and Linux users, in which case I would consider a serious examination into the value of those markets before you make any decisions to abandon your codebase. Java might help you better there -- but you can do a hell of a lot with the Mono platform, so you might be able to save your C# code even if you target those platforms.

Edit:

waiwai933 wrote:

I'm aware that I shouldn't make the decision, but it wasn't my decision to make about who would make the decision. By "easy language", I meant a language extremely similar to C#, so that the transition would be easier.

Unfortunately, you are out of luck. The closest language to C# is Java, but the differences between the two are significant enough that you'll need to do a complete rewrite; a port simply will not work. It's highly unlikely that the C# code you have does not use delegates and events -- they're omnipresent -- and there is no similar construct in Java. The WinForms GUI framework (I'm guessing WinForms) is so different from Swing that none of the constructs will easily port; and it's littered with events and delegates.

You are looking at at least as much effort to switch platforms as there was for the initial effort, possibly more. Plus going to Java violates the reason you want to switch from C#: Java requires a runtime installed on the client.

As I mentioned before, look long and hard at the real benefits you might get from switching platforms before you make this decision.

Randolpho
+1  A: 

I don't understand why a company would decide to move from a stable code base such as .NET to another. If your thinking of other platforms, such as moving from an OS app to a web app, Ruby on Rails might fair well (its MVC platform is strong). But to another OS app? The going will get tough.

johnofcross
+8  A: 

I can't really fathom why you would want to move off of C# and .NET for the sole reason that you don't want to "inconvenience" your customer by requiring they install the .NET framework.

For one, .NET is included with Windows these days. In XP (current service packs), you get .NET 2.0. In Vista, you get .NET 3.0. Assuming you don't actually use any .NET 3.5 capabilities, and don't need any features from C# 3.0, then the "inconvenience the customer" argument is pretty moot. They won't need to download anything or install anything extra...its already there.

In the event that you actually DO need .NET 3.5 and/or C# 3.0, then it is beyond easy to create a pre-packaged installer for your customer(s) that takes care of it all for them. There isn't any real "inconvenience" to the customer, because they have to install your program anyway. A single install can take care of both your program and all of its dependencies in a single, seamless, transparent installation process. If you want an even easier time for your customers, you have the option of click-once deployment with .NET, C#, and Visual Studio. This will create a simple site for your customers that will easily and quickly allow them to download and install your application, as well as update it when future updates are published. This type of deployment also takes care of ensuring any dependencies are downloaded and installed to the clients system, which only needs to be done once (all subsequent updates only require the latest version of changed assemblies to be downloaded and installed.)

As others have mentioned, C# and .NET have a lot to offer. Microsoft has creates an extensive ecosystem for development on the .NET platform, with a tremendous amount of resources, tooling, documentation, and community help. C# is a very clean, modern, forward-looking language that offers a lot of tools to help you and your developers solve problems as quickly, simply, and efficiently as possible. Moving to C++ means not only do you lose these useful advancements, but you inherit the nightmare of manual memory management. Moving to Java means you lose these useful advancements, but generally don't really gain useful either. You could move to other .NET languages, but then you aren't solving the sole problem you mentioned: your clients dependency on the .NET framework.

If you already have a system in place that is developed with C#, I would say don't change a thing. You will be loosing a lot, and won't really gain anything that is going to significantly impact your customers. In the long run, any change is most likely going to have a much more significant impact on your company and your developers. You will have cost involved in rewriting or converting code, cost involved to train your developers on a new language and possibly a new development platform, cost involved to find and fix bugs that have quite probably already been fixed in your current code base, and the list goes on...

You need to learn more about what .NET has to offer before you decide that it is too inconvenient for your customers. And you need to make sure that it really IS an inconvenience for your customers before deciding to make such a drastic and expensive change.

jrista
I would have up-voted this, but you can't spell lose.
Zerofiz
@jrista - I'm guessing it was meant to be humorous
@Zerofiz - it was humorous :)
Eric Smith
+3  A: 

(1) Are there any easy ways to transition? (Languages like .NET C#)

NO

(2) Would you take it off .NET?

Not without a Very compelling reason (not inconveniencing your customers isn't it!)

(3) If so, are there any easy languages?

Java would be the closest analogue to C# and you would lose more than you gain plus you still have to inconvenience your customers

The reason I want to take it off of .NET is as far as my understanding of .NET, it has to be installed on the client. I'd prefer not to inconvenience my customers when there's a better way.

As others have mentioned this is not the inconvenience you seem to think it is and if its your only reason you are most likely just wasting time, resources and money. In short if its paid for and it works keep your mitts off it.

kloucks
+19  A: 

This is going to sound rude and I risk being downvoted, but forgive me, I'm going to be honest ... you are saying, "[you are] in charge of the development of the second version of program that was created in Microsoft .NET C# ... not doing any actual programming ... [would] like to take it off the .NET codebase". Are you hearing yourself? You clearly don't have any knowledge or experience to make that decision, further evidenced by questions 1 and 3. There are no "easy languages" - what does that even mean? Is a powerful language "easy"? Is a weak language "easy"? How could there be an easy transition to anything different? Even if you have something to automatically translate the code, differences in the runtimes and platforms and libraries make porting any non-trivial application far from easy. It takes work and knowledge. Perhaps easy for someone with a lot of time, but not for most people with deadlines and reality to face.

Richard Hein
+1 for honesty.
Zerofiz
I'm aware that I shouldn't make the decision, but it wasn't my decision to make about who would make the decision. By "easy language", I meant a language extremely similar to C#, so that the transition would be easier.
waiwai933
@Richard Hein: You said the things we all wanted to say. :)
Randolpho
@waiwai933: I replied to your comment by editing my post.
Randolpho
+1  A: 

(1) Are there any easy ways to transition? (Languages like .NET C#)

If by easy you mean similar, then in syntax Java is similar but matching .NET framework classes to Java Library would be non trivial.

(2) Would you take it off .NET?

No.

(3) If so, are there any easy languages?

See Answer to (1)

A few questions to help me understand further why you would want to do this; How is this an inconvenience to your customer? (just the .NET framework install?) If you are talking about a client app then you need to install your app on the client as well, I dont understand this being more of an inconvenience.

From your other similar question you suggested you want to rewrite in C++, How would this change the inconvenience level?

Are you wanting to target a non-Windows user base?

A: 

In some cases, it might make sense to move from C# to C++, so you gain the power of unmanaged code (i.e. performance). But chances are it isn't worth the effort.

ammoQ
Performance gain? This argument isn't as cut-and-dried as it used to be. If you're punting performance gains, it's arguably more prudent to talk about C, not C++.
Eric Smith
+1  A: 

As is the answer to many questions, it depends. In my answer below, I've assumed that you're talking about a Windows Forms application, since, of course, all of this would be a non-issue if you were talking about a web-based product.

It sounds like you've (almost) made the decision to "take it off" .NET. I would suggest strongly that you think very carefully about that decision. In particular, look at the reasons. You've stated that the reason is that you don't want the .NET runtime dependency to cause issues. The rebuttle to this, as presented by a few people is that Windows platforms without the runtime standard are becoming scarce. Never-the-less, there's something satisfying about a lean-and-mean program that doesn't have a dependency on a 50Mb download.

Ultimately though, whether or not what you've stated as the reason is valid depends on:

  1. The number of clients of your product;
  2. their geographic location;
  3. the typical platform on which your product will be installed (hardware and software);
  4. the potential impact of having your product not install due to a non-existent runtime;
  5. the impact of a large download, or cumbersome install due to the runtime dependency.

After all, if it turns out that 99% of your clients are on a modern platform, then as others have pointed out, this becomes a non-issue.

If it turns out, after analysing the above that your reasoning is valid, then you should compare the cost of rewriting the product to the forecast improvement in customer satisfaction/product sales as a result of the rewrite. To justify a rewrite, the latter would have to be absolutely phenomenal. Of course, I say that, not knowing all kinds of things, including:

  1. The size of the codebase;
  2. The complexity of the product;
  3. The state of the codebase (maintainable?).

As far as a general programming language/platform is concerned, you pretty much can't get any better than C#/.NET these days, so assuming that after all the due-diligence, you still want to "move" then you'd be forced to choose something that doesn't require a runtime - the only conceivable option would be C/C++ or Delphi.

Eric Smith
A: 

The .NET framework is part of Windows Update, so probably every client has it on his or her machine. Or they're running Linux / Mac OS, but i don;t think that's the case because the version 1 of your product was already running in .NET.

And. almost every other mainstream language needs a separate runtime installed (java, PHP, etc.)....

So I don't see a valid reason for transitioning.

Colin
+1  A: 

Answer is easy: move your application to web. So client will need only browser.

Andrew Fink
I am from Java-world, so I don't know how NET is good for web.For Java we have: http://code.google.com/webtoolkit/ , http://vaadin.com , http://click.apache.org/ so migration is possible.Google made QuakeII port to web http://code.google.com/p/quake2-gwt-port/why you can't ;-)
Andrew Fink
A: 

Most responses so far answer the specific question of C# vs "something else", but I'll answer the question you need to ask:

I'm not doing any actual programming, but I am writing the specification for the programmer. What is the most effective way to do that?

Quickly, what not to do: specify implementation details, such as what language to use.

What to do: Write User Stories or Use Cases that specify what you want and why. For example:

As a User, I want to be able to install and run the software by downloading a single file from the internet, so that I am not inconvenienced by having to find and install other software.

And you might want to back this up with metrics:

As the Product Manager, I want to be able to view the number of software downloads for a given time period and the number of software activations in that same period, so that I can determine how many of our potential customers successfully manage to install and run the software.

Tell your team what you want and why, and they will deliver it for you.

jamie