Language options for GUI applications on OS X - macos

If I want to write applications that use the Mac OSX UI, is Objective-C the only choice that I have to take advantage of all the frameworks that Apple provides?
Can I use Java, which is installed with Mac OS X?

I think Objective-C will provide the best coverage, yes, but if you want to consider portability and the possibility of getting your applications running under Windows and/or Linux, then choose Qt and C++.

The frameworks for native UI applications on Mac OS X (collectively known as Cocoa) are written in Objective-C so Objective-C is probably the best choice for writing your own applications, although there are bindings for Python and Ruby.
There are other toolkits that can be used (Mac OS X is a *nix system after all) but unless you are writing cross-platform apps, most people will advise you to use Objective-C and Cocoa.

MacRuby, an implementation of Ruby 1.9 on top of Mac OS X Objective-C runtime and Foundation framework, is another way to go.
You still need a deep knowledge of Cocoa and a good understanding of Objective-C.
It will be provided with Mac OS X 10.7 Lion as a private framework. It already integrates very well in XCode 4 workflow, with templates for all type of application (including windowed, it goes without saying).
(MacRuby makes RubyCocoa, the Cocoa binding for Ruby, obsolete.)

The JVM for Java under Mac OS X is no longer provided by Apple, but by Oracle (see here).
I guess Objective-C is the best choice for native OS X Applications. But if you want your Applications to run under other OSs (like Windows or Linux), you'll most likely use C++ and some GUI-Toolkit which supports all of them.

If you come from the Perl world, here is Sherm's CamelBones too.

Related

Easy GUI programming in Mac OS X. Targeting Windows Platform

I have a friend who has an entry-level background in programming and is looking for a free GUI framework (IDE, GUI toolkit and GUI designer ) that:
He can use on Mac OS X to build Windows applications
It's very easy to use.
He is not interested in becoming a programmer, but would like to build an application for his work (not CS-related).
What are some good GUI frameworks/prog. languages he can use?
Qt including Qt Creater and Qt Designer is worth a try.
Especially, if your app should finally run cross-platform, on phones or on other embedded devices. Qt natively supports C++, but can also be used with 3rd-party extensions with Python (PyQt) and probably other languages.
On a Mac I have to recommend making Cocoa applications in Xcode written in Objective-C. Xcode is free to download and use, you pay if you want to submit applications to the Mac App Store.
I personally use Xcode every day and I think it's a great IDE. Currently has compiler support for Obj-C, C++, C and maybe more (not sure). More importantly for your needs, Xcode does a great job of integrating your code with its build in "interface builder" to help you quickly and easily create a nice UI.
NOTE: Xcode includes a new compiler feature (ARC) Automatic Reference Counting which is create for a new user. You can learn the language without having to worry about manual memory management.
Your friend should consider using PySide, a Python binding for the Qt GUI framework already mentioned.
With PySide you can use the Qt tools to create GUI elements interactively
and code your application logic in Python, which is a language often appreciated by non-programmers (and programmers too!) for its simplicity and intuitiveness.
Xcode includes a WYSIWYG editor for native controls and views. This was formerly a separate program called Interface Builder, but the editor was moved into the Xcode IDE at version 4.
AppKit is the framework it uses in most cases -- that's Objective-C. It's well supported. Your friend can also use it for source code editing and building and debugging apps. If he wants to write UIs programmatically, Xcode and AppKit are also good options.

How do I code applications on a Mac so that they use the native UI elements?

