Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

mysockshurt

macrumors newbie
Original poster
Oct 20, 2007
9
0
I have a pretty good knowledge of C++ and DirectX programming and I was looking at the Imac(yes I know you can't use dx but there is always opengl), (College has very good discount). I know apple has Xcode
but the thing is , is it worth using over visual studios(I have a copy, this is a major part of weather or not to buy a mac).
From a lot of mac forums I got Xcode(The one that came with tiger) was pretty bad and it would be an absolute down grade from even devC++. I also got from the many mac forums that xcode is hard to navigate(Once again not xcode 3 but the prior(Navigate by what I heard was for example adding a lib file to vsC++ is Tools->Solutions->VC++ directories, and you add them)).
Also I got from the mac forums that macs are pretty bad for graphical developers(game) to use, because of the graphics cards(I know the ati 2400 was bad on the pc, but is it any better on the mac?).


Is this true? Is xcode hard to learn? Is it just better to use eclipse or netbean? Is carbon hard to use?

PS: Yes I know macs can run bootcamp and parallels but that would kind of defeat the point of buying it.

Thanks a lot
MySocksHurt
 

gnasher729

Suspended
Nov 25, 2005
17,980
5,566
You have to be aware that these forums are full of whiners. Of course there are lots of people who think XCode is hard to learn. There are others who have a million lines of code or two and have no problems with XCode whatsoever.

There are several major software companies using XCode. And one of them is Apple Inc. The whole Mac OS X operating system and all the applications shipping with it are completely developed in XCode. And XCode is developed using XCode:D

Carbon isn't hard to learn. However, it may not be the right thing to learn. Carbon is perfect for porting applications. The APIs are more like building blocks that let you do anything you want to do. You have to do a bit of work yourself, but you can take a Windows application and replace the windows stuff with Carbon stuff.

Cocoa is much, much better for new development. Cocoa does a lot more for you. On the other hand, it means you have to do it their way. Cocoa is based on the Objective-C language, which is an object-oriented extension of C. In some ways it is more powerful than C++, in other ways it isn't. Doesn't take long to learn, but needs a bit to get used to.
 

Eraserhead

macrumors G4
Nov 3, 2005
10,434
12,250
UK
Carbon is effectively depreciated and will never go 64-bit. But Cocoa is really good for app development as it does lots of stuff for you, so you should develop new applications using that. Carbon is OK for porting, but you'll always be stuck at 32 bit with it.

Things like Core Data which handle File input/output and Core Animation are part of Cocoa.

If the ATI-2400 is bad on the PC, it'll be bad on the Mac too, however as PC gaming isn't doing so well, its not as big an issue as it once was.

Eclipse/Netbeans are probably better for Java than Xcode. I quite like Xcode personally, but any editor with a build button and syntax colouring will do for me ;).
 

mduser63

macrumors 68040
Nov 9, 2004
3,042
31
Salt Lake City, UT
I personally really like XCode. I've written tens of thousands of lines (maybe hundreds? haven't counted...) with no major complaints. I do think XCode 3 is an improvement over XCode 2, but XCode 2 was/is good.
 

antibact1

macrumors 6502
Jun 1, 2006
334
0
When people are considering these decisions, they should try to think about them in a task-oriented way. Do you need to develop on OS X, do you need to develop a native application (Cocoa/Carbon versus something portable, Java). Sure it's cool to use a Mac and say you develop on it, but developing on Mac although great to do, may not be the best use of your time if you aren't going to be developing actively on it.

When I develop software, I always approach each new application with respect to which technology is the "best" given certain operational and requirements parameters. Quite often I don't use an IDE, just vi. Native OS X applications, always X-code. Other larger applications on OS X, often Eclipse. Everything varies.
 

hankolerd

macrumors 6502
Sep 19, 2007
353
6
Seattle, WA
I am not much of a programmer, just a student. But I use it for all my projects. I e-mailed the Ken Drysback at Codeblender a couple weeks ago, and he said that he uses Xcode, and is happy with it, and that it was nice to switch to(he said he was using codeWarriors)

