The Artima Developer Community
Sponsored Link

Agile Buzz Forum
Partial Classes and Browsing

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
James Robertson

Posts: 29924
Nickname: jarober61
Registered: Jun, 2003

David Buck, Smalltalker at large
Partial Classes and Browsing Posted: Dec 7, 2005 7:11 AM
Reply to this message Reply

This post originated from an RSS feed registered with Agile Buzz by James Robertson.
Original Post: Partial Classes and Browsing
Feed Title: Cincom Smalltalk Blog - Smalltalk with Rants
Feed URL: http://www.cincomsmalltalk.com/rssBlog/rssBlogView.xml
Feed Description: James Robertson comments on Cincom Smalltalk, the Smalltalk development community, and IT trends and issues in general.
Latest Agile Buzz Posts
Latest Agile Buzz Posts by James Robertson
Latest Posts From Cincom Smalltalk Blog - Smalltalk with Rants

Advertisement

One of the things that came up in this thread was how method categories and partial class definitions make browsing code simpler in Smalltalk. Here's an example of why. In BottomFeeder, I have a package called RSSViewer (it holds most of the UI code for the application). Here's a screen shot of the upper four panes of the browser (the lower code pane is omitted), with one of the extension methods that have been added to selected:

Class Extension View

What we are looking at is the top set of panes - starting from the left, we have:

  • Package that contains the code in question - packages are a version control concept in VisualWorks
  • Class View - a listing of the classes that are in the selected package
  • Method Categories - often called protocols, these are names we use to group methods that are related in some way
  • Method Pane - this is where we select a single method, so we can see its code

Notice how most of the protocols are italicized? If I were to select one, I wouldn't see any methods. What that's showing me is that there's more code for this class, but not in the selected package. I can narrow my view down to just the methods that are part of this package. However, I don't need to do that - I can see everything, if I want to. Here's another shot, of the same browser, but in hierarchy view:

All packages selected view

Notice what's changed - the leftmost pane now shows the hierarchy for the selected class, and the second pane now shows all the packages that define code for that class. By selecting all those packages, I can see all the code for the class - or I can select only a subset of the packages, and see only that.

This is why commenters in the aforementioned thread say that Smalltalk's browsing tools and class extensions make larger numbers of methods palatable - we can add code directly to a class when we think it belongs there (instead of having to define a utility class), and then version off our changes independently of the rest of the system. We can then view our changes without having to see the whole class (or not - we can limit our view by package/class/protocol).

The Smalltalk tools give us a lot of ways to slice our view into the system.

Read: Partial Classes and Browsing

Topic: Look, a Monkey! Previous Topic   Next Topic Topic: Bad marketing, and technical illiteracy to boot

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use