#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2004
    Posts
    139
    Rep Power
    11

    C++ Java or .net.. when do you use each


    Hi all,
    I have a general question for all of you out there. I know there are tons of websites about it but I want to know YOUR view on it from your experience. There are 3 big programming world: C++/JAVA/.net.. I know some would argue there are others but lets take these as the major one given they are taught academically and relatively wide spread.
    My question is , when do you use which?.. In other words, when you design an application, how do you make a decision on which language to use for your app?
    I always fall in this trap and I don't know the right answer.(or the most right)
    Thanks
  2. #2
  3. Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Feb 2007
    Posts
    1,940
    Rep Power
    3117
    The "right" answer would depend on the situation, but when you say .net I assume you mean just C# in which case you are asking the question: " I need to haul a load of bricks how do I know whether to use a old Dodge Truck/ a newer Chevy Truck / or a newer Ford Truck?" One might be slightly better in certain cases but they all do about the same thing so a lot of times the decision is made in terms of cost. If you have a team with experience with C# then you training them to use Java is a cost that Java would have to have noticeable benefits over C# to be selected in a situation.

    The easier more common question would be do we build this as a client desktop app or a web app. That is like asking do we use the 15 passenger van or the compact pickup.

    If these 3 are the only big programming languages then you won't get very far. What about PHP? SQL? Python? Perl? Ruby? Javascript? VB? COBOL? Delphi? Coldfusion?
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2004
    Posts
    139
    Rep Power
    11
    Originally Posted by jzd
    The "right" answer would depend on the situation, but when you say .net I assume you mean just C# in which case you are asking the question: " I need to haul a load of bricks how do I know whether to use a old Dodge Truck/ a newer Chevy Truck / or a newer Ford Truck?" One might be slightly better in certain cases but they all do about the same thing so a lot of times the decision is made in terms of cost. If you have a team with experience with C# then you training them to use Java is a cost that Java would have to have noticeable benefits over C# to be selected in a situation.

    The easier more common question would be do we build this as a client desktop app or a web app. That is like asking do we use the 15 passenger van or the compact pickup.

    If these 3 are the only big programming languages then you won't get very far. What about PHP? SQL? Python? Perl? Ruby? Javascript? VB? COBOL? Delphi? Coldfusion?
    Thanks for your reply.. I was assuming the cost is not a problem. lets say its only me developing a client app then I always fall in the above question trap.. yes I meant C# for ssome reason i keep calling it .net :s

    ohh I knew somehow the idea of " not only these langauges are big", and thats why I said academically. becuase talking about how wide spread and what schools (as in universities) teach mostly, then I chose these 3 langauges.

    Cobol! comooooon! isnt that dead yet? unless we are talking maintainance not development from scracth
  6. #4
  7. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Posts
    8,298
    Rep Power
    7170
    Cost is still the dominating factor though, as far as capabilities all of them are pretty much equal. An experienced programmer in any of the three will be able to program an average piece of code with about the same level of effort and time.

    Java is easier to go cross platform with. C (not C++) is easier to use with embedded systems. C++ or C# are easier for interfacing with the Windows API's.

    Comments on this post

    • jzd agrees
    PHP FAQ

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around
  8. #5
  9. Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Feb 2007
    Posts
    1,940
    Rep Power
    3117
    Originally Posted by arasem
    Cobol! comooooon! isnt that dead yet? unless we are talking maintainance not development from scracth
    You said programming world in your OP and did not specify new or existing programing. So in total, COBOL is still around. Which makes sense because a large majority of programming is maintenance. But there is still new development that happens in COBOL (even if it is less than many other languages) .


    But going back to 3 main languages academically I would have to disagree. The main languages my school used (about 5 years ago) were Lisp, Python, Java, Smalltalk, C, and PHP.
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2004
    Posts
    139
    Rep Power
    11
    Originally Posted by E-Oreo
    Cost is still the dominating factor though, as far as capabilities all of them are pretty much equal. An experienced programmer in any of the three will be able to program an average piece of code with about the same level of effort and time.

    Java is easier to go cross platform with. C (not C++) is easier to use with embedded systems. C++ or C# are easier for interfacing with the Windows API's.

    Amazing , last statement is what mainly i was looking for .
    Thanks a lot for the hint
  12. #7
  13. No Profile Picture
    Contributing User
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    May 2004
    Posts
    3,417
    Rep Power
    886
    Actually, the Windows API's are all written in C and some of them are absolutely antithetical to common practice in C++ (the use of non-const in params for instance).

    C#'s run-time library is .NET so you get a lot richer and easier to use built-in library for Windows than you do with C++. .NET is available for C++ but it involves some ugly language extensions that are best left in the computing history bit-bucket. MFC is a C++ application framework for Windows that is actually superior in many respects to .NET, but it was poorly designed, used to be full of defects and probably isn't getting the care and attention it needs from Microsoft these days.

    As an "academic exercise", limiting yourself to just those three languages to select from is foolish. In fact, if you intend to have much of a career, you'll need to be proficient in all three and at least handful of others eventually.
    I no longer wish to be associated with this site.
  14. #8
  15. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2009
    Posts
    15
    Rep Power
    0
    Cobol! comooooon! isnt that dead yet? unless we are talking maintenance not development from scracth
    In my work, we still use COBOL. We use it for both for maintainance and development from scratch.

IMN logo majestic logo threadwatch logo seochat tools logo