external next up previous contents index
Next: 8.5 Social verb tutorial Up: 8.4 MOO tutorialLevel Previous: What is missing?

La morale de l'histoire

 

The little object we programmed respects quite well object-oriented programming style (well normally one does not program individual objectcs but rather generic ones, but would not change programming style). We respected:

Modularity:

Modularity: Verbs only operate on slots of the object to which they belong.

Why is that important ? Let's assume a player wanted to know how much information he remembered and deleted in a given interval of time.

Now we could:

This is not a very flexible way of doing things. It is MUCH better to write a verb on the player called something like ``update_info_counting'' that does the job. This way we could customize information counting for different players, or program a turn-on/off function. Don't try to program this for the moment, since it will only work on your own character. Rather go to the Generic Objects and Permission tutorial.

Going further

The code you wrote is hopefully a good example on how to use the MOO programming language, but it is not a very example on how you should develop software. Things that are missing are:

  1. This code can only be used for you, but by nobody else! In the MOO you have to write code that can be used by others.
  2. Abstraction of Code Segements.
  3. Generalization of function elements
  4. Specialized ``around'' verbs.

[ok I have to say a bit more here]

Also, this tutorial does not really force you program a lot by yourself. So, once you are done with this tutorial, you can try to add functionalities to thes objects, or have it behave in different ways. As an example, look at Thora's flower (#2783 @ TecfaMOO) and figure out the differences.


next up previous contents index external
Next: 8.5 Social verb tutorial Up: 8.4 MOO tutorialLevel Previous: What is missing?

Daniel K. Schneider
Thu Apr 17 12:43:52 MET DST 1997