|
You will often here in arguments about which language is superior and the phase "Object Orientated"
(also known as OO) being used as an advantage or maybe even a disadvantage, but what is OO? how does it help?
and how is it supported in Jamagic?
OO is simply a method of writing your programs. As programs get bigger and more complex
then the time and resources required to debug them grows at an alarming rate. This was causing more and more
cash and man-hours for the software industry and lead to delay and buggy software for the users.
Languages such as C and most based on 'Basic' use a design method called procedural program design.
This type of programming of course works fine, but as the programs became more complex code
maintenance costs have the potential to increase. Problems such as use of the same variable names, especially in multi-person development,
lack of re-useable code between products and similar code being used in different places through a project (which
then if a problem was found had to be fixed in multiple places) was causing software development time and cost to
spiral out of control.
OO programming attempts to solve these issues, programs would be broken down into simple "objects". Each object or group of objects
(in general) is independent of the others. It has its own variables and code, which do not interfere with any other
objects even if they use the same variable names.
Secondly OO was designed as to attempt to separate the use of these objects (what it does) from its
implementation (how it does it) similar to the idea of CSS within web site design for people more
familiar with that. For example in the case of a object "human" the object might have the
ability to "sleep", "eat" and "move". Somebody who wants to use the "human" object should not have to know anything
about how these abilities (called instance methods in most OO programming circles) actually work. The user only
needs to know what methods the "human" object has and what parameters if any they require. Separating the
implementation from the design and hiding the implementation from the user is often called encapsulation.
Because these objects are self-consistent then it becomes possible to use them across multiple projects and
as mentioned above by different people whom have no idea how it actually works! All that is required is for the
user to be supplied with adequate documentation.
Ok enough of the theory that I'll probably get lots of
emails about being incorrect anyway lets see what it means for Jamagic users. Jamagic supports some, but not all of
the idea's of OO programming.
This is part one of a two part article. In this part we will get to gribs with the basics and
terminology often used in OO programming in Jamagic. Part two will expand on these idea's and show more applied
usage of them within Jamagic.
» Next : 2. Simple and Useless Example
|