I'm starting to program. Already did some things with Java: a calculator, one document management system powered with a database and some other home projects. But I don't like the visual look. I love however how mi Mac's Apps look. And I want to create Apps for mac. Already buy one but when I open netbeans to program it looks like the Apps doesn't feel like mac.
Is there any specific java code to make the controls looks like how the other mac apps look? My dad mention something about Object C but I don't understand. Can someone please explain me.
AFAIK You'll never get the look and feel of Aqua (Mac's UI Kit) by using Java. Why? Because to make Java platform independent some things needs to get ripped off. And native controls are one of them.
I think you're taking about Objective C which is the native development language for building Mac Apps. I'll recommend you the book "Learn Objective-C on the Mac" is pretty useful.
P.S. I'll encourage you to start with iOS (iPhone and iPad apps). Why? Well, I think is easier to begin with. Things like fixed resolution and so on make your development efforts small while beginning with. (Just my 2 cents)
If you want to code in Objective-C, you'll first need to trek over to the App Store and download Xcode. This will install C/C++/Objective-C compilers on your Mac and then you can start getting your hands dirty.
Depending on what you are trying to accomplish, you can just google/read/learn and build your own frameworks from the ground up or look at something like Cocoa to get started as well.
http://developer.apple.com/technologies/mac/cocoa.html
Cocoa Frameworks
The Cocoa frameworks consist of libraries, APIs, and runtimes that form the development layer for all of Mac OS X. By developing with Cocoa, you will be creating applications the same way Mac OS X itself is created. Your application will automatically inherit the great behaviors and appearances of Mac OS X, with full access to the underlying power of the UNIX operating system. Using Cocoa with the Xcode IDE is simply the best way to create native Mac applications.
Good luck!
Apple has deprecated a lot of the Java support in OS X. It's possible to have a Java application integrated, but there are some annoying bits missing. See one of my questions demonstrating some issues with Java applications in the Dock. You would be better off using Objective-C instead, since Apple has lots of documentation and tutorials available.
You're thinking of Objective C. You can also do applications for Mac using C/C++ but as of late the "popular" language for Mac development is Objective-C. There are tons of tutorials and plenty of documentation to walk you through writing apps for both Mac and iOS.

Mac OS X Development

I would love to begin developing applications for the MAC OS X, although I have to idea where to start.
Problem: I currently do not, and cannot afford a new MAC OS X-based computer.
Solution: A very good friend loves trying out things that I've made for Windows, and also owns a MAC OS X computer, and is willing to test these new creations.
Now I am faced with another problem. I don't know which language to use to develop these apps in. I am a .NET Developer and seeing as though I can only use a Windows based PC to develop MAC apps, where should I start?
I've heard of Mono, and have used it on Linux before, would Mono be an option for MAC development on a Windows based computer, too? Are there any other ways around this?
Any help is appreciated. :)
Thank you
jt
You could start with a cross platform language like Java, Python or Ruby. The applications you write this way either work immediately on OSX or need only little adjustments. I work with Java to develop for OSX, windows and linux. Java is not too different from C# and comes completely free. With some extra work Java applications can look like native OSX or windows or linux.
But this way you don't get any of the special features of OSX. For these you do need the OSX environment objective-c and cocoa.
If you don't want your applications to be total shite that makes me cry, then buy a Mac and start reading and learning about what makes a high quality Mac OS X application. The standards for quality are much higher on this side of the river, you'll soon see.
You need to have MacOS X and use Xcode with Objective C; this is the native environment, and you won't be able to appreciate MacOS X UX without using it. You may be able to install MacOS X on a PC, although this isn't approved or supported by Apple.
Just don't take half measures, it isn't worth it.
Sorry for this late answer, but I am having the same problem.
After looking around, I have seen people be able to install OS X 10.6 (Snow Leopard) on their Windows 7 computers using a virtual machine. Maybe this website from lifehacker may help:
http://lifehacker.com/5583650/run-mac-os-x-in-virtualbox-on-windows
These people tell you how to install Snow Leopard. You may not install Xcode 4.33 on Snow Leopard, but it's worth a try. There also may be places where they show you how to install Lion itself onto their PC's, but Lifehacker has the most straightforward tutorials.
Hope this helps!
All the other answers are good. You need OS X and XCode. Since,at the moment you can't afford a Mac machine and seeing how the language of choice for both OS X and iOS is objective-c, you could start with learning C programming on windows. Objective-C is a superset of C. Knowing C Langauge will speed up your learning curve once you can afford to buy Mac. (or you might decide that C pointers are just too hard and save some money)
Also google how to create a hackintosh. I've seen couple articles on lifehacker on how to do it. It's not ideal but perhaps it would allow you to run XCode and create apps for iPhone or iPad.

Which Languages I Can Use To Develop On a Mac OS 7 Machine?