From the Microsoft Apple dev team blog, if I read it correctly, they say they have been using Leopard and Xcode 3.0 for the last 6 months or so to develop Office 2008 for mac. And they said they were impressed with how nice Xcode 3.0 was to use. Now as a low level programmer I can't tell much of a difference from Xcode 2 to Xcode 3, but there are a couple improvements I have noticed that I like. Such as blocked functions and classes, so you can close a swish a function you know is working, and just look at the code you are debugging, or writing, or what have you.

I have only used Visual Studios once. It was nice, but I don't know why I would use it over Xcode. I have heard Eclipse is nice, but I think that is more for Java, which is all I know right now, but I don't think they offer much for the other languages.

I really doubt you will be annoyed or dislike Xcode in any way unbearable, if at all. Good luck with your decision. If nothing else, you will not regret buying the mac, because you can always get a cheap version of windows from your school and put it on a partition through boot camp and then install visual studios again. You might not like Xcode, but you can't go wrong with a Mac.:apple:
 

TheStu

macrumors 65816
Aug 20, 2006
1,243
0
Carlisle, PA
When i was studying Computer Science in school, my professor strongly suggested that we (the students obv.) use JGrasp for all our coding needs. Well... I hated JGrasp. It never remembered anything from one use to the next, so everytime I opened it I had to move things to how I liked them.

I then started using XCode, and for whatever reason, it just felt too heavy for what I was doing (bear in mind, the longest project we had was maybe 3 classes, 4 cpps, 700 lines total?) so I never really got into it.

Eclipse with the C++ package really was great for me since it kept everything contained in one window (don't have a whole lot of screen real estate) but I didn't really feel restrained by it.

For really quick jobs, I used Emacs since the syntax coloring is great, especially on my colorblind (yes I am) friendly black background with white text.

So, don't take this as XCode being bad, it just wasn't for me. If I was developing full apps or larger projects, I would probably have used XCode, but we were developing software (later in the year) for Windows, so had to use VS.Net for that.
 

mysockshurt

macrumors newbie
Original poster
Oct 20, 2007
9
0
One question I also have with xcode is linking to a library.
I VS I would need to add 3 new directories to get opengl up and running, do I need to do the same? Does it already have opengl installed?

Also with the sentiment on obj-c and the cocoa api. To get the best out of it does that mean I will have to drop c++ because it will never be 64bit?
I am pretty familiar with java as a secondary language I use, can that be used for cocoa?
 

mduser63

macrumors 68040
Nov 9, 2004
3,042
31
Salt Lake City, UT
One question I also have with xcode is linking to a library.
I VS I would need to add 3 new directories to get opengl up and running, do I need to do the same? Does it already have opengl installed?

Also with the sentiment on obj-c and the cocoa api. To get the best out of it does that mean I will have to drop c++ because it will never be 64bit?
I am pretty familiar with java as a secondary language I use, can that be used for cocoa?

Java can be used with Cocoa, but it is a deprecated interface and hasn't been updated in a while. Objective-C is (and will be for the foreseeable future) the best language to use for Cocoa assuming you're as comfortable with ObjC as any other language. New in Leopard is (built-in) support for Cocoa programming using Ruby and Python. Also, you can write using Objective-C++ which is essentially a language that allows you to mix Objective-C and C++ syntax (with some restrictions of course).

Carbon is not going away any time soon. While it's not 64-bit capable, it's important to note that even some of Apple's own apps like iTunes and Finder use Carbon, not to mention MS Office, Photoshop, etc. However, Apple has made it clear that for new development, Cocoa is the way to go unless you have a really good reason not to.

Your question about adding libraries doesn't really make sense to me, but generally adding anything to an XCode project involves dragging it into the project and then (in some cases) changing a build setting or two. It's really not difficult. I wouldn't use the word "installed" to describe something like OpenGL but it's available in OS X and of course that means you can use it in XCode. See here.

My suggestion: If you want to develop native, Mac-only apps, use Objective-C/Cocoa. If you want to develop cross platform apps, use Java (in Eclipse).
 

gnasher729

Suspended
Nov 25, 2005
17,980
5,566
One question I also have with xcode is linking to a library.
I VS I would need to add 3 new directories to get opengl up and running, do I need to do the same? Does it already have opengl installed?

Also with the sentiment on obj-c and the cocoa api. To get the best out of it does that mean I will have to drop c++ because it will never be 64bit?
I am pretty familiar with java as a secondary language I use, can that be used for cocoa?

For OpenGl, use the menu "Add to Project", then add the OpenGL.framework and OpenAL.framework from the System/Library/Frameworks folder. All major libraries are in "Frameworks", they are all installed on your machine, and you add the ones you need to your project. And they are all in the same "Frameworks" directory. The "Add to Project" takes care of header files, and object files are in the system anyway.
 

gnasher729

Suspended
Nov 25, 2005
17,980
5,566
Also with the sentiment on obj-c and the cocoa api. To get the best out of it does that mean I will have to drop c++ because it will never be 64bit?

The Objective-C compiler compiles C, C++ and Objective-C, so you can mix all three languages if you like. All Cocoa objects are Objective-C. The Carbon libraries are not and will not be available in 64 bit, but the compilers all support 64 bit. So if you have an application with lots of calculations and little user interface, you could write most code in C++ and the user interface in Objective-C, and OpenGL doesn't count as user interface, use any language you like for that.
 

WeeBull

macrumors newbie
Aug 18, 2004
9
0
Sounds like you're in a situation that happens to quite a few switching over.

Don't be scared of Objective-C. C++ is far scarier, and you've managed that one.

Objective-C, like C++, is built on C. It has classes, objects, and methods in a similar way to C++ except with a different syntax. The main difference is that it's weakly typed, whereas C++ is strongly typed. Don't let the terminology fool you, I'd personally say weak typing is good (but it's debatable).

