Solved

Language For Application

Posted on 2004-10-07
13
352 Views
Last Modified: 2010-04-17
I've been developing for a few years now, and I have to architect a system that will be running on Linux using a PostgreSQL database for my corporation.  I would like some feedback on what language I should use.  I was thinking about C++, which is fast and comfortable for me.  Somebody else mentioned Mono (I'm concerned about the new-ness of the language C# and the lack of support, but I'm open).  Java is definitely not a good idea.  What do you all think?  I'll split the points between the people who respond.  Thanks in advance.
0
Comment
Question by:mnashadka
  • 3
  • 3
  • 2
  • +4
13 Comments
 
LVL 3

Accepted Solution

by:
PodExpert earned 83 total points
Comment Utility
If it is a long-term project, you have to chose a language, that will surely be supported in the future. Otherwise you are running a risk of loosing money and time, i.e. money and money. Of course, there is a question: What does it mean "supported" on linux systems? Regardless of the answer, C++ seems to be a definitely good idea. Nowadays, it looks like that C++ will live longer than us. In addition, C++ code is portable fairly easily. Not to mention other quailities of the language.

Regards.
P.
0
 
LVL 1

Assisted Solution

by:mrloumrlou
mrloumrlou earned 83 total points
Comment Utility
If your comforable with C++, that's definataly the way to go. C++ isn't going away anytime soon even if C# picks up some steam. C# is still too new to be messing around on any other platform besides Windows. In the future that will change but for now I would wait.
0
 
LVL 31

Assisted Solution

by:moorhouselondon
moorhouselondon earned 83 total points
Comment Utility
Kylix would be my choice, but mrloumrlou is spot on about familiarity.  

Portability to Windows is possible as Kylix is related to Delphi.  One advantage of Kylix is it is a strongly typed language.  You can declare an integer as type bananas and another as type oranges and make sure that you can never add bananas and oranges together inadvertantly, unless you wanted to (in which case you would declare another type: fruit).  If this is a big project, with a team of programmers, the importance of this should not be overlooked.
0
 
LVL 1

Assisted Solution

by:kuldeep_bhayana
kuldeep_bhayana earned 83 total points
Comment Utility
The expressive power of Perl and the ease of issuing database requests through DBI allows to quickly craft the application. Moreover Perl can be used for many tasks in computer departments including: system administration, web development and integration. Perl’s string handling capabilities makes the task of handling ASCII files a breeze and its data structure and memory management facilities help to map the data to the application domain very easily.

A marriage of convenience between C++ and Perl can meet a diverse set of needs.
0
 
LVL 6

Assisted Solution