I'm emulating a Macintosh IIci running Mac OS 7.5.5 on it, but now I want to know, In which languages I can develop on it and where to get they?
C/C++ seems like a safe bet...
You can use the Macintosh Programmer's Workshop
Macintosh Programmer's Workshop (MPW) is a product designed specifically for professional Macintosh software developers. It brings together a comprehensive collection of development tools designed to support C, C++, and assembly-language programmers who are writing software for Mac OS 7.x/8.x/9.x. MPW is an open, configurable, and scriptable development environment which provides the flexibility to support complex software development projects for 68K and Power Macintosh systems.
Pascal is another option.
Apple had an excelent Pascal compiler for the earliests versions of Mac OS (actually, most of the API was available through Pascal calls)
Real Basic should also work on OS7 (Mac OS 7.6.1)
http://www.giantmike.com/reviews/realbasic.html
and actually Perl as well: http://www.perl.com/download.csp#mac
"For Macintosh Classic users, there
are two ways to get Perl. MacPerl is
the classic Perl port to Mac OS
Systems 7 through 9."
HyperCard and AppleScript are the two first that came to mind.
There's also the Macintosh Programmer's Workshop and CodeWarrior IDEs for programs written in C/C++.
You'll also likely want a copy of ResEdit handy.

How hard is it to get a Cocoa application to run on Windows?

In the wikipedia article on Cocoa it says:
There are also open source implementations of major parts of the Cocoa framework that allows cross-platform (including Microsoft Windows) Cocoa application development, such as GNUstep, Cappuccino, and Cocotron.
Yet when I looked into whether Mac application Tweetie was available for windows the developer had ruled it out:
Windows doesn't have Cocoa, the programming environment that Tweetie is made in, as such, it seems like a poor possibility.
I'd like to have an answer to point the Tweetie developers (and as a resource for other cocoa developers) which would tell them:
Which implementation is the most suitable for getting a cocoa app running on windows?
How much work is it likely to take to get the app running under windows?
How easy/hard is it to maintain a common code base for Mac and Windows?
(any other considerations I've missed?)
Of course if it would be too much work I'd like to know that too before suggesting it and potentially sending someone else on a fruitless search.
Don't forget:
“Major parts of the Cocoa frameworks” is not the same as “the entirety of the Cocoa frameworks”. Tweetie could be using something that's missing.
Tweetie could be (very probably is) using APIs from the non-Cocoa frameworks, such as Core Foundation, Core Services, Core Graphics, and Core Animation. A port of the Cocoa frameworks alone won't include any of these APIs, and even a more complete Mac-API-emulation framework will not include all of them.
These frameworks are eternally chasing Apple. Even if they catch up, they'll be instantly behind again as of the next Mac OS X release. Mac developers already put off using new APIs in new Mac OS X releases while they wait for users to upgrade to those new releases; now you're asking atebits to also wait for the other-framework developer to catch up to Apple again.
Any second implementation of an existing API will have bugs that the first implementation doesn't, and vice versa. These differences will cause development and support problems.
You're asking atebits to add a third platform to an application that already exists on two. Supporting one platform is a lot of work. Supporting two platforms is a hell of a lot of work. Supporting three? Now you're getting into big-company territory.
So, even with these Cocoa-like frameworks, the answer is: Hard.
Among GNUstep, Cappuccino and Cocotron, Cocotron is only possible choice to port a Mac application to windows.
Cappuccino is for web and GNUstep only runs on top of cygwin or mingw, which means the GUI looks nothing like native windows apps.
It is theoretically possible to build cocoa windows apps using Cocotron. However, the reality is that it is still very hard to use, and it is still quite limited in the Cocoa API.
Therefore, two possible solutions:
Try hard to remove the codes that are not supported by Cocotron in the original code base and do the cross compilation. Maintaining common code base will be painful.
Start a new GUI at all, no common code base. two choices here
Start a cross platform project with cross application framework such as Qt, or Java.
Start a windows only project. There are a lot of choices here, .Net WinForm application, MFC, etc.
There are Windows compilers for Objective-C (the programming language used to write cocoa apps). However, Cocoa includes the frameworks for presenting the GUI. These visual frameworks are specific to Mac OS X because they use OS X only windows and other controls. So someone would need to re-implement the controls in Cocoa to use Windows controls.
Also, I am fairly certain that Tweetie uses Mac OS X only technologies like Core Animation. This does not exist on Windows, so the nice animation effects present in the apps would have to be implemented in a completely different way.

Resources