开发者

Help for novice choosing between Java and Python for app with sql db

I'm going to write my first non-Access project, and I need advice on choosing the platform. I will be installing it on multiple friends' and family's computers, so (since I'm sure many, many platforms would suffice just fine for my app), my highest priority has two parts: 1) ease of install for the non-technical user and, 2) minimizing compatibility problems. I want to be able to fix bugs and make changes and roll them out without having to troubleshoot OS and program conflicts on their computers (or at least keeping those things to the absolute minimum-this is why these concerns are my highest priority in choosing a platform.)

I have narrowed it down to Python or Java. I like Java's use of the JVM, which seems like would serve to protect against incompatibilities on individual computers nicely. And I've heard a lot of good things about Python, but I don't know how much more prone to incompatibilities it is vs Java. In case it is important, I know the app will definitely use some flavor of a free server-enabled SQL db (server-enabled because I want to be able to run the app from multiple computers), but I don't know which to use yet. I thought I could decide that next.

My experience level: I've taken a C++ (console app only) class and done some VBA in Access, but mostly I'm going to have to jump in and learn as I go. So of course I don't know much about all of this. I'm not in the computer field, this is just a hobby.

So, which would be better for this app, Java or Python?

(In case it comes up, I don't want to make it browser-based at all. I've dealt with individual computers' browser settings breaking programs, and that goes against part 2 of my top pr开发者_StackOverflow社区iority - maximum compatibility.)

Thank you.

Update: It will need a gui, and I'd like to be able to do a little bit of customization on it (or use a non-standard, or maybe a non-built-in one) to make it pop a little.

Update 2: Truthfully, I really am only concerned with Windows computers. I am considering Java only for its reliability as a platform.


If you're going to install only (or mostly) on Windows, I'd go with .Net.

If you have experience with C++, then C# would be natural to you, but if you're comfortable with VBA, you can try VB.NET, but if you prefer Python, then there is IronPython or can give a try to IronRuby, but the best of all is you can mix them all as they apply to different parts of your project.

In the database area you'll have excellent integration with SQL Server Express, and in the GUI area, Swing can't beat the ease of use of WinForms nor the sophistication of WPF/Silverlight.

As an added bonus, you can have your application automatically updated with ClickOnce.


The largest issue I can think of is the need to install an interpreter.

With Java, a lot of people will already have that interpreter installed, although you won't necessarily know which version. It may be wise to include the installer for Java with the program.

With Python, you're going to have to install the interpreter on each computer, too.

One commenter mentioned .NET. .NET 2.0 has a fairly high likelyhood of being installed than either Java or Python on Windows machines. The catch is that you can't (easily) install it on OSX or Linux.


My personal choice would be to use Java. You shouldn't run into any problems with different OSs' because of the JVM. However, GUI programmign in Java can be cumbersome but there are plenty of good tutorials on how to create good GUIs' using swing.

HERE is a link to a decent tutorial on using an embedded, Apache Derby, database and JDBC with a simple GUI. The tutorial doesn't really explain how to create the GUI as it's more geared towards using JDBC for data access.

Hope that helps out some.


Then use Jython and you get the best of both worlds :-)

Plus, you can write performance critical parts in pure Java and integrate it easily (more or less).


You can get a program up and running pretty quickly with Python 2.6, the pyodbc module for SQL integration, PyQT for creating the GUI and py2exe to bundle everything together (inlcuding Python) into a single executable so you don't need to install the interpreter on each computer.

That should get you started with a Python app - there is tons of info/answered questions for all of those packages on StackOverflow to help you along the way. Doing some searches, like this, will help you get started too... if you get stuck, you can look here for help.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