Give it a couple of days, and you'll be fine. You can even re-use some of your old C++ code if you want to using Objective-C++.

Cocoa as a set of libraries will take longer to get your head around, but that's true of carbon as well. Strangely enough you can't use the Microsoft APIs on a Mac ;-) so you'll have to learn something new.

The Java bridge for Cocoa is depreciated as I understand it. Because Obj-C, and therefore Cocoa, is weakly typed it didn't fit well with Java, so it was a bit of a "square peg-round hole" situation. This is the same reason that there's no direct interface from C++ for Cocoa.

Xcode itself takes some getting used to, but then I'm not a fan of IDEs. I personally just tend to use it to manage the projects, and then run a separate text editor (Textmate). Interface Builder is good (especially version 3), but the "Magic" that goes on can be a little confusing sometimes.

The performance tools are *EXCELLENT*. Only Intels Vtune comes close.

Debugger is Ok / can be a little flakey, but some of the other tools like 'Instruments'/DTrace look like they're going to be amazingly useful (DTrace already is, 'Instuments' needs some stability work IMHO)

All in all I'd say it was a good Dev platform, and if you're into graphics, probably the best (because of CoreImage/Animation, Quartz, and OpenGL)
 

mysockshurt

macrumors newbie
Original poster
Oct 20, 2007
9
0
Sounds like you're in a situation that happens to quite a few switching over.

Don't be scared of Objective-C. C++ is far scarier, and you've managed that one.

Objective-C, like C++, is built on C. It has classes, objects, and methods in a similar way to C++ except with a different syntax. The main difference is that it's weakly typed, whereas C++ is strongly typed. Don't let the terminology fool you, I'd personally say weak typing is good (but it's debatable).

Give it a couple of days, and you'll be fine. You can even re-use some of your old C++ code if you want to using Objective-C++.

Cocoa as a set of libraries will take longer to get your head around, but that's true of carbon as well. Strangely enough you can't use the Microsoft APIs on a Mac ;-) so you'll have to learn something new.

The Java bridge for Cocoa is depreciated as I understand it. Because Obj-C, and therefore Cocoa, is weakly typed it didn't fit well with Java, so it was a bit of a "square peg-round hole" situation. This is the same reason that there's no direct interface from C++ for Cocoa.

Xcode itself takes some getting used to, but then I'm not a fan of IDEs. I personally just tend to use it to manage the projects, and then run a separate text editor (Textmate). Interface Builder is good (especially version 3), but the "Magic" that goes on can be a little confusing sometimes.

The performance tools are *EXCELLENT*. Only Intels Vtune comes close.

Debugger is Ok / can be a little flakey, but some of the other tools like 'Instruments'/DTrace look like they're going to be amazingly useful (DTrace already is, 'Instuments' needs some stability work IMHO)

