29.11.2014 Views

Smalltalk and Object Orientation: an Introduction - Free

Smalltalk and Object Orientation: an Introduction - Free

Smalltalk and Object Orientation: an Introduction - Free

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

to team development. At present if members of a development te am wish to share their work<br />

they must file out (all) the relev<strong>an</strong>t classes <strong><strong>an</strong>d</strong> methods from their own images <strong><strong>an</strong>d</strong> file in those<br />

from their fellow workers. This c<strong>an</strong> be problematic as well as cumbersome. This problem stems<br />

from the very nature of the image in which all the “source code” is held <strong><strong>an</strong>d</strong> within which<br />

development takes place. A fundamental ch<strong>an</strong>ge in the way that the image works is required.<br />

• Typed variables : <strong>Smalltalk</strong> is a dynamically typed l<strong>an</strong>guage. That is, a variable’s type is<br />

determined by the type of object that it holds. This is all very well for rapid prototyping <strong><strong>an</strong>d</strong> for<br />

small single user developments, however for large projects which must exist for signific<strong>an</strong>t<br />

periods of time, this c<strong>an</strong> result in disaster. For example, “type mismatches” c<strong>an</strong>not be detected at<br />

compile time <strong><strong>an</strong>d</strong> will only m<strong>an</strong>ifest themselves at run time. This places a huge burden on testing<br />

which must now catch such mismatches. In addition the perform<strong>an</strong>ce of a dynamically typed<br />

l<strong>an</strong>guage c<strong>an</strong> be lower th<strong>an</strong> that of a statically typed l<strong>an</strong> guage as the run time system must now<br />

perform various checks which could otherwise be performed at compile time.<br />

• Improved exception m<strong>an</strong>agement : At present <strong>Smalltalk</strong> possesses only very rudimentary<br />

exception h<strong><strong>an</strong>d</strong>ling. If the developer has not defined how th e exception should be caught it is<br />

merely presented to the user. This is acceptable for a single user/developer system, however for<br />

delivered systems this is unacceptable. Even the facilities that are available are extremely<br />

limited. For example, class lev el rather th<strong>an</strong> block or method level support is required, such that<br />

if a particular type of exception occurs <strong>an</strong>ywhere within <strong>an</strong> inst<strong>an</strong>ce of a class (or one of its<br />

subclasses) then that exception is h<strong><strong>an</strong>d</strong>led cle<strong>an</strong>ly <strong><strong>an</strong>d</strong> in <strong>an</strong> appropriate m<strong>an</strong>ner.<br />

• Private methods: In <strong>Smalltalk</strong> all methods are publicly available, that is <strong>an</strong>y object c<strong>an</strong> send a<br />

message requesting that the receiving object perform <strong>an</strong>y of the defined methods. In general<br />

<strong>Smalltalk</strong> developers place those methods which are not intended for external use in method<br />

protocols such as private (or private -). However this is only<br />

convention <strong><strong>an</strong>d</strong> there is no system support for these “private” methods. Other object oriented<br />

l<strong>an</strong>guages such as C++ <strong><strong>an</strong>d</strong> Java do support the definition of private <strong><strong>an</strong>d</strong> public methods. Indeed<br />

these l<strong>an</strong>guages take the concept of private <strong><strong>an</strong>d</strong> public further. For example, in Java [v<strong>an</strong> der<br />

Linden 1996] there are a number of classes of access indicated by keywords:<br />

1. public - world access.<br />

2. protected - accessible to <strong>an</strong>y object in the current package or <strong>an</strong>y subclass in <strong>an</strong>y package.<br />

3. default - <strong>an</strong>y class in the package (A Java package is a group of classes which are to be<br />

bundled together. They are essentially the same as libraries in C++).<br />

4. private protected - class / subclass access only.<br />

5. private - accessible to the current class only.<br />

Of course some of the above issues are being addressed by current research (for example [Feigenbaum<br />

1995]) however there appears to be little interest in following this lead from the vendor community.<br />

33.2.2 Technology issues<br />

There are a number of technology based issues which will affect <strong>Smalltalk</strong>’s popularity in the coming<br />

years. These are less related to <strong>Smalltalk</strong> itself <strong><strong>an</strong>d</strong> more to the way in which software is, <strong><strong>an</strong>d</strong> will be,<br />

developed.<br />

The majority of software today is developed for use on PCs running either Windows 95, Windows<br />

NT or Windows 3.1. Therefore <strong>Smalltalk</strong> needs to be able to easily <strong><strong>an</strong>d</strong> simply interact with these<br />

environments. For example, explicit support for OLE <strong><strong>an</strong>d</strong> dynamically linked libraries is a must.<br />

In the future it is likely that the influence of the World Wide Web (or Web) <strong><strong>an</strong>d</strong> the internet will<br />

continue to grow. <strong>Smalltalk</strong> vendors must provide facilities which will allow <strong>Smalltalk</strong> to take<br />

adv<strong>an</strong>tage of t his (ParcPlace-Digitalk have already produced a product called VisualWave which is a<br />

VisualWorks based Web server).<br />

<strong>Object</strong> sharing <strong><strong>an</strong>d</strong> notification must be made signific<strong>an</strong>tly easier. CORBA (see [Ben -Nat<strong>an</strong> 1995]<br />

for a summary of the CORBA sta ndard <strong><strong>an</strong>d</strong> [Orfali et al 1995] for <strong>an</strong> excellent compendium of<br />

distributed object technology including OLE, OpenDoc as well as CORBA) while providing a possible<br />

infrastructure for such object sharing results in large cumbersome ORBs (CORBA st <strong><strong>an</strong>d</strong>s for the<br />

Common <strong>Object</strong> Request Broker Architecture. It is a specification for <strong>an</strong> ORB (<strong>Object</strong> Request Broker)<br />

which allows distributed objects within different systems to communicate. Simpler <strong><strong>an</strong>d</strong> easier to use<br />

279

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!