Tuesday, July 9, 2013

The start of a C/C++ adventure...

Newsgroup: comp.lang.c++

Subject: The start of a C/C++ adventure...

From: "Qu0ll" <Qu0llSixFour@...>

Date: Tue, 9 Jul 2013 20:36:26 +1000



I have been programming (mainly) in Java for a number of years but am now

about to embark on an adventure in C/C++.



I found that Java was very suitable for most of the applications I have been

developing and, contrary to popular belief, very fast in most circumstances.

For my server-side work I will still use Java as the principle language of

choice on the basis of the language itself, the productivity of tightly

integrated IDEs, the plethora of build/test tools, the vast standard library

of classes and also the even "vaster" array of 3rd-party libraries that are

available. But I have found one usage scenario where Java is just not going

to cut it...



That is, the UI.



I will almost certainly not be using Java for UI programming (anymore). The

once standard Java GUI toolkit (Swing) has now been deprecated by Oracle

(Java's custodian) and replaced by a hardware-accelerated toolkit known as

JavaFX. Don't get me wrong, JavaFX is a truly excellent product with many

very nice features but its one major flaw is that (as yet at least) it does

not run on "modern" platforms such as mobiles and tablets (e.g. iPhone, iPad

& Android). To me, this means this toolkit is not suitable and probably has

a limited lifespan (unless Oracle commits to an official release for iOS,

Android and Windows RT in the very near future).



So, what do I choose then? Well, after researching the various options I

have decided that the *only* language/platform that seems to be truly

portable (in one way or another) is C/C++ and so I am going to devote a

large amount of effort and resources into learning this language(s) and the

associated ecosystem.



Given that I am about to embark on a *major* project and that much of my

time will now be devoted to getting up to speed in this new language which I

really enter at a "novice" level, I would really appreciate people taking

the time to answer some questions I have at this point. Please bear in mind

that I am a very experienced developer in many other languages, tools, IDEs

etc. and all other aspects of the software development life cycle but do

lack any real practical experience with C++.



First up, I can see that a new standard C++11 has recently been ratified.

OK, so I don't really want to learn anything else but is this possible? I

want to target *all* the main platforms and OSes such as Windows, MacOS,

Linux and *especially* iOS and Android with Windows RT as a bonus. My first

question therefore is this:



1. Is there enough support in terms of compilers and tools to focus

exclusively on C++11 on *all* these platforms or will I just have to suck it

up and learn the older versions of the language because they are the only

ones that run on some of these platforms?



Armed with the answer to question (1), I would like to then look at the best

compilers and tools. For Windows the general buzz is that Visual C++ (and I

would go straight to VS 2012 or even 2013) seems the best environment and

compiler. For Linux it looks like I would have to use GCC and perhaps

Eclipse. For MacOS and iOS it looks like clang through XCode but I am not

sure what is available on Android.



2. What are the best compilers/IDEs and tools for the various platforms and

is it possible to reuse some of the compilers or tools across multiple

platforms? For example, I know Eclipse runs on most platforms but I am not

sure of the quality of the CDT tools it embodies.



This leads me to the next obvious question:



3. Is C++ (especially C++11) *really* portable across all or some of these

platforms or is it necessary to write a great deal of platform-specific

code to develop apps that run on all of them?



Depending on the answer to (3), a further question may be:



4. Is it better to rely simply on C rather C++ to best achieve portability?

If yes, how would I "get" similar functionality that is provided in

libraries written exclusively in C++?



My research suggests that the C and C++ languages themselves are quite

portable but the libraries and windowing toolkits etc. on each platform are

vastly different. This is OK, I am hoping to be able to compartmentalise as

much of the "core" functionality into portable C++ classes and then perhaps

just write native wrappers on each individual platform.



Right, at this point I should know which compilers/tools to use and

precisely which language so next question is to the availability of

cross-platform graphics toolkits. Again, my research suggests that Qt is

head and shoulders above the other offerings on the market but that may not

be correct in all cases. So, in this light, my next question is:



5. What are the best GUI toolkits for C/C++ available that support (at least

in part) true cross-platform development of GUI applications? Is there one

"stand-out" product?



Now I want to look at supporting libraries of more general functionality.

From my research again I see that Boost is used quite heavily and that C++

has a comprehensive standard library anyway. Obviously I have to learn the

latter but my next question is:



6. Is Boost a good bet for additional functionality and is it available on

all the platforms I have mentioned?



Next I want to investigate issues surrounding the build pipeline, in

particular build and CI tools. For Java I have used Ant, Maven and (lately)

Gradle but for C/C++ the common ones seem to be good-old "make" and a now

CMake so my next question is:



7. What are the best build tools for C/C++ development that support

cross-platform development, ideally being able to build native executables

for as many platforms as possible on one single platform?



Then there is the issue of unit testing. Obviously for Java the most common

tool is JUnit and I believe there is also a CPPUnit so my next question is:



8. What are the best unit testing tools, preferably ones that integrate well

with IDEs or tools in (2) and (7) and that provide such feedback as coverage

reports etc.?



That's pretty much the main set of questions I have for now but finally I

would just like to ask:



9. Is there any additional advice that could be offered to someone in my

position that may assist me in cutting through the noise and getting up to

highly-productive speed in C/C++ as soon as possible?



Thanks very much for any input you can provide!



--

And loving it,



-Qu0ll (Rare, not extinct)

_________________________________________________

Qu0llSixFour@...

[Replace the "SixFour" with numbers to email me]









via Usenet Forums - Usenet Search,Free Usenet - comp.lang.c++ http://www.pocketbinaries.com/usenet-forums/showthread.php?38482-The-start-of-a-C-C-adventure&goto=newpost

View all the progranning help forums at:

http://www.pocketbinaries.com/usenet-forums/forumdisplay.php?128-Coding-forums

No comments:

Post a Comment