PDA

View Full Version : Appropriate program to use when coding scientific applets?




excalibur313
May 24, 2006, 10:27 AM
I work in a physical chemistry lab and we want to make some applets on a website that can help illustrate scientific concepts. I'm curious what program/language would be best to use to make doing this as easy as possible. One possible example of a program might be changing the size of a box with a slider and seeing how the waves inside the box interfere differently. From a mathematical view it would be plotting an equation in a two dimensional space as other parameters like length, number of electrons, and energy of those electrons change. I've taken a class in C++ and I'm fairly comfortable with dreamweaver (and I used to be quite good at shockwave but it's been a few years and I never did anything this complicated). I'd guess that probably shockwave or java would be best for this job but before I go learning a programming language I want to make sure I'm taking the easiest route. What do you guys think?



savar
May 24, 2006, 11:24 AM
I've taken a class in C++ and I'm fairly comfortable with dreamweaver (and I used to be quite good at shockwave but it's been a few years and I never did anything this complicated). I'd guess that probably shockwave or java would be best for this job but before I go learning a programming language I want to make sure I'm taking the easiest route. What do you guys think?

Unless you have high performance needs (e.g. calculating very complex equations in real-time, or high rate of graphical output), I think Java is an ideal language for small, scientific apps. It's easy to code, very graphical, and it runs just about anywhere (even on a web page).

But learning a language just to write some small apps? Well that's up to you. it is quite an undertaking as Java and C++ are pretty different. And if you've only had one C++ class you might find that there are quite a few more things to learn before you start chugging in Java.

Shockwave is definitely the *wrong* environment choice.

Best of luck.

excalibur313
May 24, 2006, 12:52 PM
Thanks for your help. Should I learn how to program in java from scratch or is there a visual environment that is easier to use?
Thanks again,
Stephen

mrichmon
May 24, 2006, 05:01 PM
Once you get a handle on Java, these lectures on physics simulation in Java might be of some use: http://www.particle.kth.se/~fmi/kurs/PhysicsSimulation/Lectures/01A/index.html

Though if you are programming applets I would recommend that you avoid AWT and use the Swing GUI library instead.

mbabauer
May 24, 2006, 09:48 PM
I work in a physical chemistry lab and we want to make some applets on a website that can help illustrate scientific concepts. I'm curious what program/language would be best to use to make doing this as easy as possible.

Well, you said "Applets", which sort of insinuates the use of Java. There are other alternatives, like for instance JavaScript (which isnt Java at all), or ActiveX. You could also use some creative CGI scripting to do this sort of thing, which could be written in just about anything your web server can execute. Finally, you could use something that does Server-Side Includes, like a PHP, Ruby (or Ruby on Rails), JSP/Servlets, etc, to have static looking pages with dynamic content.

My advice is to use Java in the form of an Applet. JS is weak, and highly prone to browser incompatibilities. ActiveX is Microsoft-specific, and since your on a Mac forum, I have to believe thats not your goal. CGI, PHP, Ruby, JSPs, etc are great for making static-like webpages that are dynamic and rich in content, but unless you plan to get crazy with the AJAX or something you are not going to really get a good "application" feel, and will be SEVERLY limited in the UI.

As far as a tool, try taking a look at the Eclipse IDE (www.eclipse.org). Its pretty much the IDE most Java developers use, plus its free and has TONS of plugins. It also can handle other languages, not just Java.