Scripting Browsers with Glamour

Scripting Browsers with Glamour

Scripting Browsers with Glamour Masterarbeit der Philosophisch-naturwissenschaftlichen Fakultät der Universität Bern vorgelegt von Philipp Bunge April 2009 Leiter der Arbeit Prof. Dr. Oscar Nierstrasz Dr. Tudor Gîrba Lukas Renggli Institut für Informatik und angewandte Mathematik glam·our /'glæmər/ noun the attractive and exciting quality that makes a person, a job or a place seem special, often beacause of wealth or status. [Hornby, 2000] Copyright © 2009 by Philipp Bunge is thesis is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License. See http://creativecommons.org/licenses/by-sa/3.0/ for more informa- tion. Figures 4.1(a), 4.2(a) and 4.3(a) are screenshots of products copyrighted by Microsoft, Apple and omas Leonard et al. respectively. e rst two were created by myself, the latter was retrieved under free license from: http://en.wikipedia.org/wiki/File: ROX-Filer.png Abstract Browsers are a crucial instrument to understand complex systems or models. Each problem domain is accompanied by an abundance of browsers that are created to help analyze and interpret the underlying elements. e issue with these browsers is that they are frequently rewritten from scratch, making them expensive to create and burdensome to maintain. While many frameworks exist to ease the development of user interfaces in general, they provide only limited support to simplifying the creation of browsers. In this thesis we present a dedicated model to describe browsers that equally emphasizes the control of navigation ow within the browser. Our approach is designed to support arbitrary domain models allowing researchers to quickly dene new browsers for their data. To validate our model we have implemented the framework Glamour which additionally offers a declarative language to simplify the denition of browsers. We have used Glamour to re-implement several existing browsers and to explore the creation of new browsers. v vi Acknowledgements First and foremost I thank Tudor Gîrba without whom this thesis would not have been possible. His unalterable condence, resolute support, and seemingly persistent aspiration have managed what they tried to achieve—that I am proud of the work I present in this thesis. Doru, you did much more than “just your job.” In equal measure, I wish to thank Lukas Renggli for his pervading support, both technical and general. Your door was always open to me when I had a question and I have learned a great amount from you. My sincerest gratitude goes to Prof. Oscar Nierstrasz. I must thank him not only—like many have done before me—for permitting me to write my thesis at the Software Com- position Group, but much more for the dedication and care he committed to me and my work, to the lectures he holds and to all of his students in general. It is this disposition that nurtured my motivation and interest for the eld of computer science from the rst lecture I had with him. My appreciation extends to the entire SCG (regardlessly of whether you supported me or encouraged me by questioning my work) and to my professors, tutors and colleagues from whom I have learned so much in the past years. I am deeply indebted to my friends. You know who you are and I would do you no justice by attempting to enumerate all of you. Without you I would not have studied, would not have nished, and—most importantly—would not have had such an incredibly enjoyable time doing either. To my parents, my sister, Rahel and my entire family, both here and abroad—I have no words that could express my appreciation for the love and unconditional support you have given me. Not only in my studies, but as long as I have known you. ank you. vii viii Contents 1. Introduction 1 1.1. A Historical Introduction to Browsers ................... 1 1.2. Challenges .................................. 4 1.3. Our Approach ................................ 5 1.4. Contributions ................................ 6 2. Tutorial on Glamour 7 2.1. Running example .............................. 7 2.2. Starting the Browser ............................ 8 2.3. Using Transmissions ............................ 8 2.4. Another Presentation ............................ 10 2.5. Multiple Origins .............................. 12 2.6. Ports ..................................... 13 2.7. Reusing Browsers .............................. 14 2.8. Actions ................................... 16 2.9. Multiple Presentations ........................... 17 2.10. Other Browsers ............................... 18 2.11. Tutorial Conclusion ............................. 19 3. Inside Glamour 21 3.1. Browsers, Panes and Transmissions ..................... 23 3.2. Presentations ................................ 25 3.3. Actions ................................... 26 3.4. Composition ................................ 26 3.5. Browser Implementations .......................... 28 3.6. Rendering .................................. 28 3.7. Smalltalk Implementation ......................... 29 3.8. Model Implementations .......................... 32 4. Constructing Common Browsers 33 4.1. Filesystem Navigation ............................ 33 4.2. Source Code Navigation .......................... 38 4.3. Software Dependency-Analysis ....................... 42 5. Related Work 47 5.1. Exposing Domain Objects ......................... 47 ix Contents 5.2. Software Composition ........................... 53 6. Conclusions 55 6.1. Our Goals Revisited ............................ 55 6.2. Flow based Browsers vs. Side-Effect based Browsers ........... 56 6.3. Declarative Scripting Language ....................... 57 6.4. Browser Notation .............................. 57 6.5. Future Work ................................. 58 6.6. Concluding Remarks ............................ 59 A. Installation 61 A.1. Glamour for VisualWorks Smalltalk .................... 61 A.2. Glamour for Pharo ............................. 62 B. Browser Notation 65 List of Figures 69 Bibliography 71 x Chapter 1 Introduction Browsers are important tools to understanding complex systems or models. Browsers allow us to interact with a system, to inspect its elements and to learn its structure. What distin- guishes browsers from other user interfaces is the structure of the underlying data and how it is mapped to the visual representation shown to the user. e models behind browsers can be seen as graphs. e nodes represent the entities that are apparent in the browser and the edges the relationships between these. In the case of a lesystem manager for example, the les and folders are the nodes of the browser and their hierarchical relationship—which can be queried using a set of messages on the objects—gives us the edges. What is interesting is that there is a variety of methods that can be used to represent a model in a user interface. Some browsers may decide to show a tree like structure, where nodes can be expanded and collapsed. Other browsers may show just one folder at a time, allowing the user to descend into subfolders and return to parent folders. Yet other browsers may use other methods to allow the user to interact with the objects. We dene methods by the navigation ow that they impose in a browser. Which navigation ow is most appropriate for a browser is specic to the application—certain browsers may favor specic types of interaction and different use-cases for the same model may require distinct navigational ows. 1.1. A Historical Introduction to Browsers When object-oriented systems were rst conceived, objects were thought of as self-contained processes, encapsulating all their required state as well as their behavior in single entity [Dahl and Nygaard, 1966]. In Smalltalk-76, this concept not only applied to the behavior of objects in solitude and their interaction in a larger system, but also in their responsibility to represent themselves to the user. In 1978, Daniel H. H. Ingalls described this as “the reactive principal,” stating that 1 Chapter 1. Introduction the salient feature of Smalltalk is that all objects are active, ready to perform in full capacity at any time. Nothing of this aliveness should be lost at the interface to the human user of the system. In other words, all components of the system must be able to present themselves to the user in an effective way, and must moreover present a set of simple tools for their meaningful alteration. [Ingalls, 1978] is concept related to the apparent disposition of “objects” in nature. An animal, plant or inert item simply represents itself, visually or otherwise, and does not require the interpre- tation of its inner processes by an outer entity to do so. is restriction however, proved too limiting for visually presenting the same objects within different scenarios or contexts. While working as a visiting scientist at the Xerox Palo Alto Research Center between 1978 and 1979, Trygve Reenskaug wished to use Smalltalk-76 as the basis for a system for production control in shipbuilding [Reenskaug, 1996a]. He needed to represent the production schedule in multiple ways—depending on its intended usage—and found the generic representation of the objects to be insufficient. As a result, he tore each of the original objects apart, separating the original into three objects: an object responsible for the information, one for presenting the information, and one for capturing input from the user viewing the information in order to manipulate it accordingly. is work would later be integrated into Smalltalk-80 [Goldberg and Robson, 1989] and become widely known as the Model-View-Controller (MVC)

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    86 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us