All in all I'd say it was a good Dev platform, and if you're into graphics, probably the best (because of CoreImage/Animation, Quartz, and OpenGL)


I see what your saying but after looking a brief tutorial of obj-c, it burned the eyes(No offense). The more I look at the mac the more it seems like a really bad idea(The tech people being idiots,the fact I like pc games,the price and performance). I already learned the basics of 6 languages, and it seems that I would need to use one more to stay on the "update wagon" of apple programming.
I wanted to just transfer my work(Asides from dx) to the mac but it seems like I will need to learn more to be at the point I am already with vs as well as after trying it out it seemed kind of complex to just get a console app going.
 

Krevnik

macrumors 601
Sep 8, 2003
4,101
1,312
I see what your saying but after looking a brief tutorial of obj-c, it burned the eyes(No offense). The more I look at the mac the more it seems like a really bad idea(The tech people being idiots,the fact I like pc games,the price and performance). I already learned the basics of 6 languages, and it seems that I would need to use one more to stay on the "update wagon" of apple programming.
I wanted to just transfer my work(Asides from dx) to the mac but it seems like I will need to learn more to be at the point I am already with vs as well as after trying it out it seemed kind of complex to just get a console app going.

Console apps are definitely the weak point of XCode's templates... mostly because console apps aren't exactly where users on the Mac spend their time, and those writing console apps on the Mac tend to come from a Unix/Linux background, and already have their makefile tools they are comfortable with.

That said, I do straddle both platforms, focusing on both C# and Objective-C, and I am not disappointed that I did it that way. That said, I admit that VS does some things better than XCode, but overall, the /only/ Windows API I will write against is .NET and what little I need in Win32 will get P/Invoked. It has been years, and the Win32 platform is still a bitch and a half to wrap your head around when you get into the complex stuff. Cocoa is much closer to .NET in functionality and design than Win32, which in my opinion, is a plus.
 

mysockshurt

macrumors newbie
Original poster
Oct 20, 2007
9
0
Console apps are definitely the weak point of XCode's templates... mostly because console apps aren't exactly where users on the Mac spend their time, and those writing console apps on the Mac tend to come from a Unix/Linux background, and already have their makefile tools they are comfortable with.

That said, I do straddle both platforms, focusing on both C# and Objective-C, and I am not disappointed that I did it that way. That said, I admit that VS does some things better than XCode, but overall, the /only/ Windows API I will write against is .NET and what little I need in Win32 will get P/Invoked. It has been years, and the Win32 platform is still a bitch and a half to wrap your head around when you get into the complex stuff. Cocoa is much closer to .NET in functionality and design than Win32, which in my opinion, is a plus.

