What’s in a Smalltalk Browser anyway? Part 1


Now that I’ve started thinking about Browsers and possible Improvements in VA Smalltalk, there are several related topics I’ve already posted about and thought about over the last few months.

That’s all, folks. Looking at different Browsers in VA Smalltalk (and also in VisualWorks) , I come to the conclusion that most of them have three of these four tasks in common, while one of them differs between the Browsers. The one that’s different between the Browsers is the Navigation task. Whether you open a Classes Broser, a Class Browser or a Hierarchy Browser, the difference lies mainly in the fact that the Navigation component is different. Of course the Browsers have had their own life cycle over the years and may have some differences in their menus etc., but this is not a necessity, it’s just historical.

So most Browsers are completely exchangeable and equivalent in functionality – the only difference lies in the way we’ve found our way to the Class. The only difference lies in the navigation to the Class.

Let’s draw a little parallel to Web Browsers. They have a lot in common with Smalltalk Browsers:

Part of my reasoning is related to the question if there is a way to make Smalltalk development better understandable/accessible for developers whow are new to Smalltalk. One of their bigger problems is the fact that you tend to open a few dozen windows in a very short  period of time and things can get quite messy on your screen. So sometimes I think that maybe it would be good if we could adopt some of the ideas in eclipse’s GUI concept in Smalltalk IDEs. This brings us to some interesting questions:

  • What do Java programming and Smalltalk programming have in common, or where are the differences between the two?
  • Could a Smalltalk IDE work similar to Eclipse and still provide the same productivity?
  • What are the  typical tasks to perform in a Smalltalk Browser?

The last question is probably most important to understand where I’m headed. So let’s look at what you can do in a typical Smalltalk code Browser:

  • Navigate to a Class: The main task of a Browser is to let you edit a Class’ source code. So the very first task is to find a Class. There are several ways to navigate to a Class:
    • By digging into the inheritance tree of the Smalltalk Class Library
    • By navigating through the Application or Package Structure
    • By performing a search in the Smalltalk image
      • Senders or implementers of a method
      • References to names/symbols
      • Inclusion of a certain String
      • Looking at a Category
      • Whatever I currently do not think of😉
    • Looking into connected Source code control systems like Envy, StORE,Monticello or whatever, most of the times this is a subset of the other options, but targeted not at the image but the connected repository. In VAST, these are the so called Shadow and Editions Browsers. I won’t go into too much detail about these ones in this post
  • Navigate within the Class: Once you’re done navigating to a Class you need to find the public or private class or instance method you want to read or edit. There are several ways of navigating within a class:
    • By selecting a Method Category (or several of them)
    • By navigating to the class or instance side
    • By filtering for public/private or all (if your Smalltalk even knows this difference)
  • Edit source code: When you’ve found your method, you can read or edit it. In addition to method source you probably want to edit the class’ definition or class comment or whatever additional things there may be that can be edited. In VA Smalltalk, there are two sepcial cases of editing code of a Class: the Composition Editor for visual programming and GUI design and the Public interface editor. The same applies for the GUI painters in other Smalltalk IDEs: they are just another view at the source code.
  • Navigate somewhere else: While reading or editing code (or comments, or the class definition), you may stumble upon a message send or reference to a Class or a name that you’d like to look at in more detail. As an example, you read a message send of #printOn:, and would like to look at the implementation method. You’re navigating somewhere else.

Ignoring the fact that there are surely a few more tasks to perform in a Browser like exporting code, loading other versions of artefacts from a repository or printing code and the like, the list above pretty much includes all you can do in a Browser:

  • Navigate to a Class
  • Navigate within a Class
  • Edit source code (or comments) of the Class
  • Navigate to somewhere else

That’s all, folks. Looking at different Browsers in VA Smalltalk (and also in VisualWorks) , I come to the conclusion that most of them have three of these four tasks in common, while one of them differs between the Browsers. The one that’s different between the Browsers is the Navigation task. Whether you open a Classes Broser, a Class Browser or a Hierarchy Browser, the difference lies mainly in the fact that the Navigation component is different. Of course the Browsers have had their own life cycle over the years and may have some differences in their menus etc., but this is not a necessity, it’s just historical.

