Article Preview
Buy Now
COLUMN
A Program's Structure
Part Two: Objects
Issue: 12.2 (March/April 2014)
Author: Marc Zeedar
Author Bio: Marc taught himself programming in high school when he bought his first computer but had no money for software. He's had fun learning ever since.
Article Description: No description available.
Article Length (in bytes): 8,594
Starting Page Number: 48
Article Number: 12209
Resource File(s):
project12209.zip Updated: 2014-03-03 00:48:07
Related Link(s): None
Excerpt of article text...
In the previous issue I wrote about the differences between linear (procedural) and event-driven programming as it relates to a program's overall structure. This time I'm going to expand on that by looking at how your program's structure works with OOP (Object-Oriented Programming).
Scattered Code
Many programmers get into Xojo and become confused because they "can't find" their code. Because code is stored in various places, such as inside a button's
Action
event, it can feel like your program has no structure at all.In a way, that is true. That's sort of a given with user-driven programming, since the user, by his or her actions, is defining the way your program proceeds. With OOP that muddle becomes even more complicated, as objects link to each other and can call up or down the chain of objects.
It turns out that with OOP,
that's your program's structure. It's not linear code—it's the way theobjects are linked together .An Example
...End of Excerpt. Please purchase the magazine to read the full article.