PDA

View Full Version : xcode, worth developing on?




mysockshurt
Nov 15, 2007, 05:40 PM
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
Nov 15, 2007, 06:12 PM
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
Nov 15, 2007, 06:14 PM
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
Nov 15, 2007, 06:31 PM
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
Nov 15, 2007, 06:35 PM
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
Nov 15, 2007, 07:18 PM
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
Nov 15, 2007, 07:46 PM
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
Nov 15, 2007, 08:02 PM
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
Nov 15, 2007, 08:25 PM
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 (http://developer.apple.com/documentation/GraphicsImaging/Conceptual/OpenGL-MacProgGuide/).

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
Nov 16, 2007, 03:08 AM
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
Nov 16, 2007, 03:13 AM
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
Nov 16, 2007, 04:14 AM
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
Nov 16, 2007, 02:20 PM
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
Nov 16, 2007, 04:35 PM
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
Nov 16, 2007, 07:43 PM
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
Nov 16, 2007, 08:30 PM
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
Nov 16, 2007, 08:55 PM
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.

Alloye
Nov 16, 2007, 09:04 PM
I'm a C# developer by day and use Visual Studio 2005 to code in.

Same here. I prefer Xcode/IB. About the only thing I really like about VS is its debugger.

elppa
Nov 16, 2007, 09:35 PM
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
Nov 16, 2007, 09:47 PM
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.

Monkaaay
Nov 16, 2007, 09:50 PM
Visual Studio .NET 2.0 has always looked like a big, clunky mess to me, which also happens to hang and pause fairly frequently.

I'm guessing you don't do this kind of work on an enterprise level on any regular basis, correct?

eastcoastsurfer
Nov 16, 2007, 10:26 PM
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.

kainjow
Nov 16, 2007, 11:11 PM
In the end a language is just a tool to solve a problem. Use the best tool for the job.

My opinion would say to use the best API for the job (?).

ChrisA
Nov 16, 2007, 11:29 PM
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
Nov 16, 2007, 11:46 PM
[...]
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.

mduser63
Nov 17, 2007, 12:46 AM
I'm guessing you don't do this kind of work on an enterprise level on any regular basis, correct?

I sure see this a lot on forums and it really bugs me. Some one posts a "I'm a professional such-and-such, therefore my opinion is more valuable." type post. Some replies and says, "Well, I'm a professional such-and-such too, but my opinion is different than yours." The the first person comes back and says "Well, you must just be a kid playing around because you couldn't possibly know what you're doing and think that." I'm not sure it's what you mean, but you come off as an arrogant know-it-all and nobody is going to be particularly receptive to your argument because of that. Argue based on the merits of your argument. Don't simply appeal to your (dubious) authority especially if you're going to discount someone else's without any real evidence to back your position up.

eastcoastsurfer
Nov 17, 2007, 08:39 AM
My opinion would say to use the best API for the job (?).

API is part of the equation, but I would argue the language still comes first. For example, I don't care what sort of APIs you can find to write highly multi-threaded, concurrent code in Java, C, or obj-c. If you need to write a lot of highly threaded, concurrent code, moving towards a functional language like Erlang would probably be a better choice. Erlang is a language that was designed from the ground up to support concurrency.

At the end of the day, you can solve any problem with any language. What you're trying to do it make it less of a headache by picking a language that fits your problem.

eastcoastsurfer
Nov 17, 2007, 08:41 AM
I sure see this a lot on forums and it really bugs me. Some one posts a "I'm a professional such-and-such, therefore my opinion is more valuable." type post. Some replies and says, "Well, I'm a professional such-and-such too, but my opinion is different than yours." The the first person comes back and says "Well, you must just be a kid playing around because you couldn't possibly be know what you're doing and think that." I'm not sure it's what you mean, but you come off as an arrogant know-it-all and nobody is going to be particularly receptive to your argument because of that. Argue based on the merits of your argument. Don't simply appeal to your (dubious) authority especially if you're going to discount someone else's without any real evidence to back your position up.


I agree. Someone shouldn't need to say they are a professional in their post. Their comments alone should show who they are what kinds of experience they have.

elppa
Nov 17, 2007, 09:14 AM
I agree. Someone shouldn't need to say they are a professional in their post. Their comments alone should show who they are what kinds of experience they have.

Thank you, I mduser63 and eastcoastsurfer, I also interrupted the reply as quite rude, especially as I'd said in my post I had only dabbled a bit in both environments.

Alloye
Nov 17, 2007, 01:43 PM
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.

I've been using C# since before it was publicly available. I was an SDE in Microsoft Office during .Net 1.0 development, so I had access to internal builds of the SDK and VS.Net.

My current "real job" is that of a lead developer for a small company who uses C# everywhere from production tools to web development.

As for Xcode Tools, I started learning the environment in my spare time a couple of years ago. I've done a number of personal projects in ObjC/Cocoa and am currently working on an idea that I hope to take commercial. All I need are more hours in the day. ;)