Difference between revisions of "Short BOOPSI Overview"

From MorphOS Library

m (Style, emboldening.)
m (Style.)
Line 6: Line 6:
 
This short introduction is not intended to be a complete lecture on object oriented programming. On the other hand no knowledge of any particular object oriented programming language is required to get familiar with BOOPSI.  Usually the support for OOP techniques comes with a programming language, which is either designed for OOP (like C++, C# or Java) or has OOP support added in more or less logical way (Objective C, PHP). This is not the case for BOOPSI and MUI however. In this case object oriented programming support comes from the operating system. BOOPSI and MUI can be used with any programming language, including traditional ones, for example C and even assembler.
 
This short introduction is not intended to be a complete lecture on object oriented programming. On the other hand no knowledge of any particular object oriented programming language is required to get familiar with BOOPSI.  Usually the support for OOP techniques comes with a programming language, which is either designed for OOP (like C++, C# or Java) or has OOP support added in more or less logical way (Objective C, PHP). This is not the case for BOOPSI and MUI however. In this case object oriented programming support comes from the operating system. BOOPSI and MUI can be used with any programming language, including traditional ones, for example C and even assembler.
  
The BOOPSI module is located in ''intuition.library'', with some important functions being added from a statically linked ''libabox''. It's primary design goal was to build a framework for wrapping Intuition GUI elements in an object oriented interface. This approach was unfortunately not flexible enough, so MUI uses only basic BOOPSI framework. This framework provides the four basic concepts of the object oriented programming: '''classes''', '''objects''', '''methods''' and '''attributes'''. It also supports class inheritance. Because of it's simplicity, BOOPSI is easy to understand and use, especially when compared to sophisticated frameworks, like the one in the C++ programming language.
+
The BOOPSI module is located in the ''intuition.library'', with some important functions being added from a statically linked ''libabox''. It's primary design goal was to build a framework for wrapping Intuition GUI elements in an object oriented interface. This approach was unfortunately not flexible enough, so MUI uses only basic BOOPSI framework. This framework provides the four basic concepts of the object oriented programming: '''classes''', '''objects''', '''methods''' and '''attributes'''. It also supports class inheritance. Because of it's simplicity, BOOPSI is easy to understand and use, especially when compared to sophisticated frameworks, like the one in the C++ programming language.
 +
 
  
 
==Classes and Objects==
 
==Classes and Objects==

Revision as of 09:29, 3 November 2010

Grzegorz Kraszewski

Object Oriented Programming

The object oriented programming is a technique developed as a response for two trends in the computer market. The first one was increasing complexity of software. Management of a traditionally written code becomes harder when the code size increases. The second trend was increasing popularity of graphical user interfaces, which meant the end of the sequential execution of programs. Instead modern programs are event driven, it means the flow of code is determined by external events (like an user input) and is not known at a time of writing the program. Object oriented programming divides a program into a set of objects interacting with each other using well defined interfaces. Such a modularization simplifies the management of project and also fits naturally the concept of modern graphical user interfaces. User controls (called "gadgets" in MUI) are just objects in the code and interact with objects representing user data.

This short introduction is not intended to be a complete lecture on object oriented programming. On the other hand no knowledge of any particular object oriented programming language is required to get familiar with BOOPSI. Usually the support for OOP techniques comes with a programming language, which is either designed for OOP (like C++, C# or Java) or has OOP support added in more or less logical way (Objective C, PHP). This is not the case for BOOPSI and MUI however. In this case object oriented programming support comes from the operating system. BOOPSI and MUI can be used with any programming language, including traditional ones, for example C and even assembler.

The BOOPSI module is located in the intuition.library, with some important functions being added from a statically linked libabox. It's primary design goal was to build a framework for wrapping Intuition GUI elements in an object oriented interface. This approach was unfortunately not flexible enough, so MUI uses only basic BOOPSI framework. This framework provides the four basic concepts of the object oriented programming: classes, objects, methods and attributes. It also supports class inheritance. Because of it's simplicity, BOOPSI is easy to understand and use, especially when compared to sophisticated frameworks, like the one in the C++ programming language.


Classes and Objects

Methods and Attributes

Object Construction and Destruction