Programming Language for Mac OS X application [closed] - c++

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I have an upcoming project coming up in which I want to dedicate several months to making a professional application which is basically a text editor with a special purpose (can't disclose too many details). The program shouldn't be too complicated, but I wanted it to have a nice GUI and be fast enough to sell from either the Mac App store or my website.
I was going to initially make it for Mac OS X and then later Windows and I wanted to know, for someone who is intermediate at programming, what language should I use for this program? Should I use a library? I already have a foundation in c++.

The standard programming language for Mac OS X is Objective-C, however, as a rock solid Unix descendant, it also has great C and C++ support. If you want to write an efficient, nice and native (OS X) look-and-feel GUI, I'd suggest you use Cocoa (it has Objective-C interfaces) which is Apple's default and official GUI implementation for OS X. Considering portabilitiy, however, you may also use some cross platform GUI/widget toolkit, such as QT, GTK+, etc. (which are also, in general, written in C/C++).

The Language
Well, if you have a solid foundation in C++, by all means use C++! However, I must warn you that C++ has a bad reputation for allowing only those people to use it who know every damn feature of the language. Therefore, you may soon run into problems if you don't have a thorough knowledge of templates for instance.
With reference to the platform, in my opinion, all mainstream languages are more-or-less good enough for Mac OS X development ( or Windows development ), it really depends on what you feel convenient using.
The Library
Now we come to my favourite part. Comparing Application frameworks. There are many choices when using Mac OS X. If you want to target multiple platforms ( as you say, you want to also support Windows later on), I suggest GTK+ or Qt. For a comparison between the two libraries, see here.

If you're programming for OS X, check out Cocoa. If you're aiming to create multi-platform applications, check out Qt.
Cocoa uses Objective-C, which is a superset of C - transitioning to it from C++ isn't too difficult, and the Apple Developers site has quite a bit of information for beginners.
Qt works with C++ or Javascript.

You can use marmelade
http://www.madewithmarmalade.com/
To make your application portable and you can write it in C language.

I would use Free Pascal with Lazarus for this, with native interface (still Carbon on OS X though, the Cocoa interface is still in development AFAIK) due to its natural cross platform behavior, both language and libraries so there's no external dependencies required. This would require you to learn another language and framework (it's the same with C++ if you're planning to use QT, GTK, or whatever you've never used before) however.

Related

