views:

359

answers:

5

Hi,

I'm a Windows (native, not .NET) programmer and I'd like to port an application to the Mac.

Actually, I believe it will be more of a rewrite, as the original depends on many activex controls.

As I have never used a Mac in my entire life, I'll need some guidance. O:-)

a) What book(s) would you recommend to make the move from Win32 to Mac OS?
b) Is there anything similar to Delphi (RAD) for the Mac?
c) Can anyone recommend (or not) Lispworks (www.lispworks.com)?
d) Is there anything similar to the Windows market of 3rd party COM components (so I don't have to write everything)?
e) Anything else I should be aware of the Mac market?
f) Oh, BTW, what Mac should I buy? O:-) (must be a laptop)

Thanks in advance

+1  A: 

If you've done your native Windows programming in C and/or C++, you may have an easier time migrating your application to C#/.Net, and then running it in Mac using Mono. At least some of the available third-party .Net components will run on Mono (see http://www.mono-project.com/Third_Party_Controls_Status).

I have no idea what Mac you should buy - I recommend getting one of the pretty ones.

MusiGenesis
they're all pretty
Rob Allen
Not always: http://lowendmac.com/misc/08mr/good-ugly-apple-design.html
MusiGenesis
+1  A: 

e) Its a small market.

f) An iMac. Edit: since it says laptop - Macbook Pro 13 is a great deal.

Daniel A. White
Last time I looked an iMac wasn't a laptop.
Joey
@Johannes: go easy on him - the weather is terrible in Kent.
MusiGenesis
@MusiGenesis - are you from the area?
Daniel A. White
@Daniel: for another day or two. I'm visiting my parents, who live in Kent. Small world, huh?
MusiGenesis
@MusiGenesis indeed - did u go to KSU?
Daniel A. White
@Daniel: yes, but not for Computer Science (Art, Graphic Design, Math, Physics and Physical Anthropology), and not in the last 18 years. :)
MusiGenesis
+1  A: 

a) ...

b) You could use Python coupled with wxPython and be cross platform. Python is included by default with Mac OS X.

c) ...

d) I'm sure there is, but I can't tell you more. If you use Python, you get tons of third party libraries for free.

e) They don't take kindly alien GUI guidelines:

Word 6.0, launched in 1993, is widely considered to be the worst version of Word ever for the Mac, as it was based on the same codebase as Word 6.0 for Windows. That meant that it looked and worked more like Windows software than a Macintosh program. Mac users were so up in arms that Microsoft actually released a Word 5.1 downgrade to unhappy Word 6.0 owners.

f) Mostly any iMac will be good enough for programming. Choose the one that you like the most and has lots of RAM.

voyager
+1  A: 

If you are familiar with C, you may want to learn Objective C since that is the Macs "native" programming language. It's also what you have to use to write iPhone applications. Cocoa is Apple's primary API that will have a lot of the tools you are looking for.

a) Read this thread for book recommendations: http://stackoverflow.com/questions/7571/cocoa-and-objective-c-resources

b) Apple makes Xcode for developing in. There are certainly better ones out there, but it's not bad.

d) Cocoa is Apple's main API, which provides "core" services like CFNetwork for networking. There is also core data, core audio, core animation, core image, core location,... Underneath it all, OSX is Unix, so you have access to many unix/linux libs.

e) The iPhone is a big part of the Mac market. The iPhone and OSX development environments are not that different, so you can learn both.

f) Any Mac is sufficient for most development. If you want a laptop, it's really a question of screen size and price. But I would recommend at least a 15 inch screen. You don't need to spend extra for a faster CPU, but you may want to get a larger hard drive.

Brent Baisley
+6  A: 

I've taught Cocoa programming to several Windows-experienced programmers. You may find a previous post on the subject useful.

Cocoa is a very different way of thinking then MFC and its kin. You will do much, much better if you take the time to learn how Cocoa approaches things and adapt to its mindset rather than trying to find the quickest way to implement your current way of thinking in ObjC. It is possible to write MFC-style code for Mac, but you will always be fighting the framework if you do. I've seen a lot of Windows developers struggle with this.

The best book to learn Cocoa is Cocoa Programming for Mac OS X. Assuming you are a C++ developer with a solid OOP background, this is the book to start with. If you have limited Object Oriented background, then start with Programming Objective-C 2.0.

You would be amazed how fast Objective-C can be to code once you understand the patterns. It really can be stunning compared to C++ in my experience. There are more RAD-like systems like REALbasic, and you can develop Cocoa apps in Ruby now which can be a bit quicker. But there really is no substitute in the Mac market for ObjC. It's hard to make an app that works like a Mac app without using the Mac frameworks, and Mac users tend to be much fussier about such things than Windows users.

I have no background in LispWorks, but LISP seems a terrible language for developing the kind of rich UIs that Mac apps are known for. I like LISP (quite a lot actually), but Functional Programming's "no side effects" philosophy seems at odds with most rich UI goals (especially as the Mac UI becomes more and more animation-centric). If anything, Mac programming is moving towards Declarative rather than Functional programming (Core Animation and Grand Central Dispatch have a lot of Declarative concepts creeping in).

There is not as large a third-party component market as there is for Windows. Some of this is because Cocoa already provides such a rich set of components, which MFC does not, and because well-behaved Mac apps are expected to use those components so that you work like all other Mac apps. There is definitely little market for commercial components in the vein of RadControls for .NET (very nice toolkit, that one). But there are quite a few nice free components out there with flexible licenses (generally MIT-based). A few of my favorites:

As I mentioned before, Mac users are picky about their UI. Much, much more so than Windows users. They expect things to be polished, and they expect things to integrate with all the little things that make Macs nice. That means drag-and-drop, Spotlight, services, Applescript, Expose, QuickLook, integrated spelling check, etc. etc. It's very hard to do all these things right if you don't use the built-in frameworks. That's why I recommend new Mac developers start at the beginning and learn the frameworks.

For a Mac, if you have a bunch of hardware lying around (like keyboards and monitors), then a Mac Mini is a nice cheap box. iMacs are great if you want an all-in-one, and any MacBook is appropriate if you like portability. There is no Mac on the market today that is not a perfectly fine development box. Obviously if you do a lot of work, an 8-core Mac Pro makes compiling much faster, but I've done a lot of professional development on a 13" MacBook. If you want to get in as cheaply as possible, look for refurbished or used (I love my refurbished Mac Mini). Any Intel-based Mac is going to be fine for development, at least while you're getting started.

Rob Napier
Is there any good rtf editor component (such as http://www.textcontrol.com) for the Mac?
Fernando
The built-in NSTextView is a full RTF editor (with attachments, spell-check many other features). TextEdit.app is nothing but a thin wrapper around NSTextView. See "Building a Text Editor in 15 Minutes" http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/TextArchitecture/Tasks/TextEditor.html
Rob Napier
Thanks, I'll check it out!
Fernando