Meta-Driven Browsers



Alexandre Bergel, Stéphane Ducasse,
                              Text


Colin Putney, Roel Wuyts
...
Outline

 1. The OmniBrowser framework

 2. Graph and metagraph

 3. Interaction with the domain model

 4. The System bro...
The OmniBrowser Framework

     A sophisticated framework to define new browsers
 •


     It is structured around:
 •


  ...
Domain Model: Files



   OBNode subclass: #FileNode
     instanceVariableNames: 'path'
     ...

   FileNode>>name
     ^...
Domain Model: Directory
 FileNode subclass: #DirectoryNode

 DirectoryNode>>directories
   | dir |
   dir := FileDirectory...
Graph and Metagraph to define browsers


N         object node
                                                 /
         ...
Metagraph and browser definition

    Creation of a browser:
         OBBrowser subclass: #FileBrowser
    Root nodes:
    ...
Automatic layout with columns and a pane

     The GUI is built by the framework
 •
     It uses a layout similar to the S...
Interacting with the domain model with actors

    An actor defines a column menu:
         OBActor subclass: #FileActor

 ...
Important notions of OmniBrowser

     Core notions:
 •

       – Nodes: what my domain is made of?

       – Metagraph: h...
The new system browser...




Alexandre Bergel       11 / 16
... its Metagraph ...


                     Class
                                         AllMethod
                    ...
... and its implementation
         Omnibrowser core framework


                          Definition                  Node...
Limitations of OmniBrowser ...

     Hardcoded flow
 •

       – Navigation has to follow the left-to-right list constructi...
... and its strenghts

     Ease of use
 •
       – do not need to deal with graphical objects



     Explicit state tran...
Conclusion

     Framework to build easily new browser
 •


     Based on notion of nodes, metagraph, actors, definition an...
Upcoming SlideShare
Loading in …5
×

2006 Esug Omnibrowser

1,945 views

Published on

Smalltalk is not only an object-oriented programming language; it is also known for its extensive integrated development environment supporting interactive and dynamic programming. While the default tools are adequate for browsing the code and developing applications, it is often cumbersome to extend the environment to support new language constructs or to build additional tools supporting new ways of navigating and presenting source code. In this paper, we present the OmniBrowser, a browser framework that supports the definition of browsers based on an explicit metamodel. With OmniBrowser a domain model is described in a graph and the navigation in this graph is specified in its associated metagraph. We present how new browsers are built from predefined parts and how new tools are easily described. The browser framework is implemented in the Squeak Smalltalk environment. This paper shows several concrete instantiations of the framework: a remake of the ubiquitous Smalltalk System Browser, a coverage browser, the Duo Browser and the Dynamic Protocols browser.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,945
On SlideShare
0
From Embeds
0
Number of Embeds
109
Actions
Shares
0
Downloads
10
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

2006 Esug Omnibrowser

  1. 1. Meta-Driven Browsers Alexandre Bergel, Stéphane Ducasse, Text Colin Putney, Roel Wuyts ESUG 2006 Prague, Czech Republic
  2. 2. Outline 1. The OmniBrowser framework 2. Graph and metagraph 3. Interaction with the domain model 4. The System browser 5. Conclusion Alexandre Bergel 2 / 16
  3. 3. The OmniBrowser Framework A sophisticated framework to define new browsers • It is structured around: • – an explicit domain model – a metagraph (a state machine) that specify navigation with the domain model – a list of actors that define interactions Alexandre Bergel 3 / 16
  4. 4. Domain Model: Files OBNode subclass: #FileNode instanceVariableNames: 'path' ... FileNode>>name ^ (FileDirectory directoryEntryFor: path) name FileNode>>text ^ 'File named: ', self name Alexandre Bergel 4 / 16
  5. 5. Domain Model: Directory FileNode subclass: #DirectoryNode DirectoryNode>>directories | dir | dir := FileDirectory on: self path. ^ dir directoryNames collect: [:each | DirectoryNode on: (dir fullNameFor: each)] DirectoryNode>>files | dir | dir := FileDirectory on: self path. ^ dir fileNames collect: [:each | FileNode on: (dir fullNameFor: each)] DirectoryNode>>text ^ path Alexandre Bergel 5 / 16
  6. 6. Graph and Metagraph to define browsers N object node / metanode N #directories Directory root metanode N is an ancestor of /temp pic1.jpg #files transition File pic2.jpg pic3.jpg (a) Instantiated domain (b) Metagraph Alexandre Bergel 6 / 16
  7. 7. Metagraph and browser definition Creation of a browser: OBBrowser subclass: #FileBrowser Root nodes: FileBrowser>>defaultRootNode ^ DirectoryNode on: '/' FileBrowser>>defaultMetaNode |directory file | directory := OBMetaNode named: 'Directory'. file := OBMetaNode named: 'File'. directory childAt: #directories put: directory; childAt: #files put: file; addActor: FileActor new. ^ directory Alexandre Bergel 7 / 16
  8. 8. Automatic layout with columns and a pane The GUI is built by the framework • It uses a layout similar to the Smalltalk System browser • Alexandre Bergel 8 / 16
  9. 9. Interacting with the domain model with actors An actor defines a column menu: OBActor subclass: #FileActor FileActor>>actionsForNode: aNode ^ {OBAction label: 'remove' receiver: self selector: #remove: arguments: {aNode} keystroke: $x icon: MenuIcons smallCancelIcon. ...} Alexandre Bergel 9 / 16
  10. 10. Important notions of OmniBrowser Core notions: • – Nodes: what my domain is made of? – Metagraph: how do I navigate in my domain? – Actors: how do I interact with my domain? Filter: filtering domain nodes • Definition: accepting new definitions of nodes • Alexandre Bergel 10 / 16
  11. 11. The new system browser... Alexandre Bergel 11 / 16
  12. 12. ... its Metagraph ... Class AllMethod Category Class Environment Method Comment Method Category Metaclass Legend Meta-node Meta-node Filter Transition root Alexandre Bergel 12 / 16
  13. 13. ... and its implementation Omnibrowser core framework Definition Node Actor Browser System browser Class Method Organization Category Class Code Definition Definition Definition Actor Actor Browser Code Node System Browser ClassComment ClassAware Environment Node Node Node Method Method ClassCategory ClassNode CategoryNode Node Node MetaClassN AllMethod ode CategoryNode Alexandre Bergel 13 / 16
  14. 14. Limitations of OmniBrowser ... Hardcoded flow • – Navigation has to follow the left-to-right list construction – Would be difficult to implement Whiskers Currently selected item • – Difficulty to implement advanced browsing facilities like in VisualWorks Alexandre Bergel 14 / 16
  15. 15. ... and its strenghts Ease of use • – do not need to deal with graphical objects Explicit state transition • – graphical objects are automatically updated. Separation of domain and navigation • – better readability of the code Alexandre Bergel 15 / 16
  16. 16. Conclusion Framework to build easily new browser • Based on notion of nodes, metagraph, actors, definition and • filters Included per default in Squeak 3.9 • Already existing browsers: • – changes, implementors, senders, variables, version, ... – coverage browser – dual browser – Traits browser – Pier browser Alexandre Bergel 16 / 16

×