If you like DNray Forum, you can support it by - BTC: bc1qppjcl3c2cyjazy6lepmrv3fh6ke9mxs7zpfky0 , TRC20 and more...

 

C# vs. Java: Best Fit for Database Program

Started by AustinEstrange, Nov 09, 2023, 12:23 AM

Previous topic - Next topic

AustinEstrangeTopic starter

The question arises: which programming language is most convenient for an application with a local database?



Please help with choosing a programming language for creating an order accounting program that works with a local database. Approximate wishes for the future program are as follows:

Run on a windows computer. Preferably, but not necessarily, also the ability to work on a tablet (android).

The ability to transfer and execute on another computer without additional software. The principle of "inserted a USB flash drive, launched the exe file, it works".

It is desirable to be able to transfer information from the database to a remote server via the Internet.

I studied Deplhi earlier, but judging by the reviews that I've been reading for two days, it's not the most common tool right now. There is practically no literature on Delphi. Therefore, despite the convenience of using Delphi, I am looking for a new language, the ability to program in which will not hang like a dead weight.

So far, C# and Java are candidates after a cursory review of the literature, and SQLite is used as a database. However, it is difficult to estimate from scratch what will be more convenient to use :) Hence the question arises: is java suitable for the above purposes? Or is C# still better?
  •  


snakelonesome

For the requirements you have listed, both C# and Java are suitable options for developing an application with a local database.

C# is commonly used for Windows-based applications, and it has strong support for creating desktop applications that can run on Windows computers. It also has capabilities to work on Android devices using Xamarin for cross-platform development.

Java, on the other hand, is known for its platform independence, which means that applications written in Java can run on any device that has a Java Virtual Machine (JVM). This makes it possible to run Java applications on Windows computers and Android tablets without significant modifications.

For the requirement of transferring and executing the program on another computer without additional software, both C# and Java can be built as standalone executable files that can be run without the need for installing additional software, making them suitable for portable use.

In terms of database integration, both C# and Java have robust libraries and frameworks for working with SQLite databases. They also provide options for transferring data from a local database to a remote server via the Internet.

Ultimately, the decision between C# and Java may depend on your familiarity with the languages, the availability of development tools, and the specific features and libraries that each language provides for your application needs. If you have previous experience with Delphi, you may find the transition to C# or Java smoother based on your familiarity with object-oriented programming concepts.

If you are more familiar with Delphi, transitioning to C# may be more straightforward due to the similarity in syntax and object-oriented programming concepts. C# also has a strong and well-supported integrated development environment (IDE) in the form of Visual Studio, which provides a comprehensive set of tools for developing Windows applications.

On the other hand, Java's platform independence may be appealing if you foresee the need to run your application on a variety of devices beyond just Windows computers and Android tablets. Additionally, if you have experience with Java or are interested in learning a language that is widely used across different domains, Java could be a good choice.

It's important to consider the ecosystem and support for the specific features you require. For example, if you need seamless integration with Windows-specific functionalities or APIs, C# might be a more natural fit. Conversely, if cross-platform compatibility and a wide range of libraries are your priorities, Java could be the better option.

Given your familiarity with Delphi, it may also be worth investigating modern Delphi versions and evaluating whether it meets your needs. While it may not be as commonly discussed as C# or Java, it still has a dedicated user base and could provide a smoother transition based on your existing knowledge.

Ultimately, both C# and Java would be capable of meeting your requirements for developing an order accounting program with a local database, and your decision may come down to factors such as personal preference, existing knowledge, and the specific needs of your project.
  •  

JohnSmith

Well, regarding cross-platform (Win and Android), I believe it is quite challenging due to the differences between mobile and desktop interfaces. However, it's not impossible, as even if written in c#, it can be compiled into a single portable EXE. This ability is not dependent on the programming language used.

Regarding the database, I would suggest considering FireBird, which also offers a local database option through its Embedded assembly, similar to SQLite. Additionally, it allows for easy network configuration and replication.

When it comes to Delphi, it's important to remember that it is a commercial product, and ideally should be purchased for commercial use. On the other hand, VisualStudio, especially Express version, is free, and even Community edition has minimal usage restrictions. Furthermore, they do not require any royalties for commercial distribution of the product.
  •  

Ravina123

The .class files for Android are not only generated by Java compilers, but also by compilers of various other languages. The Java bytecode runs in the Java VM runtime environment and its counterpart, the Dalvik VM.

Runtime Dalvik VM is present on portable Android devices, and on desktops (although this is becoming a more abstract concept today), there is a full-fledged Java SE Runtime Environment.

Compiling bytecode into a file is one thing, but executing bytecode instructions from a file is another.

The Java SE Runtime Environment uses the window system of the underlying OS, such as Windows API in Windows and X server API in Linux. Despite their differences, these window systems share many common features.

On portable devices, the screens and input methods are different, with touch screens or pens replacing mice. Additionally, due to the smaller screen sizes, the construction of a graphical interface for desktop and portable devices is significantly different.

In recent years, there has been a trend towards "adaptive design," where the graphical interface adjusts to the screen's features, automatically changing the sizes of graphical elements and transitioning to the next line as needed.

As an addition, it's interesting to note that the trend towards adaptive design reflects the evolving needs of users across different platforms, emphasizing the importance of creating user-friendly experiences regardless of the device being used.

Now, shifting gears to another topic, Delphi is well-suited for developing desktop applications. Meanwhile, for creating programs on Android, one can use Free Pascal in combination with laz4android.
  •  


If you like DNray forum, you can support it by - BTC: bc1qppjcl3c2cyjazy6lepmrv3fh6ke9mxs7zpfky0 , TRC20 and more...