Y From:	CRDGW2::CRDGW2::MRGATE::"SMTP::PREP.AI.MIT.EDU::INFO-G++-REQUEST" 27-JUN-1989 21:29  To:	MRGATE::"ARISIA::EVERHART" Subj:	ET++ description (long)   R Received: by life.ai.mit.edu (4.0/AI-4.10) id AA04641; Tue, 27 Jun 89 18:36:14 EDT1 Return-Path: <ukc!kewill.uucp!bryan@uunet.uu.net> d Received: from uunet.uu.net by life.ai.mit.edu (4.0/AI-4.10) id AA04612; Tue, 27 Jun 89 18:34:09 EDT> Received: from ukc.UUCP by uunet.uu.net (5.61/1.14) with UUCP * 	id AA12049; Tue, 27 Jun 89 18:33:55 -0400G Received: from root.co.uk by kestrel.Ukc.AC.UK   with UUCP  id aa08775;            27 Jun 89 20:10 BST A Received: from edinburgh.kewill.uucp by kewill.uucp (3.2/SMI-3.2) ( 	id AA11072; Tue, 27 Jun 89 18:56:33 BST0 Received: by edinburgh.kewill.uucp (3.2/SMI-3.2)( 	id AA01924; Tue, 27 Jun 89 18:55:58 BST! Date: Tue, 27 Jun 89 18:55:58 BST / From: Bryan Boreham <kewill!bryan@uunet.uu.net> 6 Message-Id: <8906271755.AA01924@edinburgh.kewill.uucp> To: info-g++@prep.ai.mit.edu  Subject: ET++ description (long)    B OK, so my mailbox filled up with letters saying "Just what is ET++@ anyway?". So here's the description I wrote for my colleagues inD March, from reading the paper described below, before I had seen anyC source code. It stands up well in the light of my actual experience  with the system.   The papers on ET++ are:   , - Andre Weinand, Erich Gamma, Rudolf Marty, K   Design and Implementation of ET++, a Seamless Object-Oriented Application 
   Framework,  ?   Structured Programming, Vol. 10, No. 2, 1989 Springer Verlag.   J This issue will appear in June but a copy of this paper is included in the distribution from Zurich.   + - Erich Gamma, Andre Weinand, Rudolf Marty, C   Integration of a Programming Environment into ET++ - A Case Study   ( To be presented at ECOOP89 in Nottingham      6 ET++, a Seamless Object-Oriented Application Framework6 ======================================================  F ET++ is a set of classes for  C++ to  help implement applications likeF those found on the  Macintosh. It was written  on the Sun to run underF SunView, but the system-dependent bits are  very localised, and it hasB already been ported to the X11 and NeWS window systems on the Sun.  F For  starters, it implements  classes  for  basic building blocks likeF lists, arrays, sets,  etc., and graphical  objects  like  circles  andF rectangles.  It  uses the Smalltalk  concept of a master  class calledF Object,  and  everything  inherits  from  this.    Many functions  areF implemented high up in  the inheritance tree,  and can be used by  all classes below.  F All objects inherit PrintOn and  ReadFrom methods that store instancesF of  objects in files,  including  all referenced  objects.  Cycles areF detected  in    the  reference   graph. Change  propagation    is alsoF implemented in  Object: for all objects declared  to be dependent uponF another object, all modifications   to the latter trigger  the  Update method in the dependent ones.   F Because C++ gives  no access at run-time to  informations such as  theF names  and types  of instance variables,  ET++ has  for   each class aF descriptor object, analogous to Smalltalk's metaclass. This is done byF requiring  that the programmer  writes  a short macro call beside eachF class  definition   and  implementation.   Once   this  information isF available, it can be used to do run-time type checking when using manyF different types of object  (e.g. in a  collection of shapes), and  forF the input/output  methods. It is also used  by  the   ET++ programming$ environment, which we shall come to.  F Every graphical  object that appears  on the  screen  is a subclass ofF VObject.  One  such subclass   is  a   CompositeVObject, consisting ofF several VObjects,  and in    this way  everything,   from  application, documents to dialogs and menus, is built up.  F The Application Framework Classes implement much of the donkey-work ofF interactive  applications,  and are    modelled  after  Apple's MacAppF system. The abstract  class  Document holds the  data  structure of anF application,  and   is responsible for  opening and  saving documents.F Things  like "Do you want  to  save changes before  quitting" are done$ automatically in the abstract class.  F The class View represents a drawing  surface,  and handles things likeF scrolling within a window, multiple windows open on the same document,F etc. A Document can be displayed in different  Views in different waysF -  a  spreadsheet and  a graph, for  example. Changes are buffered andE output to the screen when ET++ is idle, giving a flicker-free update.   F All user commands are implemented as subclasses  of the abstract class3 Command, which ET++ uses to manage undo operations.   F Dialogs are declared  to ET++ in  the source code as a  list of  theirF contents,  and the  system  places  them on the  screen in  a pleasing manner:   ;    This Source Code:                              Produces: ;    -----------------                              ---------   >    new Cluster(VCenter,                         --Direction---?      new BorderItem("Direction",               |              | ?        new OneOfCluster(cIdMode, Hleft,        | [x] Forward  | ?            "Forward", "Backward", 0)           | [ ] Backward | ?      )                                         |              | >    )                                            --------------  F Obviously, the automatic placement can be  overridden, but  anyone whoF has  set up a  complex dialog using  the Mac Resource Editor will knowF that this is a boon.  If you translate  the text to German, the  boxes expand and move to accommodate.   F A subclass of View, CollectionView, displays a collection  of VObjectsF in various ways, as a static list for menus, as  a scrollable list forF choosing filenames,  or  as  an array for   tool  pallettes. It  could+ equally well implement a super-spreadsheet.   F Various    types of TextView  go    far beyond   the  Mac's  TextEdit.F CodeTextView  is  for displaying and  editing  source code,   and doesF auto-indenting and   pretty-printing; RestrictedTextView only   allowsF input corresponding   to   a   particular    regular expression,   forF "numbers-only" fields,  etc. VObjectText allows  any VObject to appearF as part of the text, in the same way that Mac  Word allows graphics toF be pasted in. If you have been listening, it should be clear that thisF allows buttons to be part of the text, for hypertext, and even dialogs3 and scrollable windows can appear inside documents!   F So far, this system is pretty wonderful, or so I think. But what is itF for?  Well, the designers have implemented  a pretty nifty MacDraw forF the  Sun,   but, just like C,  ET++   is most useful for  implementing itself.   F The ET++ Programming Environment  implements a browser system for ET++F applications. By holding down the control, shift and  meta  keys whileF clicking, any object on the screen  is displayed, showing the instanceF variables and methods.  References to other  objects  can be followed,F and  the  source code for  the  methods changed.   ET++ has  a dynamicF linking system, so changes can be  compiled and integrated  whilst theF application is still running. The class hierarchy can be  displayed asA a tree on the screen, and all the superclasses investigated also.   F The current version of ET++ consists of 234 classes with 2343 methods,F in 43494   lines  of C++.  The SunOS and  SunWindows parts  come to 11 classes, 4719 lines.  ? It's in the public domain, and you can get a copy for $100 from    Institut fuer Informatik University of Zurich Winterthurerstr. 190 CH-8057 Zuerich  Switzerland   C Or anonymous ftp at sirius.nada.kth.se (130.237.222.29) in the file  pub/et++-1.0.tar.Z. Size 6.5Mb.   B Or from cayuga.cs.rochester.edu (192.5.53.209). ET++ is split into3 four pieces, in the files pub/et++-1.0.tar.Z[1234].   D Or, if you're in the UK, you can send me 40 pounds and I'll send you a Sun DC600 tape.   # Bryan Boreham			bryan@kewill.uucp   . Software Engineer	||	bryan%kewill@uunet.uu.net> Kewill Systems PLC	||  ... uunet!mcvax!ukc!root44!kewill!bryan Walton-On-Thames	:- Surrey, England		Telephone: (+44) 932 248 328N  B PS: I got Tom Vijlbrief's name wrong in my posting earlier. Sorry.