Learning to code a crossplatform application.

1 Antwort [Letzter Beitrag]
Roedor
Offline
Beigetreten: 12/03/2017

I would like to create a crossplatform (android,GNU/Linux, Faildows, FruitCompany) translation dictionary application. It's main objective would be to be used as a tool to preserve some languages near my community that are in danger of extinction.

In my country a lot of population aims to have a "smartphone" instead of a desktop computer (since they are "relatively" cheaper), and if they have a desktop they most likely use closed operating systems, however i would like the application to be free software, and be available to these platforms so people can study the languages.

Considering that i don't know nothing about programming, Which resources do you recommend me to study ?.

Up until now i'm supposing that i will have to use a database in which the data will be stored, (i want to mix strings of text and audio files). Searching a bit found about MariaDB, maybe that can suffice.

Which language, IDE or frameworks do you suggest ?

Feel free to criticize or add some input.

koszkonutek
Offline
Beigetreten: 03/19/2020

As jlb said, SQLite is more suitable for your needs than MariaDB/MySQL (although nowadays the latter ones can also be used in an embedded fashion). It is also true that Java is a technology that will run on all the platforms you mentioned.

There is, however, a problem with phones made by the BittenFruitCompany. They don't allow installation of third-party apps (except for developer versions of the phones). You're probably also not willing to get the app into phone's official app store - it's costly and the BittenFruitCompany's terms wouldn't allow you to have any copylefted code in the app.

The solution could be to write the application in HTML+CSS+javascript, so that it can be run in a browser. While nonfree javascript has been increasingly used in a way that harms user freedom, it can also be utilized in good ways, so I see no reason to disqualify it. By running the "app" in a browser you would easily bypass company's restrictions. Also, portability is a strong side of the technologies I just mentioned.
You might be interested in frameworks like Electron that allow one to write a single js+HTML application that can then be "deployed" in the web browser as well as in the form of an Android app, desktop program, etc.

Now, it is time to mention the drawbacks of this approach. An app being run in a browser is only going to have access to browser's javascript APIs. Everything is going to be running in a sandbox, no sockets, etc. It would be a limitation but I guess that's better than not being able to target BittenFruitCompany's useds[1] at all. You could make a more complete, standalone version of the app for other platforms.

The framework I mentioned (Electron) has been criticized for including a lot of unlicensed source code files. This has since been fixed but I have still not seen the framework packaged for major GNU/Linux distros (which is a huge drawback in my eyes). Even though Electron seems to be the most popular framework of this kind, you could also try to develop your standalone application utilizing another one like Qt with QtWebView. You'll probably need to do some more research to find out what's best for you.

If you indeed want to distribute your javascript program as a standalone application, you'll have to bundle the runtime which is almost a full web browser. People nowadays don't seem to care whether an app weighs 1MB or 100MB so this might not be a big issue after all.

Anyway, I would be very interested to see what you come up with. Please, once you program something, share with us what technologies you chose and how these worked for you :)

Depending on your programming language preferences having to use javascript might be a drawback of its own. You can also use some other language and compile it to js or Wasm but this brings other problems to the table like not being able to use GCC for C code.

As to "web technologies", w3schools.com is a rich source of information and examples. E.g., here[2] you have a javascript tutorial. Learning those things will hopefully also prove beneficial for you on other occasions :)
You can experiment with js, HTML and CSS by simply creating a .html file and opening it in your web browser. Most browsers have debugging tools included which is going to be helpful.

[1] used - a person being used by sth; a term proposer by dr Richard Stallman to be used instead of word "user"
[2] https://www.w3schools.com/js/DEFAULT.asp