The console app is not where I am aiming but just was an example(All the compilers I have used till date had a build+start .exe button so I thought it would be that way.
But do I need to drop everything to do obj-c with leopard to get the best out of it? Can I still keep c++ and java to work with jogl and opengl(Is there so way to use obj-c with opengl and is there enough support to go further then 1 person pong?)? Why do the get a mac adds make apple and all apple products so unappealing?

MySocksHurt
 

Krevnik

macrumors 601
Sep 8, 2003
4,101
1,312
All the compilers I have used till date had a build+start .exe button so I thought it would be that way.

It is that way... Just that the command is titled "Build and Run". The one thing /I/ had to get used to is that in XCode 3, they changed it so that Build and Run will always load your app in a debugger if you have a breakpoint set (even if it isn't active).

But do I need to drop everything to do obj-c with leopard to get the best out of it?

Depends on what you are doing... Right now, I don't say you need to. In the future, Objective-C will be what you need to use if you want to use the latest features in your app (and is how Apple exposes features like CoreAnimation). 64-bit support is incomplete in Carbon, and likely won't be finished.

The catch is that if you stick with C++ and don't adopt Obj-C at some point, you will eventually get pushed into a niche area of the APIs, and kinda limited in what you can do. In some cases, this isn't always a bad thing.

My advice is that if you want to develop apps for sale on the platform with a GUI, stick with Java and Swing, or learn Obj-C at some point (it doesn't have to be /now/). Much like .NET and C# are becoming the premier framework/language for non-game applications from smaller devs on Windows, Cocoa and Objective-C is the same for the Mac. Once you get used to it, certain aspects of development are /fast/, and make up for the initial learning curve.

Can I still keep c++ and java to work with jogl and opengl(Is there so way to use obj-c with opengl and is there enough support to go further then 1 person pong?)?

Yup. I am not 100% familiar with the Java -> OGL support, so I am not sure how far you will get with OGL and Java. OpenGL on the Mac is exactly the same as OpenGL elsewhere, same APIs, etc... if you want a simpler environment, you can use GLUT and C++ as your framework.

OGL on the Mac will take you as far as you have the skill for, otherwise we wouldn't have the games on the platform that do exist...

Why do the get a mac adds make apple and all apple products so unappealing?

Kinda seems outside the topic, neh?
 

Monkaaay

macrumors 6502
Jun 19, 2006
258
0
Richmond, VA
I'm a C# developer by day and use Visual Studio 2005 to code in. I haven't much in Xcode but I just don't find it as nice as VS. Interface Builder has been confusing for me as well. As far as connecting buttons and other controls to actions in the controller.
 

elppa

macrumors 68040
Nov 26, 2003
3,233
151
Visual Studio .NET 2.0 has always looked like a big, clunky mess to me, which also happens to hang and pause fairly frequently.

It could be the hardware, or me just not “getting it”. Anyway, my point was XCode is worth giving a go. I have only dabbled in bits (and used a bit more of Visual Studio).

Professional programmers use both for a living, so their must be good bits to both tools.
 

Monkaaay

macrumors 6502
Jun 19, 2006
258
0
Richmond, VA
Same here. I prefer Xcode/IB. About the only thing I really like about VS is its debugger.

Interesting. How long have you been developing in C#? Is it a full time job kind of thing, or for fun, or school? I've been doing it for about 5 years now and I'm just so much better at it than anything else. Its hard to go back to square one.
 

eastcoastsurfer

macrumors 6502a
Feb 15, 2007
600
27
Interesting. How long have you been developing in C#? Is it a full time job kind of thing, or for fun, or school? I've been doing it for about 5 years now and I'm just so much better at it than anything else. Its hard to go back to square one.

Thing is, we as developers are always going back to square one. MS pushed VB for a long time, then C++, and now .net. Or if you want to look at it another way there were stand alone programs, then client-server, then web based and now AJAX.

To the original poster. You should give obj-c a shot and try it out. The more you learn about new languages, the better you'll be at the languages you already know. In the end a language is just a tool to solve a problem. Use the best tool for the job.
 

ChrisA

macrumors G5
Jan 5, 2006
12,914
2,163
Redondo Beach, California
What you should care about as a developer is not the GUI wrapper Apple put around some development tools. But the larger environment and the set of APIs you need to use. If you look at this Mac OS X is far and away the best development platform, by far.

But it all depends of what you are writing. Does you code need to run on multiple platforms (UNIX, Mac, Windows) id so you will have to use on the "lowest common denominator" features and you loose or can't use the Mac's advantage. I have to admit, this describes what I do. My stuff needs to run on Linux and Solaris too. In this mode the Mac is as good as any Linux system. On the other hand just TRY and write cross platform code on a Windows PC using Microsoft tools. I doubt it can even by done.

But if you do want to write Mac-only applications Apple makes it nice for you

Lastly you asked about if the hardware performs well? That is Apple's weal point. They only offer a limited range of hardware. What they got is what they got. If it doesnot do the job then you have to look at something else. But it is hard to argue the Mac Pro is not fast.
 

Animalk

macrumors 6502
May 27, 2007
471
19
Montreal Canada
[...]
Yup. I am not 100% familiar with the Java -> OGL support, so I am not sure how far you will get with OGL and Java. OpenGL on the Mac is exactly the same as OpenGL elsewhere, same APIs, etc... if you want a simpler environment, you can use GLUT and C++ as your framework.
[...]

Be careful ... OpenGL does not do any image loading from files and neither does GLUT or any other library I have come across for OpenGL. This is totally environment dependent. So if you want to load images for use as textures, you must first load them up through whatever language you're opengl program is "wrapped" in and then bind them to textures.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.