by:etmendz
etmendz earned 84 total points
Comment Utility
Mono (by Novell; http://www.mono-project.com/about/index.html) is fairly new and it is basically .Net on platforms other than Windows. Mono aims to make .Net as portable as Java (platform independence write once run anywhere thing) -- right now, Mono is also available for Windows and Mac OS. Now because you are coming from C++, your language of interest is C#.

A RAD tool (like Java or .Net) aims to improve developer productivity. Improved developer productivity shortens the project timeline. Shorter project timeline directly reduces project cost. And, depending on the architecture/design of your system, future enhancements, maintenance, management and support are also relatively easier, faster and cheaper.

If you need C++ in some parts of your system, consider a RAD tool that supports the use of codes, libraries and APIs written in other languages. I think C# supports what it coins "unsafe" and "unmanaged" codes as shown in this article: http://www.codeproject.com/csharp/unmanage.asp. You can also search "unmanaged code in C#" in Google for more articles about this. I am not sure if C# in Mono supports the same though you can check their documentation.

If you are confident that your new system may be developed in C++ as fast as in other RAD tools, then go for C++. If you believe that you have enough C++ libraries and APIs to speed up initial developer efforts for the new system, then go for C++. If you are comfortable with C++ and resources permit (people, expertise, time, money, etc.), go for C++.

Now don't get me wrong. I am not saying that C++ is more expensive. My point here is that, to answer your question, the best language for your new system may depend on the budget you have for your project. You know what are readily available to you now. If you believe that using C++ now is as good as using a RAD tool, then go C++...

Have fun.
0
 
LVL 6

Assisted Solution

by:DominicCronin
DominicCronin earned 84 total points
Comment Utility
mnashadka - I think we really need some more information about your project to give any useful input. What kind of application is it, etc. Is speed your biggest concern, or "programmability" or other issues?

C++ is very powerful, but also very easy to get wrong, and requires a lot of effort in things like memory management and type safety that more modern languages provide automatically. Still - as has already been said, familiarity is also an issue, and if you have a team that's already skilled in C++ that is worth considering. Having said that, I would expect a C++ programmer to transfer very quickly to any of the modern languages in the C family. This includes Java and C#.

Why is Java "definitely not a good idea" for you? After all, there shouldn't be a problem using it on a Linux system.

Personally I don't like Perl - I think it is much too easy to write unreadable code.

I would definitely recommend that you look at Python. It's as flexible as Perl but much easier to read and maintain. It has features like dynamic typing and very strong support for lists and other such data structures that make it very easy and natural to process arbitrarily structured data. It will run natively on Linux, and also anywhere that Java will run using the Jython environment. There are libraries for postgresql.

C# is a very nice language to work in, and is similar to Java in many ways. You're right to wonder about whether Mono is mature enough, but then again it is worth noting that the language definition is an ECMA standard, and although Microsoft will remain the most important influence, it's more open than the approach taken by Java. Don't forget to have a look at the Rotor sources for the dotnet framework, which you can probably compile up on Linux to give you an alternative to Mono. Still - you'd want to check the licencing details (Microsoft "shared" source). By the way - Mono is not "by Novell" - it's just that they are now sponsoring it.

The other thing you'll particularly want to look at is the libraries you are going to use. When all's said and done, a good programmer can learn a new language pretty well in a month or two. Learning a library like dotnet or j2ee will take a couple of years to reach expert level, but that's also where the productivity gains are.

0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 8

Author Comment

by:mnashadka
Comment Utility
DominicCronin, I disagree with you about C++ and memory management and type safety, but that's a different point.  Java is not a good language because every release, the language changes quite a bit.  Things that work with the 1.1.8 JRE may not work with the 1.4 JRE.  Actually we can use the same argument for C#.  From .NET 2002 to .NET 2003 there were some major changes, and .NET 2005 has the same issue.

Thank you all for your input.  I'm going to leave this open for the weekend and close it Sunday night or Monday morning.
0
 
LVL 6

Expert Comment

by:DominicCronin
Comment Utility
mnashadka - I'm interested in your disagreement. I suppose it rather depends on what you mean by C++.  By itself C++ doesn't have a garbage collector, and at least in principle, you have to make sure you de-allocate your memory yourself. As for type safety, well last time I looked, C++ had about as much type safety as assembler.

That doesn't mean you can't choose to restrict yourself to certain libraries and programming practices, so a lot of these issues are less *important* than some people make them out to be. A good example of this would be "managed" C++; in other words, the subset of C++ that is "well-behaved" from the viewpoint of the dotnet runtime. Stick to that and you get GC etc.

In real life, there are lots of issues that require a programmer to understand how to allocate and deallocate resources of various kinds. This is true in any kind of non-trivial application development. People have devised strategies for automating some of the more painful things. Sometimes these strategies are encapsulated in programming languages, and sometimes in libraries, frameworks etc.

The thing is that when I say C++ requires "a lot of effort" for some things, it just really illustrates my point that you can't assess a language in isolation. Whether you like it or not, your choice is not "What language should I use?" but "What languages and libraries should I use?"

In my own job, we're just starting now to find that we can work in a single language that is sufficient for all our needs (C#). The choices are different in the Linux world, but the issues are the same.

As for stability of languages, you probably have to accept some change. The question is what the changes cost you, and how that fits in your overall strategy. I heard somewhere that Java is now bigger than Cobol. Maybe it'll be harder for them to introduce new breaking changes. There are two main influences at work: standards and commercial interests. C++ is kept (moderately) stable by a standards process. Perhaps a good example of the other is that Microsoft maintained backwards compatibility over 6 major releases of Visual Basic. (For the purpose of this discussion let's assume that VB.net isn't really VB!) They had a commercial interest in moving their customer base up through each release (not just tools, but platform) - maybe the Java of today would have been different if Sun's commercial interests were aligned in the same way. I'm not saying I'm for or against anything here - just making an observation.
0
 
LVL 3

Expert Comment

by:PodExpert
Comment Utility
Regarding larger projects, I seldom rely on an interpreted language. Not because it is much slower (and it is), but just because there is always my code AND the interpreter, written by someone else. Of course, there are libraries, there is an operating system, BIOS and whatever else - all written by somone else. But why to add even more uncertainity?
0
 
LVL 8

Author Comment

by:mnashadka
Comment Utility
DominicCronin,
The deallocation of objects is very easily handled.  98% of the time (in my experience), pointers are not needed.  On the 2% that they are needed, you can use smart pointers (like std::auto_ptr, which is part of the language) to handle the deallocation.  This has been true for a long time.  A side benefit of not having a garbage collector is that you can much more easily do things like reference counting.  Also, C is really weak on type safety, but C++ is fairly strong.  If you send a string to a function that requires an int, it tells you.  If you send a long to a function that requires an int, it warns you (but it does let you do it).  As far as objects go, C++ is just as type safe as Java and C#.  What Java developers call "primitives" (char, long, int, short, etc.) are not as type-safe in C++, but there is very little difference in objects.  Things like templates actually help make the language more safe.  You have to actually cast to put a string and a list box in the same container (std::vector, for instance), as opposed to Java, which requires no casting whatsoever.

I'm not saying that you don't have some valid points, and I'm keeping them in mind, I just don't think that you were correct about the downsides of C++.

My biggest concern with C# is running it on Linux.  I know that Novell sort of kind of in a way supports it, since Ximian developed it and Novell bought Ximian, but it's definitely a more or less unsupported language.

Thank you all for your input.
0
 
LVL 6

Expert Comment

by:etmendz
Comment Utility
mnashadka,

It is understandable that your confidence in C++ is certain and up to the highest level. There is no point in arguing that there is any downside to using C++ especially when it is seen through the eyes of a C++ architect/developer. In fact, even with Java and .Net around, I know of C++ developers who would forever be attached to C++ simply because of their love and respect for C++. The only thing that draws people away from using C++ is confidence on C++. If you have a powerhouse of C++ experts and developers available, why not C++?

Microsoft still creates and maitains their products using C++. Of course there's .Net, but .Net's likely written in C++ in the first place. Maybe the same can be said about Sun's Java. And even Perl. In fact, it is not suprising to learn that many programming languages are created using C/C++.

We know of products and systems that use C++. Consider Microsoft Office -- C++. Today, Office is a "system" of sorts and you can actually support an entire SME business using only the Office "system". Of course there are database servers, mail servers, web servers, etc. -- all in C++.

There are things that RAD tools like Java or .Net could allow for those who are "in a hurry" and may have no early investments with C++. RAD tools are not about features that are not existing in C++. RAD tools are about productivity. And if you can enjoy the same productivity with your C++ investments, why not C++?

Have fun.


:-)
etmendz
0
 
LVL 8

Author Comment

by:mnashadka
Comment Utility
My only concern with .NET is the fact that it's going to be written on a Linux box.  Otherwise I might be ok with it.  Thank you all for your input.
0
 
LVL 6

Expert Comment

by:DominicCronin
Comment Utility
etmendz - I believe large parts of dotnet are written in C#. Most of the people at Ms writing in C# will be accomplished C++ coders; it's a matter of productivity .
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
userCompare  challenge 3 61
count7 challenge 12 66
Program to display an alert on Windows Toolbar 2 64
python sqlite question 11 42
Purpose To explain how to place a textual stamp on a PDF document.  This is commonly referred to as an annotation, or possibly a watermark, but a watermark is generally different in that it is somewhat translucent.  Watermark’s may be text or graph…
A short article about a problem I had getting the GPS LocationListener working.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now