After working with Smalltalk and switching back to Objective-C, I’m really missing the Smalltalk browser. For those of you who don’t know, the Smalltalk browser is a class browser that you do coding in. You create methods, classes, and edit existing ones in the browser. You only look at one method at a time, and it’s awesome for reading code. The only stink is that the code is trapped in the Smalltalk image. When I went back to Objective-C, I was struck by how much time I wasted doing file manipulation: creating files, moving files, finding the file I want, adding the file to my Xcode project. Why can’t I have a browser that works like the Smalltalk browser but handles the file creation, manipulation for me? Then I can worry about the code, and it can organize it into files for me.

Now if only I had the time to write such a tool….


6 Responses to “How about a browser for Objective-C?”  

  1. 1 Nicholas Riley

    The old Project Builder (which was shipped as ProjectBuilderWO) looked much more like a Smalltalk browser in that it had files, classes, methods, etc. in a column view at the top. I miss it a lot, even though it didn’t go as far as a Smalltalk browser.

    There are also lots of other cool things you can do once you have a browser infrastructure, like the Whisker browser, which color-codes windows by class and automatically lays things out for you if you’ve got multiple methods you’re trying to look at. It’s really cool.

  2. 2 yatsu

    I recommend Cocoa Browser SN:
    http://numata.designed.jp/?cmd=read&page=Cocoa Browser SN&lang=en

    You cannot do coding in it but it is very useful to browse API documents.

  3. 3 Matt Ronge

    Riley: I thought I remembered a Smalltalk-ish browser in Project Builder. I mentioned it at MacWarriors this Saturday, but no one seemed to remember it. Good to know I’m not crazy.

  4. 4 Erik Buck

    Um, F-Script ? http://www.fscript.org/
    including “the most terrific object browser on earth!”

    http://www.fscript.org/documentation/ExploringCocoaWithFScript/index.htm

  5. 5 Matt Ronge

    Maybe I’m wrong, but it appears that you can’t write code in the F-script browser?

  6. 6 Tim Johnson

    In F-Script, you write code in the workspace. True that you can’t write code in the browser. You can activate methods, though. And you can’t create new classes programmatically within F-Script (well, you sort of can now, with the FSClass created by a fellow at the University of Wisconsin).

    I wholeheartedly agree with you that Cocoa could benefit from having a browser like Smalltalk’s. There is the Class Browser in XCode which gets somewhat close… (Project Menu->Class Browser or Cmd-Shift-C).

    And yes I miss the actual BROWSER browser from Project Builder in NeXTSTEP/OpenStep.

    See screenshot above #25 here:

    http://www.stepwise.com/Articles/Technical/HTMLEditor/HTMLEditor-1.html

    One problem with the whole idea is that Objective-C is not as dynamic as Smalltalk. It would be cool if you could recompile a class while your program is running and see the effects of your recompile. In Smalltalk this is simple. In Objective-C… well… there are NSBundles… and maybe some kind of hack could get it going.

    Also Smalltalk groups methods into categories, which Objective-C sort of supports, but few people use. (I probably have my terminology wrong here, between Categories and Protocols). In the above-mentioned screenshot you’ll see where @Document is listed… that’s a “category” sort of, allowing you to sort the methods in your class like in Smalltalk. It doesn’t see to be hardly used at all anymore in XCode…?

    Anyway if you would like to talk about this concept more please email me. It’s something that fascinates me… I really don’t think that XCode/ProjectBuilder/InterfaceBuilder are the be-all-to-end-all of Cocoa development. Heck, the simple addition of F-Script Anywhere into a program I’m writing makes my development time 500% faster, since it allows me to inspect running objects without having to do a heck of a lot of NSLogs or creating user interface elements…

Leave a Reply