OO Programming

BlitzMax Forums/BlitzMax Beginners Area/OO Programming

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

with modular *I* would mean:

Complete self-contained autonome objects that could be replaced by a similar object made by another coder, as long as the fields/methods act the same..

I'd also skip anything remotely global, everything should be local in the object..

I always compare it with a modular synthesizer (those huge monsters with wires all over the place), each part (filter, oscillator etc.) works purely by itself, it doesn't know and doesn't need to know IF there are other objects and what they do.

BMax's eventhooks/emitevents are the perfect aid to do this style o' coding.

Beginner-programmers will notice that they probably can't just replace code or delete it without messing-up the project, that's not very modular then.. :P

Naturally it also means that only including what you *need* results in a smaller file (find Framework assistant) but that's just something convenient for your .exe, doesn't say much about the style of programming.