Previous Next        Current Page: NeXtMidas Training / Background / Why use Java?
back
Start Here   
Background   
   - Midas Product Family   
   - What is Midas?   
   - Midas Family Tree   
   - Current Frameworks   
   - Framework Interoperability   
   - The Midas Philosophy   
   - What is NeXtMidas?   
   - NeXtMidas Design   
   - NeXtMidas Benefits/Features   
   - NeXtMidas Option Trees   
   - Why use Java?   
   - Why use Java? (ctd.)   
   - Why use Java? (ctd.)   
Common Midas Concepts   
Getting Started - Part 1   
Getting Started - Part 2   
Working with Files   
Option Trees   
Macros - Part 1 (Basics)   
Macros - Part 2 (Graphics)   
NetBeans - Part 1 (Setup)   
NetBeans - Part 2 (GUIs)   
NetBeans - Part 3 (Profiler)   
Eclipse - Part 1 (Setup)   
Eclipse - Part 2 (GUIs)   
Primitives   
WebStart   
Maps & Imagery   
X-Midas Interoperability   
RMIF & Remoting   
Installing NeXtMidas   
Support & Maintenance   
File Handlers   


  • Why use Java?
    Java is object-oriented.
    Makes it much easier to extend and reuse existing code. This results in less total code being written compared to C or Fortran. - Lower development and maintenance costs.
    Java's package naming scheme.
    This guarantees a unique namespace for all Java programs anywhere in the world. Any Java libraries on the internet can be downloaded and used without fear of namespace collisions. - Solves a common issue with sharing C and Fortran code.
    Java allows method overloading.
    This allows a single method name to be reused for different data types or different numbers of arguments. For example:
    public double myFunc(double a, double b);
    public double myFunc(double a, double b, double c);
    public float  myFunc(float  a, float b);
    Everything in Java is "stringable."
    Given a string, anything can automatically be appended to it using the plus operator (+). Numbers are automatically converted to strings. For example:
    String debug = "Pass="+i+"  CenterFreq="+freq;
    - Easier to add debug information than in C or Fortran.
    Exceptions in Java have a stack trace.
    Every exception in Java comes with an automatic stack trace; it even specifies the line number in the source code that caused the exception. - Makes debugging a program much, much easier.
    Java is "platform independent."
    Though a few low-level differences still exist (such as path names differing between Linux and Windows), Java makes it easy to create a program that runs on any platform which has a JVM (Linux, Solaris, Windows, etc). - Minimal cost to support additional platforms.

back