How to use two different languages in one project? I want to make a GUI application that has several component bu i want backen | SoloLearn: Learn to code for FREE!

0

How to use two different languages in one project? I want to make a GUI application that has several component bu i want backen

7/4/2020 3:19:57 PM

decoder

6 Answers

New Answer

+1

You can make a web app using python Django framework. Then covert into a hybrid app using iconic framework and phonegap. Basically, in this process, you are using different programming and markup languages.

+1

https://www.sololearn.com/Discuss/2373934/?ref=app

+1

in c/c++ or similar lower level, probably possible with binding. basicly the c/c++ compiled into library dll/so then other language use that to execute the code. i think numpy use c++ in similar way, i cant remember similar this are also possible in JVM based language, like for example Scala using Java class last one is using web server or such as the "state controller" for the app. not the best for offline software imo,

+1

As far as using two language in one application goes it's entirely possible. It's called mixed language programming and has been done since the dawn of computing languages. Back in the 80s it was common to write parts of a program in BASIC, C, Pascal or whatever and call assembly language routines for speed critical sections. Any language that can use a static or dynamic library can be used with any other language that can produce those libraries in the required format. As Taste has already pointed out there are Python modules that are written in other languages but use Python wrappers to interface with them. TkInter is such a wrapper module that interfaces with the Tk libraries, which are written in C. That is an example of mixed language programming because code written in one language is executing code written in another language. Two distinctly separate applications running on two physically different pieces of hardware that communicate with each other is not mixed language programming. Java is capable of running software on another system through Remote Method Invokation (RMI) but that only allows one Java Virtual Machine to do that with another JVM as I understand it. I hope this clears up some of the confusion.

0

The back end and front end of a hybrid app are physically separate entities. Using one language for the mobile app and another for the back end is not the same as mixed language programming, for example combining Java and C++using the Java Native Interface. There is no coding connection between the client app and the back end server. Just as there is no coding connection between a web browser and a website. The connection between the two is via a communications channel. It is purely data that is flowing between the two programs. Neither program knows nor cares what language the other is written in, and it is of no consequence providing both programs adhere to the specified communications protocol. Before you attempt to design such an application you need to understand how the client/server applications communicate. Your client app could be as simple as a web page that uses the get or post method to send data back to the server. The server could be written in JavaScript running on Node.js. The server may then pass the message on to another program written in php, asp.Net, Python, Java, awk, Perl, or even a shell script to parse the data. the parser could then in turn pass the data on to a C/C++/C# or any other program to process the actual data. The results then make their way back through the communications stack all the way to the client app which then displays the results. This is a contrived example using multiple layers but it is possible, it would suck under heavy load though. None of the intervening layers cares what the other is written in and it doesn't matter since they never invoke code in the other layer; they merely pass data packets.

-1

I think. It is not possible. It will be hard for interpreter or compiler to interpret or compile two languages at one interpreter or compiler. You can still use web technologies. But HTML and CSS are not considered as programming languages.