How do I go about making a GUI- enabled desktop app in "pure" ISO C++ [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I am trying to make my first desktop app, but I am at my wit's end trying to understand C++/CLI. After several hours of trial and error, it seems to me that it is unrelated with C++( I may be wrong ). I am getting hard time making functions, classes, etc. work, and am unable to understand what is going on. So, I have decided to abandon it for the moment.
Please tell me whether I can make a GUI-enabled desktop app in "pure" C++, using just my Dev C++ compiler. Yes, it might be a better idea to use visual studio, but I want to return to it later. Right now, please tell me whether I can do it in "pure" C++, and if yes, how(i.e., any books, tutorials or some specific learning path).
And yes, the app is just for my learning purpose. So, the issues of cross-platform compatibility, etc. can be safely ignored.
Thanks in advance.
If you're stuck with Windows, some of the more popular choices are:
Microsoft MFC. Not for the faint of heart...
Qt. However, this is also not strictly ISO C++, as it requires a special pre-compilation step. But it comes with a very complete library, is cross platform and widely adopted. The documentation is excellent and the learning curve not very steep.
wxWidgets. Cross-platfrom, popular and standard C++ only. However, relies heavily on the pre-processor and code using it tends to become ugly... (that's my personal opinion...)
GTK+, which is pure C. There is a pretty decent C++ wrapper called gtkmm.
Qt is probably the best C++ GUI framework out there. It does include language extensions that are not 100% C++ but it comes pretty close. There are also tutorials to help you out.
Standard C++ does not come with a gui. There are certain libraries that you could use to create a gui in c++ such as:
Qt
WxWidgets
I hope this helps
Firstly, C++/CLI is not C++, its Microsoft's ".net that looks like C++" language. Ignore it, it was pretty much dead on arrival.
I'm not sure what you mean by "pure ISO C++", if you mean you want to create a GUI app using C++ without any special language features (eg C++/CLI) then you'll be looking at Qt nowadays. Its really rather good and is probably the best C++ GUI system there is today. You can also download the QtCreator IDE that will help you out. (its also all open source and your apps will run on mobile and Linux too!)
If you want something that is Windows-only then you could write old MFC apps (for the desktop) or if you want to be bleeding-edge then write WinRT apps. The native OS GUI features are available in both these systems.

FLTK, wxWidgets, GTK - light, easy and portable [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I know that it isn't first topic when somebody considering different GUI libraries. But I have a few specific questions and needs that "the others" didn't have.
(As usual) I'm novice programmer, learning C++ now (finishing thinking in c++) and my university wants me to learn some GUI for programming projects (I'm electronics student) - I'm writing this because personally I would like to know C++ a little bit better before learning some additional libraries. But reality is brutal in this case :).
I'm looking for simple (easy to write in) library that will work under windows, linux and embedded systems (embedded linux or any other lightweight ARM system, not necessary android) without much (best case - ANY) modifications. I would like this library to be lightweight (thats why I eliminated QT), easy to use with other libraries (for audio/video players or some network applications) and languages (I'd like to write also in C, which will be my primary language I believe, maybe some python, D or java). The documentation/tutorials should be also easy and simply written - my English skills are very basic, as you can see reading my post.
After googling for hours my vote is for GTK/GTKmm which allow me to use LXDE, XFCE and GNOME (light/medium/heavy) without installing additional libraries, write code in C, C++, D, Python, Java and almost every programming language that exists. On the other hand many peoples wrote that FLTK is very simple, most portable and probably the fastest one. WxWidgets has many positive opinions so... I just don't know, please help me.
Thanks for your replies,
Pawel
I heard that FLTK is lightweight but have never used so no much comments. I have used however GTK+ and wxWidgets. I would say go for wxWidgets as it is a wrapper around GTK+ in Linux. Apart from that here are added advantages
wxWidgets uses native widgets wherever possible
You can use wxBase library which makes it lightweight (at expense of some feature see this)
Great support than GTK+ IMHO (forum, IRC, mailing list, SO, et al)
Also you can read these entries
http://docs.wxwidgets.org/trunk/page_libs.html
http://wiki.wxwidgets.org/WxWidgets_Compared_To_Other_Toolkits
https://stackoverflow.com/questions/5141116/choosing-between-qt-gtk-and-wxwidgets
https://stackoverflow.com/questions/1257894/wxwindows-vs-gtk-for-cross-platform-gui-programming
http://www.gidforums.com/showpost.php?p=37761&postcount=8
I would personally suggest you go with wxWidgets!

Creating C++ graphic user interface: What is the easiest way to do it? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
So it is my understand that using the MFCs, one can created a GUI for a windows application. But is it easier to use use the Qt package instead? Qt is what I'd use for writing an application that runs on linux but for windows I wonder if using the Windows MFCs would be less difficult and time consuming.
Since you say "Qt is what I'd use... on linux" it sounds like you're already familiar with Qt. In that case I'd definitely recommend Qt over MFC. (Hey, that way you can write your application for both platforms!)
If you're already comfortable using Qt, then stick with it - it's cross platform so it will work fine on Windows. Unless you have a specific reason to, there's no point restricting your application to a single platform (and learning a whole new framework) when you are already familiar with a cross platform one.
Additionally, MFC is a lot harder to work with than Qt. Although it was designed to be an Object Oriented layer on top of WinAPI, it wasn't done particularly well IMO and you still need to be comfortable with WinAPI if you want to be proficient with MFC. The out-of-box widgets are fairly dated and limited in their configurable options, and modifying them or designing new ones is not particularly easy. Being an out of date technology, it is also difficult to find resources and/or support online for when you get stuck.
If you do have your heart set on MFC, you may also want to take a look at wxWidgets - it has a similar "feel" to MFC but is more up to date and cross-platform. Personally I prefer Qt.
Qt can be quite heavyweight, both in terms of implementation (lots of DLL dependencies if you link dynamically) and in terms of building (it adds extra steps to your build process). If your application is more suited to something lightweight (but also more basic in it's functionality), take a look at FLTK.

Is coding in native c++ still popular? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 12 years ago.
I want to go into native c++ programming after University, but it seems like languages that compile with JIT (like .Net) are overtaking c++. What does the future hold for Native code?
C++ is the seventh programming language I have been professionally paid to program in, and I'm sure won't be the last. My advice is not to think of yourself as a specific language programmer. Even if JIT takes over the world, it has to get down to native machine code eventually, and someone has to write that software.
There are a lot of opportunities to work on natively compiled C++ code. It's especially popular (along with C) in non-PC environments such as embedded and real time environments, and in a lot of situations where there is some level of safety certification required.
Game programming, where performance is usually critical, is another area where C++ is very popular.
It is less popular than it was in traditional 'desktop' applications and web service applications although you can find native code projects in both these areas - especially the former - if you hunt around.
I'm not sure what you mean when you say that you will be "going into native C++ after college". Your career will not be defined by what languages you know, it will be defined by what you can do with those languages.
However, C++ is used widely in many applications. I work in systems and we use C++ for everything. .NET isn't an option in my world, but the guys doing the GIU's next door use it for everything. It comes down to what you want to do with your career. The language you use will come naturally, you are thinking about it backwards.
There will always be a place for C/C++
Any application that needs to be as
fast as possible will be written in
a native language like C/C++
Any application that runs on a device that has limited memory
will
run better in C/C++ since memory
management is more deterministic.
Operating systems will continue to be written in C. That
include
device drivers.
Up until recently one always had the luxury of speeding an application up by using better hardware. Will Moore's law being stretched to the limit, chances are the performance improvements will have to come from software. Chances are that languages that give better performance will come into their own in this regard.
If you go desktop C++ is still the way to go especially if you want to be cross platform.
Java GUI Libraries are way to slow and .NET is not portable (the GUI part).
But C++ is a language beast, the only language where i can understand managers to ask for 5 years experience.
In the server world the VM/JIT has so many advantages that only basic infrastructure is coded native. If this is the industry you want to join learn (infrastructure) or don't learn (applications) C++.
Its also pretty popular in embedded programming where you can't fire up a hundert MB virtual machine.
Since C/C++ is the only fast imperative native programming language left in mainstream you should learn at least the basics.
Yes, of course it is:
http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html
http://langpop.com/
And some of the great features like rvalue-references, variadic templates, uniform initializations, lambdas, unrestricted unions, thread-local storage, extern templates and ... yet keeps C++ to be a good choice for 20 years of the future, until the C++ committee decides to publish another new standard for the other remaining years (like a do...while!) (:
Note that the computers needs native programs to run! Java, .NET, python and ... needs native environment to run on it! so, native programs are the base of softwares.

What technologies do C++ programmers need to know? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
C++ was the first programming language I really got into, but the majority of my work on it was academic or for game programming. Most of the programming jobs where I live require Java or .NET programmers and I have a fairly good idea of what technologies they require aside from the basic language. For example, a Java programmer might be required to know EJB, Servlets, Hibernate, Spring, and other technologies, libraries, and frameworks.
I'm not sure about C++, however. In real life situations, for general business programming, what are C++ programmers required to know beyond the language features? Stuff like Win32 API, certain libraries, frameworks, technologies, tools, etc.
Edit: I was thinking of the standard library as well when I said basic language, sorry if it was wrong or not clear. I was wondering if there are any more specific domain requirements similar to all the technologies Java or .NET programmers might be required to learn as apposed to what C++ programmers need to know in general. I do agree that the standard library and Boost are essential, but is there anything beyond that or is it different for every company/project/domain?
As for every language, I believe there are three interconnected levels of knowledge :
Master your language. Every programmer should (do what it takes to) master the syntax. Good references to achieve this are :
The C++ Programming Language by Bjarne Stroustrup.
Effective C++ series by Scott Meyers.
Know your libraries extensively.
STL is definitely a must as it has been included in the C++ Standard Library, so knowing it is very close to point 1 : you have to master it.
Knowing boost can be very interesting, as a multi-platform and generic library.
Know the libraries you are supposed to work with, whether it is Win32 API, OCCI, XPCOM or UNO (just a few examples here). No need to know a database library if you develop purely graphic components...
Develop your knowledge of patterns. Cannot avoid Design Patterns: Elements of Reusable Object-Oriented Software here...
So, my answer to your updated question would be : know your language, know your platform, know your domain. I think there is enough work by itself here, especially in C++. It's an evergoing work that should never be overlooked.
C++ developer have to grok std and boost libraries.
List of other technologies largely depends on project type. For sure you will have some interaction with SO, so you will need to know API of your environment.
As for data-access and other stuffs there are tons for different solutions. C++ is much richer than some managed langs in that sense. 99% of old popular systems have C/C++ interface.
After you clarified your question a bit in the comment to my answer I can recommend:
Good code browser (SourceInsight or Understand For C++ for example)
Static analysis tools (Link, KlockWork Inforce, etc.)
MySQL\SQLite (I encountered these DB in a huge number of C++ projects)
UI technologies (OpenGL\GLUT, DirectX, GDI, Qt, etc)
technologies you should know as a C++ programmer (and therefore more technically knowledgeable than lesser programmers ;) ):
performance issues - what makes things go slow, how to find and fix such issues. I also mean stuff like context switching, cache lines, optimised searches, memory usage and constraints, and similar stuff that your average VB/C# developer doesn't care about.
threading issues - how to get the most from a multi-threaded app, how to detect and fix abuses of the same.
low-level communications - especially being able to connect to obscure systems that no-one else has written a toolkit for (especially radio comms), latency and bandwidth management.
Otherwise, for specific tools - it depends on what you're targeting, Windows dev will be different to Linux, different to embedded.
This will largely depend on the used platform and other constraints. As a general rule, a good (C++) programmer is (or should be) able to learn a platform-specific API in a very short time. For C++, it's much more important to understand the different tool chains (e.g. a Windows programmer should also know the GCC tool chain) and differences in compilers. Programmer should also understand limitations and platform-dependend behaviour of the language.
As for libraries, C++ programmers absolutely need to know STL and Boost. No discussion.
Standard Template Library
http://en.wikipedia.org/wiki/Standard_Template_Library
Besides the stuff everyone listed, keep in mind that C++ programmer have space on the embedded systems market (much more than most other high level languages).So familiarity with embedded systems and development may open a lot of doors and job opportunities where you will not be competing so heavily with Java development for example. So learning to code compact code (compact after compiled) and low memory usage techniques is a good bet.
if you're using gcc you should definitely know gdb. Actually, you should be proficient with the local debugger for whichever compiler you're using. Other than that there is such a wide range of libraries used that being able to quickly pick up an API is more useful than any specific one. I would suggest learning doxygen though.
If you are using linux then Valgrind is a very usefull tool for checking how your program deals with memory access.
In no specific order
COM/ATL
DirectX
MFC & Win32
STL
GDI
BOOST
The popular way to use C++ in the mobile space would involve learning Symbian OS development.
http://developer.symbian.com