home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / actor / tutorial / tutr5.txt < prev   
Text File  |  1990-10-18  |  18KB  |  332 lines

  1.  
  2.        Actor column for JOOP
  3.        Column 4 (Jan. / Feb. 1990)
  4.        Zack Urlocker
  5.  
  6.  
  7.        Breaking Technical Barriers in the 1990s
  8.  
  9.        "Never make predictions, especially about the future."
  10.        --Samual Goldwyn
  11.        
  12.        Despite Samual Goldwyn's words of wisdom, the role object-
  13.        oriented programming will play in the 1990s is interesting to
  14.        ponder.  Significant trends in the areas of hardware evolution,
  15.        graphical environments and the adoption of OOP can give us
  16.        insight into what object-oriented programming will be like in the
  17.        future.  In this column, I'll examine these trends and provide an
  18.        overview of some of The Whitewater Group's plans for OOP in 1990
  19.        and beyond.  In future columns, I'll provide a more detailed look
  20.        at the technologies that will bring object-oriented programming
  21.        to a new level of maturity.
  22.        
  23.        Setting the Stage
  24.        
  25.        As we enter the 1990s, it's worth examining some of the general
  26.        trends in computing as related to object-oriented programming.
  27.        
  28.        Ever-improving hardware
  29.        
  30.        Hardware continues to increase in performance and memory capacity
  31.        every year.  The newly shipping 80486-based microcomputers are
  32.        outperforming last year's 80386 machines.  As the clock speed of
  33.        the 80486 increases, we're likely to see performance rise to 20
  34.        million instructions per second (MIPS).  To put that in
  35.        perspective, the IBM AT performs at about 1 MIPS.  RISC-based
  36.        chips such as Motorola's 88000 and Sun's SPARC chip are also
  37.        pushing the envelope in terms of both performance and
  38.        price/performance.  Since these processors have built-in support
  39.        for floating point operations and memory cache control, they are
  40.        likely to be more cost effective than similarly configured 80386
  41.        or 68030 machines.
  42.        
  43.        These developments have significant ramifications for software
  44.        developers.  Much like the way work can expand to take up all
  45.        free time, there seems to be a law of software entropy that says
  46.        software expands to use all available hardware.  It is the
  47.        improvements in hardware that permit us to create better, more
  48.        sophisticated software.  As an example, many believe that
  49.        Microsoft's OS/2 operating system will achieve widespread
  50.        acceptance only when there is a version that takes full advantage
  51.        of the thirty-two bit capabilities of the 80386 and 80486.
  52.        
  53.  
  54.        The increase in hardware and operating system capacities means
  55.        we're likely to see a comparable increase in the complexity and
  56.        scope of the software applications we create.  If debugging in C
  57.        seems difficult now, imagine what it will be like if the program
  58.        is not 640K in size, but 6.4 megabytes.
  59.        
  60.        Since object-oriented languages are more effective in reducing
  61.        complexity than procedural languages, we're likely to see greater
  62.        usage as hardware capacity expands.
  63.        
  64.        Increasing acceptance of GUIs
  65.        
  66.        Although graphical user interfaces (GUIs) have been around for
  67.        quite some time, there has been a tremendous growth in the past
  68.        year.  For example, Microsoft reports retail sales of its Windows
  69.        product to be around 70,000 units a month.  Some of the growth in
  70.        GUIs is certainly due to improved performance on faster hardware.
  71.        As the number of applications for a particular environment
  72.        increases, so does interest among end-users.  As the installed
  73.        base grows, so does the attractiveness of the environment for
  74.        applications developers.
  75.        
  76.        Although there is a certain circular logic to the growth of a
  77.        graphical environment, both Microsoft Windows and the Macintosh
  78.        have been successful because of it.  Other environments, such as
  79.        Digital Research's GEM and the Amiga's Intuition, which may have
  80.        been arguably better, have been unable to break through this
  81.        "chicken and egg" situation.  And of course, the verdict is still
  82.        out on OS/2 Presentation Manager, the NeXT machine and the Unix
  83.        environments, Open Look and Motif.
  84.        
  85.        The significance for application developers is that non-standard
  86.        user-interfaces, no matter how good they might be, will not
  87.        obtain market acceptance.  And certainly the days of treating the
  88.        user-interface as a last-minute detail are gone forever.
  89.        
  90.        Since programming for a graphical environment with a procedural
  91.        language is so complex, its not surprising that we've seen the
  92.        adoption of object-oriented languages for these environments.
  93.        There's Actor for Windows, Object-Pascal for the Macintosh, and
  94.        more recently Objective-C for the NeXT machine and Smalltalk/V
  95.        for Presentation Manager.  Object-oriented programming may be the
  96.        only feasible way for most programmers to develop for graphical
  97.        environments.
  98.        
  99.        OOP is entering the mainstream
  100.        
  101.        With all of the conferences, magazine cover stories and publicity
  102.        surrounding object-oriented programming in the past year, it is
  103.        apparant that OOP is entering the mainstream.  Object-oriented
  104.        programming has emerged from the labs and is now being used for
  105.        real-world applications.
  106.        
  107.  
  108.        As a result, some of the criteria used to evaluate object-
  109.        oriented programming is changing.  Production users are less
  110.        interested in the theoretical purity of object-oriented concepts
  111.        and more interested in their practical application.  The need for
  112.        object-oriented programming to fit in with existing, as well as
  113.        new, standards will also increase in importance.
  114.        
  115.        Applications developers using object-oriented languages need
  116.        access to existing code libraries, compatibility with standard
  117.        operating systems and environments, and fast performance.  They
  118.        won't sacrifice any of these capabilities no matter how they
  119.        might compromise the object-oriented model.
  120.        
  121.        Actor 2.0
  122.        
  123.        The Whitewater Group has taken these trends into account in our
  124.        plans for Actor 2.0 and beyond.  Use of memory, compatibility
  125.        with C, language features and class libraries have been improved
  126.        in Actor 2.0 without sacrificing compatibility with previous
  127.        versions.
  128.        
  129.        Although it took some pretty amazing heroics on the part of Chuck
  130.        Duff to shoehorn Actor into a 640K IBM XT running Windows 1.0
  131.        back in 1986, we've been bumping into MS-DOS's 640K barrier ever
  132.        since.  Actor and Windows have improved their memory efficiency
  133.        with every release.  Actor 2.0 represents our most significant
  134.        memory improvement by using an automatic memory swapping kernel.
  135.        
  136.        The kernel is able to swap unused portions of code and static
  137.        objects out to disk effectively breaking the 640K barrier of MS-
  138.        DOS.  The swapping kernel uses a deterministic least recently
  139.        used (LRU) algorithm to provide swapping on an object-by-object
  140.        basis.  This results in better performance than a page-swapping
  141.        system because object-oriented languages don't exhibit the same
  142.        locality of reference typical of procedural languages.  Large
  143.        Actor applications can typically run in one-fourth of the static
  144.        memory as previous versions of Actor with little effect on
  145.        performance.  By freeing up static memory, Actor applications are
  146.        better able to make use of the increased memory of high-end
  147.        machines.
  148.        
  149.        Actor has always provided support for dynamic linking to programs
  150.        written in C and other procedural languages.  We've taken this
  151.        even further in Actor 2.0 by providing additional support for C
  152.        structures, callback functions and user-defined primitives.
  153.        
  154.        The CStruct class enables a program to pass C-like data
  155.        structures directly when calling external routines.  The CStruct
  156.        class supports nested structures as well as user-defined C types,
  157.        making it easier use existing libraries.  CStruct objects contain
  158.        binary data and a dictionary of fields and field information.  A
  159.        dictionary class, CTypes, is used to keep track of user defined
  160.        types as well as input and output conversion routines.  This
  161.  
  162.  
  163.        makes it easy to define the C types and have conversion take
  164.        place automatically whenever the CStruct object is referenced.
  165.        
  166.        Many of our users have requested ways of extending Actor's
  167.        primitive methods.  Users can now write their own primitives, in
  168.        C or assembler, to access special hardware features or to
  169.        optimize critical portions of their code.
  170.        
  171.        CStructs and user-defined primitives may cause object-oriented
  172.        purists to shudder, but we recognize that it was necessary to
  173.        provide professional programmers with an escape mechanism they
  174.        could use for compatibility or performance reasons.
  175.        
  176.        Although I chose Actor to demonstrate how industry trends have
  177.        affected software development, the same holds true for other
  178.        object-oriented languages as OOP heads into the 1990s.
  179.        
  180.        Portability Across Environments
  181.        
  182.        We purposefully designed Actor to hide many of the details of
  183.        programming for Windows.  This has become an important part of
  184.        our strategy to support other graphical environments also.  Our
  185.        goal is to provide an Actor development environment that provides
  186.        complete portability of Actor applications across all standard
  187.        GUIs.
  188.        
  189.        Work is underway to support future versions of Windows as well as
  190.        OS/2 Presentation Manager.  Future versions of Actor will be
  191.        based on a common kernel that will allow more objects through the
  192.        use of thirty-two bit pointers.  Since the kernel itself will be
  193.        portable, we will be able to port Actor to other popular
  194.        windowing environments also.
  195.        
  196.        Of course, the kernel is only part of the job in providing
  197.        portability across environments.  Windows, Presentation Manager
  198.        and other graphical environments all have different models of the
  199.        graphical environment, not to mention completely different
  200.        application programming interfaces.  To overcome these
  201.        differences, we've created a library of portable graphics
  202.        extensions.  You can think of these extensions as a MacDraw-like
  203.        toolkit for programmers.  In effect, you have graphical objects
  204.        for dealing with coordinate systems, fonts, text, shapes, pens,
  205.        brushes, bitmaps and so on.  This allows you to create
  206.        applications that take advantage of the richness of the
  207.        environment without having to write direct calls to the graphics
  208.        engine.
  209.        
  210.        There are three types of graphical objects that we've defined:
  211.        rendering tools, platform encapsulators, and drawables.
  212.        Rendering tools are objects such as brushes, pens, textpens and
  213.        graph spaces which control the appearance of graphical objects.
  214.        Platform encapsulators are used to factor out all of the
  215.        environment-specific details.  These include objects for dealing
  216.        with colors and physical ports.  Drawables consist of graphical
  217.  
  218.  
  219.        objects that can be rendered onto ports such as labels, icons,
  220.        shapes, bitmaps, regions, curves, polylines and so on.
  221.        
  222.        Since the platform encapsulators are the only classes that are
  223.        environment specific, they area all that is need be rewritten to
  224.        port the graphics extensions to a new platform.  The platform
  225.        encapsulators make extensive use of the underlying graphics
  226.        engine for speed, and, where necessary, include additional code
  227.        to make up for deficiencies in the environment.  Through the
  228.        judicious use of early-binding and assembly language primitives,
  229.        we've been able to achieve high-level portable graphics without
  230.        any significant performance degradation.
  231.        
  232.        One of the applications that we've developed to test the graphics
  233.        extensions is a drawing program similar to MacDraw.  The
  234.        application took only 500 lines of Actor code, or about 1/10th of
  235.        what it would have been in C.  Running on Microsoft Windows,
  236.        performance is comparable to commercial drawing programs.
  237.        
  238.        Although the graphics extensions have been initially implemented
  239.        for use in Actor, they could also be applicable to other object-
  240.        oriented languages.
  241.        
  242.        Beyond 1990
  243.        
  244.        A portable thirty-two bit kernel and graphics extensions are
  245.        important strategic developments for Actor in the early 1990s.
  246.        There will also be additional language improvements and class
  247.        libraries aimed at reducing application development time and
  248.        fitting in with emerging standards.  We're actively engaged in
  249.        research in language areas including abstract protocols, typing
  250.        of late-bound messages, privacy, as well other areas.  Many of
  251.        these projects will result in direct improvements in future
  252.        versions of Actor.  The Whitewater Group has joined AT&T,
  253.        Borland,  Hewlett-Packard, Data General and other members of the
  254.        Object Management Group to help create object management
  255.        standards.
  256.        
  257.        We expect that richer graphical environments and operating system
  258.        support for objects will broaden the scope of object-oriented
  259.        software development.  Hewlett-Packard's NewWave environment
  260.        gives us a glimpse of what operating environments will be like in
  261.        the future.  Once object management becomes an operating system
  262.        service, languages will no longer have to duplicate these
  263.        facilities.  This will make inter-language sharing of objects
  264.        feasible.
  265.        
  266.        When programmers are able to make use of objects from Actor, C++
  267.        and Smalltalk, as appropriate, we will see a rapid surge in the
  268.        number and quality of class libraries available.  At that point
  269.        the economics of software development will change dramatically.
  270.        Software development costs will be considered as capital
  271.        expenditures subject to classic "make or buy" decision criteria.
  272.        
  273.  
  274.        I'm certainly not predicting that programming will disappear.
  275.        However, we're likely to see two distinct types of programmers:
  276.        builders and reusers.  The first group will concentrate on
  277.        creating generic reusable components; the second group will
  278.        customize those components and create applications.  Because of
  279.        the greater cost of creating generic reusable components, I
  280.        suspect that much of this development will be done outside of
  281.        today's MIS departments by new entrepreneurial companies.
  282.        
  283.        Beginning in the early 1990s desktop multimedia machines that
  284.        incorporate high resolution graphics, interactive video and sound
  285.        will become available.  Initially, applications for these
  286.        environments may be written in C, but again, the economics of
  287.        object-oriented programming will result in the ability to create
  288.        richer applications in a shorter period of time.  More
  289.        importantly, however, object-oriented programmers will be
  290.        building up toolkits of objects that casual programmers will be
  291.        able to piece together.
  292.        
  293.        As object-oriented environments take off for end-users, they will
  294.        also be used by software developers.  Admittedly, we're often
  295.        like cobblers whose children go barefoot, so there will probably
  296.        be a time lag here.  I think we'll see an order of magnitude
  297.        change so that programming environments of the mid-1990s will
  298.        resemble end-user applications more than they will even today's
  299.        most sophisticated development environments.  Programming
  300.        languages will become a less significant portion of the overall
  301.        software development lifecycle.  CASE tools and visual
  302.        representations of programs are likely to become more important
  303.        in the future, particularly as we deal with richer class
  304.        libraries.  I doubt that visual programming will bear much
  305.        resemblance to today's programming languages, but for at least a
  306.        decade or more, the two technologies will coexist.
  307.        
  308.        When predicting the future, it's always easiest to speak in
  309.        generalities as I've done here.  In future columns I will expand
  310.        on some of the technologies I've mentioned and examine their
  311.        importance in taking object-oriented programming forward into the
  312.        1990s.
  313.        
  314.        
  315.        About the author
  316.        
  317.        Zack Urlocker is manager of developer relations at The Whitewater
  318.        Group, the creators of Actor, an object-oriented language for
  319.        Microsoft Windows.  Mr. Urlocker has taught object-oriented
  320.        programming to hundreds of professionals and has written articles
  321.        for several computer magazines and journals.
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.     Breaking Technical Barriers in the 1990s    page 6