Use more than one language in the same project?

Asked

Viewed 871 times

1

I am participating in a project that will need two parts:

1) Extração de dados da internet
2) Criação da Interface Gráfica para Desktop

For the first, I thought of using Python for reading that it is the best language for data extraction and for the second, to use VB.NET. I wonder if this is inadvisable in programming because it may generate some possible incompatibility between the two languages or for another reason.

3 answers

2

I already answered that in How to use multiple languages in a single program?. But speaking specifically to what you have been asking, it is OK to use more than one language in a solution, you make one application in one and the other does not even know in which language another part was made. Is this a good thing? Generally no, there are very few cases that this is advantageous, almost always the person chooses to do this by not mastering what he is doing and alone can be a problem or because it is for political reasons of an organization and not for technical reasons. But everything works if you do it right, you just need to exchange data consistently.

Whether you want to join two languages in the same application depends on the languages used. If they are scripts I wouldn’t even call it an application and you can mix more or less, because deep down you have a solution of scripts and not a single application. If you are going to generate an executable, you need everyone to be compatible in doing this and be able to communicate, I say this in the other answers there.

If using VB.NET will use . NET (Core, please) you can use other languages because the platform was made for this, but not just any one. It works fine, but it’s probably just skulking around in a lot of situations, doesn’t mean it’s going to be super simple and it doesn’t take work to deal with it. But VB.NET already works with more than one language, everything it uses internally is done in C#.

I see it as a bigger problem to start something new because you like a language more because of the syntax, a language that clearly has secondary vendor support and the community has pretty much abandoned it altogether. So you’re looking at the wrong problem.

Python can be used together with . NET, but almost always makes little sense. If it is used outside the platform then it is only a solution with two isolated applications and falls into what I said before. Again, I don’t know if this is necessary if you’re going to do something from scratch, almost always this kind of thing is when there’s legacy or something ready.

What you described seems a case that VB.NET can handle very well. On the other hand Python also accounts for almost everything as much as VB.NET (a little less for some reasons, it depends on the details of what you need).

You don’t buy what you read. Python has absolutely nothing better for data extraction, this is just people marketing their favorite technology. If you don’t even know why you’re adopting, just by following what other people are saying, then every decision is wrong. Don’t do it based on assumptions made by random people on the Internet that you don’t know what her motivations are for saying that, because she thinks that, and usually she doesn’t give an assessment proving what she’s saying, that is, it shows how language does better than others, showing how it does both. Even if she shows in general the person is biased, on purpose or not, after all she knows one of the languages well and not the other. And often she shows a little detail better, ignores all the other worse, or that can be done in the other in a different and better way, and when sometimes it looks better it can be just taste and deep down it makes no real difference. Nor did I say that normally the person who knows one well does not know the other well, even if he has something better in one may not be well explored by the person who does not know that technology very well. One of the biggest reasons to use two languages is that it has two teams with Skills in each of them, and needs to separate the project between the two. That is, it is technologic gambiarra to favor a better project management.

Python is much slower than VB.NET, the sources are more exposed than VB.NET, the deploy is more complicated in almost every situation, just to quote a few questions.

Using more than one language needs to compensate a lot, need to prove before it will be better before making the decision, can not be achism, because it complicates further development. It seems to me you’re deciding to use more than one for the wrong reason.

0

In a pragmatic way. Use Python for data extraction, (BS, scrapy. requestes.) then store the data in a database and then just access the data with another language.

The interesting thing about this is that then you can use any other language to power the database.

0

Yes it is possible to use more than one language in some software, the most important question is whether they need to interact with each other.

For example, extracted data needs to be displayed in desktop. In this case, it needs a common interface that the two parties understand, it can be a database for example, where one party writes and the other can read the data, working perfectly for any languages you choose.

I am not going to talk about languages because it would be based on my opinion, but on VB.NET, if you want to use the platform .NET, suggest using C#, which is much more popular and widespread, is not opinion, are facts. An example is the research of Oerflow Stack itself, which you can read here: Stack Overflow Survey 2019

  • I know C# is more popular, but I prefer to use Vb.net, I like it better

  • Relax, we need to use what works best for us, just include the information to help in your choice :)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.