7 thoughts on “What’s in a Smalltalk Browser anyway? Part 1

  1. Ok, if backwards-compatibility to the old age of programming is actually necessary, how about doing what my old shop did?

    Create a new browser with some bits and pieces of the old incorporated and some of the useful extension included.

    I actually created a simple browser myself for VS which was a kind of version history diff browser (kind of like what Eclipse provides for local history comparison, compare current to selected Envy edition).

    This was one of my learning projects at my former shop and it didnt take me very long to show something (less than a week).

    For one or two experienced Smalltalkers: I do not see where the huge investment would be? One man-month to get a brand-new browser with a proper and lean API? Two perhaps?

    Getting a type inference system to work in the background in order to get properly useful auto-completion (which would also have to be implemented first) plus proper code highlighting, yes, that takes some time (I worked on something like that a bit as well).

    But sorry, those things are not nice to have to attract new people, they are a necessity.

    If those things are not really there, then you simply do not get familiar with the Smalltalk working syle since you will quit before.

    So, let me rephrase: keep the old tools as they are, just dont invest anything in them. Build something new out of it.

  2. Claus,

    there’s two sides to the coin. One is changing the tools will make some people happy and upset some other.

    The other side is that you either will break third party tools by changing the base tools, or need to provide compatibility and thus introduce a lot of badly written and hard to maintain code.

    If you think of the MED RB Extensions as an example, Instantiations would have to provide a replacement for them. I think that would be a good thing, because some aspects of the extensions simply suck. But they suck less than using the RB…😉

    This way one todo item would add to the stack after the other and such a change would mean a really big chunk of work.

    I am convinced it is time to invest that time and money, because now that the IBM user base has come to Instantiations and the financials are promising, it’s time to make the tool attractive not only for existing users, but also for newcomers. Now that Seaside will be part of VAST, it is a platform to be considered for newcomers more than it has been before….

    But it is an investment, and not a small one I’m afraid.

    I don’t agree that the old tools are something you definitely need to get rid of. They can be improved. A lot. And if we want to improve them, it’s probably better to take a revolutionary step than to make baby steps. But I think if you are familiar with the Smalltalk working style, the Browsers are good at what they do.

  3. Joachim,

    I guess that would mean you could get rid of half the classes below Browser😀

    For Senders/Implementors, I would even try to use the same browser, only no navigation pane instead a kind of hit list.

    I guess the API should also include “show me all the classes I found, or show me especially those methods”.

    Anyways, whether I look at VS or VW or VA browsers, it is all the same: changing anything is tedious work. That should change.

    At my old shop, we had a completely new browser and mostly got rid of the old envy-browsers.

    If you have to basically get rid of the standard tools, it tells a few things about the IDe doesnt it?

  4. Christian,

    I am a bit unsure whether I agree with you or not.
    On one hand, turning all known method sends into hyperlinks in a source editing pane sounds great, but on the other hand, it’s not enough to turn them into a hyperlink, because you may want to browse for implementors, or senders, or both, and you also may want to limit your search (within the hierarchy, within apps controlled by me and so on). So you always have to use some context menu to influence the behaviour of this navigation.

  5. Claus,

    that’s exactly what I’m proposing: seperate the navigation from the class browsing.
    Thus the class browsing is identical for all class browsing tasks, no matter what navigation path a developer strolled on to the class.
    Now that my thoughts have been sketched down in parts 1 to 4, I begin to think about the navigation to somewhere else part of browsing and how to integrate it into the class browsers. I tend to think that the browsers should simply make the navigator open a new navigation perspective with some pre-set values that came from the class browser.
    Say you’ve chosen to browse all implementors of a method in your currently open class. This would add activate the navigator and invoke the “browse implementors of” view in it, with the method name preset. You could then check/uncheck options like “in controlling application” or “local to the hierarchy” and so on. Of course you could also simply add the stuff to the navigator (for history reasons) and not activate the navigator but directly open a new browser with the search results instead….

    But yes, I guess we agree: a Class Browser is always a Class Browser, no matter if it’s a Hierarchy Browser or an Applications Browser or whatever Browser.

  6. Why have serveral browsers anyways?

    If the browsers manly differ in the navigation, have one browser base with a different navigation pane docked to the navigation-adaptor?

    In theory, the API has to consist of only “I want to see this class I selected, show me what I want to see depending on my other settings”.

    Senders/Implementors/Version History browsers are a bit different.

    But whether you see a package, or a single class, or an application, or a class (part)-hierarchy, doesnt really matter, does it?

  7. I share your observation that Smalltalk browsers should be more like browser tabs. I’d love to have a hierarchy browser with an URL bar, back/forward buttons and “browser senders/implementors” behaving as if I clicked on a link – ie. opening the new content in the same window. That would help with browsing implementor chains a lot.

Comments are closed.