Moving a C # program to another language

I am currently responsible for developing the second version of the program that was created in Microsoft.NET C #. I do not do any real programming, but I am writing a specification for a programmer. I would like to remove it from the .NET code, but since Joel said in his blog never to rewrite the code, and it really gives good reasoning, I tend to think carefully.

So my question is:

(1) Are there any simple transition methods? (Languages ​​like .NET C #)
(2) Would you take off .NET?
(3) If so, which language would you use?

The reason I want to abandon .NET, as far as I understand .NET, must be installed on the client. I would prefer not to inconvenience my clients when there is a better way.

+4
source share
15 answers

If you are not moving away from C # as part of any shift across the enterprise from C # to another language, or if there is no proper technical requirement that C # /. NET cannot satisfy, I would not move from the existing one code base.

You indicate your reason as the client needs .NET. Is your client / server your program, or is it a web application? If it is network-based, then you are mistaken, the client does not need .NET, but only a browser.

If the program is a client / server and is already written in C #, then any language you switch to may also require some installation of the runtime..NET comes with every new installation and service pack for Windows with XP.

If you, of course, are not trying to target users of OSX and Linux, in this case I would consider a serious analysis of the value of these markets before making any decisions about leaving your code base. Java can help you do this better - but you can do a lot with the Mono platform, so you can save your C # code even if you aim at those platforms.

Edit:

waiwai933 wrote:

I know that I should not make a decision, but this is not my decision as to who decides. By "easy language" I meant a language very similar to C #, so making the transition easier.

Unfortunately, you are out of luck. The closest language to C # is Java, but the differences between them are significant enough that you need to do a complete correspondence; the port just won't work. It is very unlikely that the C # code that you have does not use delegates and events - they are ubiquitous - and there is no such construction in Java. The WinForms GUI (I assume WinForms) is so different from Swing that none of the constructs will be easily portable; and it is dotted with events and delegates.

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

As I said earlier, look long and hard at the real benefits that you could get from the switching platforms before making this decision.

+22
source

It will sound rude, and I run the risk of being slow, but forgive me, I will be honest ... you say: "[you] are responsible for developing the second version of the program, was created in Microsoft.NET C # ... without doing any real programming ... [would like to] remove it from the .NET codebase. " Can you hear yourself You obviously do not have any knowledge or experience to make this decision, as questions 1 and 3 testify to. There are no “simple languages" - what does this mean? Is a powerful language "easy"? Is a weak language "easy"? How can there be an easy transition to something else? Even if you have something for automatic code translation, differences in the runtime, platforms and libraries make porting any non-trivial application far from easy. It requires work and knowledge. It may be easy for someone with a lot of time, but not for most people with deadlines and reality.

+23
source

I can’t understand why you want to switch from C # and .NET just because you don’t want the “inconvenience” of your client, requiring them to install the .NET framework.

First, .NET is included in Windows these days. In XP (current service packs), you get .NET 2.0. In Vista, you get .NET 3.0. Assuming that you are not actually using any features of .NET 3.5 and that you do not need any features from C # 3.0, the argument "inconvenience to the client" is rather controversial. They don’t need to download anything or install anything extra ... it already exists.

In case you really need .NET 3.5 and / or C # 3.0, it is not easy for you to create a pre-packaged installer for your clients (clients) who care about all this. The client has no real "inconvenience", since they still need to install your program. A single installation can provide both your program and all its dependencies in a single, seamless, transparent installation process. If you want an even simpler time for your customers, you have the option of a one-time deployment with .NET, C # and Visual Studio. This will create a simple site for your customers that will quickly and easily enable them to download and install your application, as well as update it when future updates are published. This type of deployment also ensures that any dependencies are downloaded and installed on the client system, which needs to be done only once (for all subsequent updates, only downloading and installing the latest version of the changed assemblies is required).

As already mentioned, C # and .NET have a lot to offer. Microsoft is creating an extensive .NET development ecosystem with a wealth of community resources, tools, documentation, and help. C # is a very clean, modern, promising language that offers many tools to help you and your developers solve problems as quickly as possible, simply and efficiently. Switching to C ++ means that you not only lose these useful achievements, but also inherit the nightmare of manual memory management. Switching to Java means that you are losing these useful achievements, but, as a rule, are also not useful. You can switch to other .NET languages, but then you will not solve the only problem that you talked about: your clients depend on the .NET platform.

If you already have a system developed using C #, I would say that nothing is changing. You will lose a lot and not get anything that will significantly affect your customers. Ultimately, any change is likely to have a much more significant impact on your company and your developers. You will have the cost of rewriting or converting the code, the cost of training your developers in a new language, and possibly a new development platform, the cost of finding and fixing bugs that have probably already been fixed in your current code base, and a list going on ...

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

+9
source

What are the reasons why you think something is even better than C #? What happened to .NET? If you have good reasons hindering your company, you should consider re-recording.

However, I see that I need to do this just for this. C # is pretty simple and straightforward, and the latest versions of the viewing environment are pretty stable. I still will not create an OS in it, but for end-user applications, this is my language.

Rewriting it to C ++ will just be a memory / resource management nightmare, and switching to Java is a sideways movement that doesn't make much sense.

If you talk in detail about what an application, client, server, etc., what it does, etc., we can be more specific.

But remember, TANSTAAFL.

Edit:

I would not worry too much about installing the runtime on the client. Assuming all your users are Windows users, both versions of Vista and Win7 have the most recent runtime versions that are already installed by default. As more applications are created in the runtime, more and more users will already have this for some other application, and you can always simply reinstall the runtime using your application.

+7
source

(1) Are there any simple transition methods? (Languages ​​such as .NET C #)

NO

(2) Would you shoot .NET?

Not without a compelling reason (not an inconvenience to your customers, right?)

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

Java will be the closest analogue to C #, and you will lose more than you get, plus you still have inconvenience for your clients

The reason I want to abandon .NET, as far as I understand .NET, must be installed on the client. I would prefer not to inconvenience my clients when there is a better way.

As already mentioned, this is not an inconvenience that you seem to think, and if this is your only reason, you are most likely just wasting time, resources and money. In short, if it is paid and it works, keep your gloves on.

+4
source

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

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

This will lead to the biggest headache.

+2
source

The only easy transition from C # is to translate it into another .NET language. In addition, you still look at rewriting the application, as all 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 hope you will see the advantage of sticking to the current code base (what it is for). Is there a terribly good reason to switch from .NET for this project?

+2
source

Moving from C # to Java is likely to be the easiest, as they are pretty similar languages. However, you still have to go through all the code and change a lot of things to make it valid code. This will be harder if you use some of the latest C # features, such as LINQ, since Java does not have similar functionality.

Do you have good reason to abandon .NET? If not, do not do this. But if you want to remove it from .NET someday, it is probably better (before the code is too strong).

+1
source

I don’t understand why the company decided to switch from a stable code base such as .NET to another. If you are thinking of other platforms, such as moving from an OS application to a web application, Ruby on Rails might be nice (its MVC platform is solid). But to another OS application? The offensive will be tough.

+1
source

(1) Are there any simple transition methods? (Languages ​​such as .NET C #)

If, by lightness, you mean something similar, then the Java syntax is similar, but comparing the .NET Framework classes with the Java library would be nontrivial.

(2) Would you shoot .NET?

No.

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

See the answer to (1)

A few questions to help me understand why you would like to do this; How is this inconvenience for your client? (only .NET framework install?) If you are talking about a client application, you also need to install the application on the client, I do not understand that this is more inconvenient.

From your other similar question, you suggested rewriting in C ++, how will this change the level of inconvenience?

Would you like to target a non-Windows user base?

+1
source

In some cases, it might make sense to move from C # to C ++, so that you get the power of unmanaged code (i.e. performance). But most likely, it is not worth the effort.

+1
source

Like the answer to many questions, it depends. In my answer below, I suggested that you are talking about a Windows Forms application, because of course, all this would be a problem if you were talking about a web product.

It looks like you (almost) made the decision to "take this off" with .NET. I would strongly recommend that you think carefully about this solution. In particular, look at the reasons. You stated that the reason is because you do not want the .NET runtime dependency to cause problems. The concern presented by several people is that Windows platforms without standard execution are becoming scarce. Nevertheless, there is something satisfying about the meager and average program, which is not dependent on a 50 MB download.

Ultimately, regardless of whether what you indicated as the reason really depends on:

  • The number of customers of your product;
  • their geographical location;
  • the typical platform on which your product will be installed (hardware and software);
  • the potential impact of your product not being installed due to non-existent lead time;
  • the effect of a large load or cumbersome installation due to runtime dependency.

In the end, if it turns out that 99% of your customers are on a modern platform, then, as others have pointed out, this becomes a problem.

If it turns out, having analyzed the above, that your arguments are correct, you should compare the cost of rewriting the product with the improvement in the forecast for customer satisfaction / sales of the product as a result of the rewriting. To justify the rewriting, the latter had to be absolutely phenomenal. Of course, I say this without knowing all kinds of things, including:

  • Codebase size;
  • Product complexity;
  • Code base status (supported?).

As for the common programming language / platform, you pretty much can't get any better than C # /. NET these days, so assuming that after due diligence you still want to “move”, then you have to choose what does not require runtime - the only possible option could be C / C ++ or Delphi.

+1
source

The answer is simple: move the application to the Internet. Therefore, the client only needs a browser.

+1
source

The .NET framework is part of Windows Update, so probably every client has it on their machine. Or they are running Linux / Mac OS, but I don’t think that the fact is that version 1 of your product is already running in .NET.

A. Almost every other main language requires a separate runtime (java, PHP, etc.) ....

Therefore, I see no good reason for the transition.

0
source

Most answers still answer a specific C # vs "something else" question, but I will answer the question you need to ask:

I do not do any real programming, but I am writing a specification for a programmer. What is the most effective way to do this?

Quick, what not to do: specify implementation details, for example, which language to use.

What to do: Write user stories or use cases that determine what you want and why. For instance:

As a user, I want to be able to install and run software by downloading one file from the Internet, so I am not inconvenient to find and install other software.

And you can support this with indicators:

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

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

0
source

Source: https://habr.com/ru/post/1286786/


All Articles